From 317fbdbb9c23f2a4c34111f0f3f2a89927c8823f Mon Sep 17 00:00:00 2001 From: Nick Todd Date: Fri, 16 Feb 2024 12:46:36 +0000 Subject: [PATCH 001/124] 2230: Version bump --- src/primaite/VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/primaite/VERSION b/src/primaite/VERSION index 43662e8c..fa7f84f1 100644 --- a/src/primaite/VERSION +++ b/src/primaite/VERSION @@ -1 +1 @@ -3.0.0b6 +3.0.0b7dev From 759965587982931bd039df6a4084ff7aa364cbdd Mon Sep 17 00:00:00 2001 From: Marek Wolan Date: Mon, 11 Mar 2024 20:10:08 +0000 Subject: [PATCH 002/124] Add agent action history --- .../game/agent/data_manipulation_bot.py | 5 +- src/primaite/game/agent/interface.py | 37 ++++++++++++-- src/primaite/game/agent/rewards.py | 37 ++++++++++---- src/primaite/game/game.py | 51 +++++++++---------- src/primaite/interface/request.py | 4 +- .../Data-Manipulation-E2E-Demonstration.ipynb | 10 ++-- src/primaite/session/environment.py | 25 ++++----- src/primaite/session/io.py | 41 +++------------ src/primaite/simulator/core.py | 4 +- 9 files changed, 110 insertions(+), 104 deletions(-) diff --git a/src/primaite/game/agent/data_manipulation_bot.py b/src/primaite/game/agent/data_manipulation_bot.py index 16453433..d3ec19cb 100644 --- a/src/primaite/game/agent/data_manipulation_bot.py +++ b/src/primaite/game/agent/data_manipulation_bot.py @@ -14,7 +14,7 @@ class DataManipulationAgent(AbstractScriptedAgent): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) - self.reset_agent_for_episode() + self.setup_agent() def _set_next_execution_timestep(self, timestep: int) -> None: """Set the next execution timestep with a configured random variance. @@ -43,9 +43,8 @@ class DataManipulationAgent(AbstractScriptedAgent): return "NODE_APPLICATION_EXECUTE", {"node_id": self.starting_node_idx, "application_id": 0} - def reset_agent_for_episode(self) -> None: + def setup_agent(self) -> None: """Set the next execution timestep when the episode resets.""" - super().reset_agent_for_episode() self._select_start_node() self._set_next_execution_timestep(self.agent_settings.start_settings.start_step) diff --git a/src/primaite/game/agent/interface.py b/src/primaite/game/agent/interface.py index 88848479..0531b25f 100644 --- a/src/primaite/game/agent/interface.py +++ b/src/primaite/game/agent/interface.py @@ -1,6 +1,6 @@ """Interface for agents.""" from abc import ABC, abstractmethod -from typing import Dict, List, Optional, Tuple, TYPE_CHECKING +from typing import Any, Dict, List, Optional, Tuple, TYPE_CHECKING from gymnasium.core import ActType, ObsType from pydantic import BaseModel, model_validator @@ -8,11 +8,31 @@ from pydantic import BaseModel, model_validator from primaite.game.agent.actions import ActionManager from primaite.game.agent.observations import ObservationManager from primaite.game.agent.rewards import RewardFunction +from primaite.interface.request import RequestFormat, RequestResponse if TYPE_CHECKING: pass +class AgentActionHistoryItem(BaseModel): + """One entry of an agent's action log - what the agent did and how the simulator responded in 1 step.""" + + timestep: int + """Timestep of this action.""" + + action: str + """CAOS Action name.""" + + parameters: Dict[str, Any] + """CAOS parameters for the given action.""" + + request: RequestFormat + """The request that was sent to the simulation based on the CAOS action chosen.""" + + response: RequestResponse + """The response sent back by the simulator for this action.""" + + class AgentStartSettings(BaseModel): """Configuration values for when an agent starts performing actions.""" @@ -90,6 +110,7 @@ class AbstractAgent(ABC): self.observation_manager: Optional[ObservationManager] = observation_space self.reward_function: Optional[RewardFunction] = reward_function self.agent_settings = agent_settings or AgentSettings() + self.action_history: List[AgentActionHistoryItem] = [] def update_observation(self, state: Dict) -> ObsType: """ @@ -109,7 +130,7 @@ class AbstractAgent(ABC): :return: Reward from the state. :rtype: float """ - return self.reward_function.update(state) + return self.reward_function.update(state=state, last_action_response=self.action_history[-1]) @abstractmethod def get_action(self, obs: ObsType, timestep: int = 0) -> Tuple[str, Dict]: @@ -138,9 +159,15 @@ class AbstractAgent(ABC): request = self.action_manager.form_request(action_identifier=action, action_options=options) return request - def reset_agent_for_episode(self) -> None: - """Agent reset logic should go here.""" - pass + def process_action_response( + self, timestep: int, action: str, parameters: Dict[str, Any], request: RequestFormat, response: RequestResponse + ) -> None: + """Process the response from the most recent action.""" + self.action_history.append( + AgentActionHistoryItem( + timestep=timestep, action=action, parameters=parameters, request=request, response=response + ) + ) class AbstractScriptedAgent(AbstractAgent): diff --git a/src/primaite/game/agent/rewards.py b/src/primaite/game/agent/rewards.py index 8c8e36ad..6ab5aa42 100644 --- a/src/primaite/game/agent/rewards.py +++ b/src/primaite/game/agent/rewards.py @@ -26,11 +26,14 @@ the structure: ``` """ from abc import abstractmethod -from typing import Dict, List, Tuple, Type +from typing import Dict, List, Tuple, Type, TYPE_CHECKING from primaite import getLogger from primaite.game.agent.utils import access_from_nested_dict, NOT_PRESENT_IN_STATE +if TYPE_CHECKING: + from primaite.game.agent.interface import AgentActionHistoryItem + _LOGGER = getLogger(__name__) @@ -38,7 +41,9 @@ class AbstractReward: """Base class for reward function components.""" @abstractmethod - def calculate(self, state: Dict) -> float: + def calculate( + self, state: Dict, last_action_response: "AgentActionHistoryItem" + ) -> float: # todo maybe make last_action_response optional? """Calculate the reward for the current state.""" return 0.0 @@ -58,7 +63,9 @@ class AbstractReward: class DummyReward(AbstractReward): """Dummy reward function component which always returns 0.""" - def calculate(self, state: Dict) -> float: + def calculate( + self, state: Dict, last_action_response: "AgentActionHistoryItem" + ) -> float: # todo maybe make last_action_response optional? """Calculate the reward for the current state.""" return 0.0 @@ -98,7 +105,9 @@ class DatabaseFileIntegrity(AbstractReward): file_name, ] - def calculate(self, state: Dict) -> float: + def calculate( + self, state: Dict, last_action_response: "AgentActionHistoryItem" + ) -> float: # todo maybe make last_action_response optional? """Calculate the reward for the current state. :param state: The current state of the simulation. @@ -153,7 +162,9 @@ class WebServer404Penalty(AbstractReward): """ self.location_in_state = ["network", "nodes", node_hostname, "services", service_name] - def calculate(self, state: Dict) -> float: + def calculate( + self, state: Dict, last_action_response: "AgentActionHistoryItem" + ) -> float: # todo maybe make last_action_response optional? """Calculate the reward for the current state. :param state: The current state of the simulation. @@ -206,7 +217,9 @@ class WebpageUnavailablePenalty(AbstractReward): self._node = node_hostname self.location_in_state = ["network", "nodes", node_hostname, "applications", "WebBrowser"] - def calculate(self, state: Dict) -> float: + def calculate( + self, state: Dict, last_action_response: "AgentActionHistoryItem" + ) -> float: # todo maybe make last_action_response optional? """ Calculate the reward based on current simulation state. @@ -255,13 +268,17 @@ class GreenAdminDatabaseUnreachablePenalty(AbstractReward): self._node = node_hostname self.location_in_state = ["network", "nodes", node_hostname, "applications", "DatabaseClient"] - def calculate(self, state: Dict) -> float: + def calculate( + self, state: Dict, last_action_response: "AgentActionHistoryItem" + ) -> float: # todo maybe make last_action_response optional? """ Calculate the reward based on current simulation state. :param state: The current state of the simulation. :type state: Dict """ + if last_action_response.request == ["network", "node", "client_2", "application", "DatabaseClient", "execute"]: + pass # TODO db_state = access_from_nested_dict(state, self.location_in_state) if db_state is NOT_PRESENT_IN_STATE or "last_connection_successful" not in db_state: _LOGGER.debug(f"Can't calculate reward for {self.__class__.__name__}") @@ -313,7 +330,9 @@ class RewardFunction: """ self.reward_components.append((component, weight)) - def update(self, state: Dict) -> float: + def update( + self, state: Dict, last_action_response: "AgentActionHistoryItem" + ) -> float: # todo maybe make last_action_response optional? """Calculate the overall reward for the current state. :param state: The current state of the simulation. @@ -323,7 +342,7 @@ class RewardFunction: for comp_and_weight in self.reward_components: comp = comp_and_weight[0] weight = comp_and_weight[1] - total += weight * comp.calculate(state=state) + total += weight * comp.calculate(state=state, last_action_response=last_action_response) self.current_reward = total return self.current_reward diff --git a/src/primaite/game/game.py b/src/primaite/game/game.py index c94cb3ad..1cc8cfed 100644 --- a/src/primaite/game/game.py +++ b/src/primaite/game/game.py @@ -1,6 +1,6 @@ """PrimAITE game - Encapsulates the simulation and agents.""" from ipaddress import IPv4Address -from typing import Dict, List, Tuple +from typing import Dict, List from pydantic import BaseModel, ConfigDict @@ -130,49 +130,44 @@ class PrimaiteGame: """ _LOGGER.debug(f"Stepping. Step counter: {self.step_counter}") - # Get the current state of the simulation - sim_state = self.get_sim_state() - - # Update agents' observations and rewards based on the current state - self.update_agents(sim_state) - # Apply all actions to simulation as requests - self.apply_agent_actions() + action_data = self.apply_agent_actions() # Advance timestep self.advance_timestep() + # Get the current state of the simulation + sim_state = self.get_sim_state() + + # Update agents' observations and rewards based on the current state, and the response from the last action + self.update_agents(state=sim_state, action_data=action_data) + def get_sim_state(self) -> Dict: """Get the current state of the simulation.""" return self.simulation.describe_state() def update_agents(self, state: Dict) -> None: """Update agents' observations and rewards based on the current state.""" - for _, agent in self.agents.items(): - agent.update_observation(state) - agent.update_reward(state) + for agent_name, agent in self.agents.items(): + if self.step_counter > 0: # can't get reward before first action + agent.update_reward(state=state) + agent.update_observation(state=state) agent.reward_function.total_reward += agent.reward_function.current_reward - def apply_agent_actions(self) -> Dict[str, Tuple[str, Dict]]: - """ - Apply all actions to simulation as requests. - - :return: A recap of each agent's actions, in CAOS format. - :rtype: Dict[str, Tuple[str, Dict]] - - """ - agent_actions = {} + def apply_agent_actions(self) -> None: + """Apply all actions to simulation as requests.""" for _, agent in self.agents.items(): obs = agent.observation_manager.current_observation - action_choice, options = agent.get_action(obs, timestep=self.step_counter) - request = agent.format_request(action_choice, options) + action_choice, parameters = agent.get_action(obs, timestep=self.step_counter) + request = agent.format_request(action_choice, parameters) response = self.simulation.apply_request(request) - agent_actions[agent.agent_name] = { - "action": action_choice, - "parameters": options, - "response": response.model_dump(), - } - return agent_actions + agent.process_action_response( + timestep=self.step_counter, + action=action_choice, + parameters=parameters, + request=request, + response=response, + ) def advance_timestep(self) -> None: """Advance timestep.""" diff --git a/src/primaite/interface/request.py b/src/primaite/interface/request.py index 8e922ef9..bc076599 100644 --- a/src/primaite/interface/request.py +++ b/src/primaite/interface/request.py @@ -1,7 +1,9 @@ -from typing import Dict, ForwardRef, Literal +from typing import Dict, ForwardRef, List, Literal, Union from pydantic import BaseModel, ConfigDict, StrictBool, validate_call +RequestFormat = List[Union[str, int, float]] + RequestResponse = ForwardRef("RequestResponse") """This makes it possible to type-hint RequestResponse.from_bool return type.""" diff --git a/src/primaite/notebooks/Data-Manipulation-E2E-Demonstration.ipynb b/src/primaite/notebooks/Data-Manipulation-E2E-Demonstration.ipynb index 1d7cb157..b2522c2b 100644 --- a/src/primaite/notebooks/Data-Manipulation-E2E-Demonstration.ipynb +++ b/src/primaite/notebooks/Data-Manipulation-E2E-Demonstration.ipynb @@ -373,7 +373,7 @@ "# Imports\n", "from primaite.config.load import data_manipulation_config_path\n", "from primaite.session.environment import PrimaiteGymEnv\n", - "from primaite.game.game import PrimaiteGame\n", + "from primaite.game.agent.interface import AgentActionHistoryItem\n", "import yaml\n", "from pprint import pprint\n" ] @@ -425,14 +425,14 @@ "source": [ "def friendly_output_red_action(info):\n", " # parse the info dict form step output and write out what the red agent is doing\n", - " red_info = info['agent_actions']['data_manipulation_attacker']\n", - " red_action = red_info['action']\n", + " red_info : AgentActionHistoryItem = info['agent_actions']['data_manipulation_attacker']\n", + " red_action = red_info.action\n", " if red_action == 'DONOTHING':\n", " red_str = 'DO NOTHING'\n", " elif red_action == 'NODE_APPLICATION_EXECUTE':\n", - " client = \"client 1\" if red_info['parameters']['node_id'] == 0 else \"client 2\"\n", + " client = \"client 1\" if red_info.parameters['node_id'] == 0 else \"client 2\"\n", " red_str = f\"ATTACK from {client}\"\n", - " return red_str\n" + " return red_str" ] }, { diff --git a/src/primaite/session/environment.py b/src/primaite/session/environment.py index 87638e7d..64534b04 100644 --- a/src/primaite/session/environment.py +++ b/src/primaite/session/environment.py @@ -49,23 +49,20 @@ class PrimaiteGymEnv(gymnasium.Env): # make ProxyAgent store the action chosen my the RL policy self.agent.store_action(action) # apply_agent_actions accesses the action we just stored - agent_actions = self.game.apply_agent_actions() + self.game.apply_agent_actions() self.game.advance_timestep() state = self.game.get_sim_state() - self.game.update_agents(state) - next_obs = self._get_obs() + next_obs = self._get_obs() # this doesn't update observation, just gets the current observation reward = self.agent.reward_function.current_reward terminated = False truncated = self.game.calculate_truncated() - info = {"agent_actions": agent_actions} # tell us what all the agents did for convenience. + info = { + "agent_actions": {name: agent.action_history[-1] for name, agent in self.game.agents.items()} + } # tell us what all the agents did for convenience. if self.game.save_step_metadata: self._write_step_metadata_json(action, state, reward) - if self.io.settings.save_agent_actions: - self.io.store_agent_actions( - agent_actions=agent_actions, episode=self.episode_counter, timestep=self.game.step_counter - ) return next_obs, reward, terminated, truncated, info def _write_step_metadata_json(self, action: int, state: Dict, reward: int): @@ -91,13 +88,13 @@ class PrimaiteGymEnv(gymnasium.Env): f"avg. reward: {self.agent.reward_function.total_reward}" ) if self.io.settings.save_agent_actions: - self.io.write_agent_actions(episode=self.episode_counter) - self.io.clear_agent_actions() + all_agent_actions = {name: agent.action_history for name, agent in self.game.agents.items()} + self.io.write_agent_actions(agent_actions=all_agent_actions, episode=self.episode_counter) self.game: PrimaiteGame = PrimaiteGame.from_config(cfg=copy.deepcopy(self.game_config)) self.game.setup_for_episode(episode=self.episode_counter) self.episode_counter += 1 state = self.game.get_sim_state() - self.game.update_agents(state) + self.game.update_agents(state=state) next_obs = self._get_obs() info = {} return next_obs, info @@ -217,7 +214,7 @@ class PrimaiteRayMARLEnv(MultiAgentEnv): # 1. Perform actions for agent_name, action in actions.items(): self.agents[agent_name].store_action(action) - agent_actions = self.game.apply_agent_actions() + self.game.apply_agent_actions() # 2. Advance timestep self.game.advance_timestep() @@ -236,10 +233,6 @@ class PrimaiteRayMARLEnv(MultiAgentEnv): truncateds["__all__"] = self.game.calculate_truncated() if self.game.save_step_metadata: self._write_step_metadata_json(actions, state, rewards) - if self.io.settings.save_agent_actions: - self.io.store_agent_actions( - agent_actions=agent_actions, episode=self.episode_counter, timestep=self.game.step_counter - ) return next_obs, rewards, terminateds, truncateds, infos def _write_step_metadata_json(self, actions: Dict, state: Dict, rewards: Dict): diff --git a/src/primaite/session/io.py b/src/primaite/session/io.py index ed2b4d62..87289c43 100644 --- a/src/primaite/session/io.py +++ b/src/primaite/session/io.py @@ -48,8 +48,6 @@ class PrimaiteIO: SIM_OUTPUT.save_pcap_logs = self.settings.save_pcap_logs SIM_OUTPUT.save_sys_logs = self.settings.save_sys_logs - self.agent_action_log: List[Dict] = [] - def generate_session_path(self, timestamp: Optional[datetime] = None) -> Path: """Create a folder for the session and return the path to it.""" if timestamp is None: @@ -72,48 +70,23 @@ class PrimaiteIO: """Return the path where agent actions will be saved.""" return self.session_path / "agent_actions" / f"episode_{episode}.json" - def store_agent_actions(self, agent_actions: Dict, episode: int, timestep: int) -> None: - """Cache agent actions for a particular step. - - :param agent_actions: Dictionary describing actions for any agents that acted in this timestep. The expected - format contains agent identifiers as keys. The keys should map to a tuple of [CAOS action, parameters] - CAOS action is a string representing one the CAOS actions. - parameters is a dict of parameter names and values for that particular CAOS action. - For example: - { - 'green1' : ('NODE_APPLICATION_EXECUTE', {'node_id':1, 'application_id':0}), - 'defender': ('DO_NOTHING', {}) - } - :type agent_actions: Dict - :param timestep: Simulation timestep when these actions occurred. - :type timestep: int - """ - self.agent_action_log.append( - [ - { - "episode": episode, - "timestep": timestep, - "agent_actions": agent_actions, - } - ] - ) - - def write_agent_actions(self, episode: int) -> None: + def write_agent_actions(self, agent_actions: Dict[str, List], episode: int) -> None: """Take the contents of the agent action log and write it to a file. :param episode: Episode number :type episode: int """ + data = {} + longest_history = max([len(hist) for hist in agent_actions]) + for i in range(longest_history): + data[i] = {"timestep": i, "episode": episode, **{name: acts[i] for name, acts in agent_actions.items()}} + path = self.generate_agent_actions_save_path(episode=episode) path.parent.mkdir(exist_ok=True, parents=True) path.touch() _LOGGER.info(f"Saving agent action log to {path}") with open(path, "w") as file: - json.dump(self.agent_action_log, fp=file, indent=1) - - def clear_agent_actions(self) -> None: - """Reset the agent action log back to an empty dictionary.""" - self.agent_action_log = [] + json.dump(data, fp=file, indent=1) @classmethod def from_config(cls, config: Dict) -> "PrimaiteIO": diff --git a/src/primaite/simulator/core.py b/src/primaite/simulator/core.py index aeb4e865..6da8a2f8 100644 --- a/src/primaite/simulator/core.py +++ b/src/primaite/simulator/core.py @@ -7,12 +7,10 @@ from uuid import uuid4 from pydantic import BaseModel, ConfigDict, Field, validate_call from primaite import getLogger -from primaite.interface.request import RequestResponse +from primaite.interface.request import RequestFormat, RequestResponse _LOGGER = getLogger(__name__) -RequestFormat = List[Union[str, int, float]] - class RequestPermissionValidator(BaseModel): """ From c3f1cfb33d3516fcca84b5ffe944b46d080d1cf3 Mon Sep 17 00:00:00 2001 From: Marek Wolan Date: Mon, 11 Mar 2024 22:53:39 +0000 Subject: [PATCH 003/124] Add shared reward --- .../_package_data/data_manipulation.yaml | 39 ++++--- src/primaite/game/agent/rewards.py | 100 +++++++++++++++--- src/primaite/game/game.py | 55 +++++++++- src/primaite/game/science.py | 79 ++++++++++++++ src/primaite/session/io.py | 7 +- 5 files changed, 242 insertions(+), 38 deletions(-) diff --git a/src/primaite/config/_package_data/data_manipulation.yaml b/src/primaite/config/_package_data/data_manipulation.yaml index dffb40ea..f4789e50 100644 --- a/src/primaite/config/_package_data/data_manipulation.yaml +++ b/src/primaite/config/_package_data/data_manipulation.yaml @@ -73,7 +73,14 @@ agents: reward_function: reward_components: - - type: DUMMY + - type: WEBPAGE_UNAVAILABLE_PENALTY + weight: 0.25 + options: + node_hostname: client_2 + - type: GREEN_ADMIN_DATABASE_UNREACHABLE_PENALTY + weight: 0.05 + options: + node_hostname: client_2 - ref: client_1_green_user team: GREEN @@ -116,7 +123,14 @@ agents: reward_function: reward_components: - - type: DUMMY + - type: WEBPAGE_UNAVAILABLE_PENALTY + weight: 0.25 + options: + node_hostname: client_1 + - type: GREEN_ADMIN_DATABASE_UNREACHABLE_PENALTY + weight: 0.05 + options: + node_hostname: client_1 @@ -696,22 +710,15 @@ agents: node_hostname: database_server folder_name: database file_name: database.db - - type: WEBPAGE_UNAVAILABLE_PENALTY - weight: 0.25 + - type: SHARED_REWARD + weight: 1.0 options: - node_hostname: client_1 - - type: WEBPAGE_UNAVAILABLE_PENALTY - weight: 0.25 + agent_name: client_1_green_user + - type: SHARED_REWARD + weight: 1.0 options: - node_hostname: client_2 - - type: GREEN_ADMIN_DATABASE_UNREACHABLE_PENALTY - weight: 0.05 - options: - node_hostname: client_1 - - type: GREEN_ADMIN_DATABASE_UNREACHABLE_PENALTY - weight: 0.05 - options: - node_hostname: client_2 + agent_name: client_2_green_user + agent_settings: diff --git a/src/primaite/game/agent/rewards.py b/src/primaite/game/agent/rewards.py index 6ab5aa42..86a61535 100644 --- a/src/primaite/game/agent/rewards.py +++ b/src/primaite/game/agent/rewards.py @@ -26,7 +26,9 @@ the structure: ``` """ from abc import abstractmethod -from typing import Dict, List, Tuple, Type, TYPE_CHECKING +from typing import Callable, Dict, List, Optional, Tuple, Type, TYPE_CHECKING + +from typing_extensions import Never from primaite import getLogger from primaite.game.agent.utils import access_from_nested_dict, NOT_PRESENT_IN_STATE @@ -214,18 +216,29 @@ class WebpageUnavailablePenalty(AbstractReward): :param node_hostname: Hostname of the node which has the web browser. :type node_hostname: str """ - self._node = node_hostname - self.location_in_state = ["network", "nodes", node_hostname, "applications", "WebBrowser"] + self._node: str = node_hostname + self.location_in_state: List[str] = ["network", "nodes", node_hostname, "applications", "WebBrowser"] + self._last_request_failed: bool = False def calculate( self, state: Dict, last_action_response: "AgentActionHistoryItem" ) -> float: # todo maybe make last_action_response optional? """ - Calculate the reward based on current simulation state. + Calculate the reward based on current simulation state, and the recent agent action. - :param state: The current state of the simulation. - :type state: Dict + When the green agent requests to execute the browser application, and that request fails, this reward + component will keep track of that information. In that case, it doesn't matter whether the last webpage + had a 200 status code, because there has been an unsuccessful request since. """ + if last_action_response.request == ["network", "node", self._node, "application", "DatabaseClient", "execute"]: + self._last_request_failed = last_action_response.response.status != "success" + + # if agent couldn't even get as far as sending the request (because for example the node was off), then + # apply a penalty + if self._last_request_failed: + return -1.0 + + # If the last request did actually go through, then check if the webpage also loaded web_browser_state = access_from_nested_dict(state, self.location_in_state) if web_browser_state is NOT_PRESENT_IN_STATE or "history" not in web_browser_state: _LOGGER.info( @@ -265,20 +278,28 @@ class GreenAdminDatabaseUnreachablePenalty(AbstractReward): :param node_hostname: Hostname of the node where the database client sits. :type node_hostname: str """ - self._node = node_hostname - self.location_in_state = ["network", "nodes", node_hostname, "applications", "DatabaseClient"] + self._node: str = node_hostname + self.location_in_state: List[str] = ["network", "nodes", node_hostname, "applications", "DatabaseClient"] + self._last_request_failed: bool = False - def calculate( - self, state: Dict, last_action_response: "AgentActionHistoryItem" - ) -> float: # todo maybe make last_action_response optional? + def calculate(self, state: Dict, last_action_response: "AgentActionHistoryItem") -> float: """ - Calculate the reward based on current simulation state. + Calculate the reward based on current simulation state, and the recent agent action. - :param state: The current state of the simulation. - :type state: Dict + When the green agent requests to execute the database client application, and that request fails, this reward + component will keep track of that information. In that case, it doesn't matter whether the last successful + request returned was able to connect to the database server, because there has been an unsuccessful request + since. """ - if last_action_response.request == ["network", "node", "client_2", "application", "DatabaseClient", "execute"]: - pass # TODO + if last_action_response.request == ["network", "node", self._node, "application", "DatabaseClient", "execute"]: + self._last_request_failed = last_action_response.response.status != "success" + + # if agent couldn't even get as far as sending the request (because for example the node was off), then + # apply a penalty + if self._last_request_failed: + return -1.0 + + # If the last request was actually sent, then check if the connection was established. db_state = access_from_nested_dict(state, self.location_in_state) if db_state is NOT_PRESENT_IN_STATE or "last_connection_successful" not in db_state: _LOGGER.debug(f"Can't calculate reward for {self.__class__.__name__}") @@ -301,6 +322,52 @@ class GreenAdminDatabaseUnreachablePenalty(AbstractReward): return cls(node_hostname=node_hostname) +class SharedReward(AbstractReward): + """Adds another agent's reward to the overall reward.""" + + def __init__(self, agent_name: Optional[str] = None) -> None: + """ + Initialise the shared reward. + + The agent_ref is a placeholder value. It starts off as none, but it must be set before this reward can work + correctly. + + :param agent_name: The name whose reward is an input + :type agent_ref: Optional[str] + """ + self.agent_name = agent_name + """Agent whose reward to track.""" + + def default_callback() -> Never: + """ + Default callback to prevent calling this reward until it's properly initialised. + + SharedReward should not be used until the game layer replaces self.callback with a reference to the + function that retrieves the desired agent's reward. Therefore, we define this default callback that raises + an error. + """ + raise RuntimeError("Attempted to calculate SharedReward but it was not initialised properly.") + + self.callback: Callable[[], float] = default_callback + """Method that retrieves an agent's current reward given the agent's name.""" + + def calculate(self, state: Dict, last_action_response: "AgentActionHistoryItem") -> float: + """Simply access the other agent's reward and return it.""" + print(self.callback(), self.agent_name) + return self.callback() + + @classmethod + def from_config(cls, config: Dict) -> "SharedReward": + """ + Build the SharedReward object from config. + + :param config: Configuration dictionary + :type config: Dict + """ + agent_name = config.get("agent_name") + return cls(agent_name=agent_name) + + class RewardFunction: """Manages the reward function for the agent.""" @@ -310,6 +377,7 @@ class RewardFunction: "WEB_SERVER_404_PENALTY": WebServer404Penalty, "WEBPAGE_UNAVAILABLE_PENALTY": WebpageUnavailablePenalty, "GREEN_ADMIN_DATABASE_UNREACHABLE_PENALTY": GreenAdminDatabaseUnreachablePenalty, + "SHARED_REWARD": SharedReward, } """List of reward class identifiers.""" diff --git a/src/primaite/game/game.py b/src/primaite/game/game.py index 1cc8cfed..e766bcd3 100644 --- a/src/primaite/game/game.py +++ b/src/primaite/game/game.py @@ -9,8 +9,9 @@ from primaite.game.agent.actions import ActionManager from primaite.game.agent.data_manipulation_bot import DataManipulationAgent from primaite.game.agent.interface import AbstractAgent, AgentSettings, ProxyAgent from primaite.game.agent.observations import ObservationManager -from primaite.game.agent.rewards import RewardFunction +from primaite.game.agent.rewards import RewardFunction, SharedReward from primaite.game.agent.scripted_agents import ProbabilisticAgent +from primaite.game.science import graph_has_cycle, topological_sort from primaite.simulator.network.hardware.base import NodeOperatingState from primaite.simulator.network.hardware.nodes.host.computer import Computer from primaite.simulator.network.hardware.nodes.host.host_node import NIC @@ -110,6 +111,9 @@ class PrimaiteGame: self.save_step_metadata: bool = False """Whether to save the RL agents' action, environment state, and other data at every single step.""" + self._reward_calculation_order: List[str] = [name for name in self.agents] + """Agent order for reward evaluation, as some rewards can be dependent on other agents' rewards.""" + def step(self): """ Perform one step of the simulation/agent loop. @@ -148,10 +152,11 @@ class PrimaiteGame: def update_agents(self, state: Dict) -> None: """Update agents' observations and rewards based on the current state.""" - for agent_name, agent in self.agents.items(): + for agent_name in self._reward_calculation_order: + agent = self.agents[agent_name] if self.step_counter > 0: # can't get reward before first action agent.update_reward(state=state) - agent.update_observation(state=state) + agent.update_observation(state=state) # order of this doesn't matter so just use reward order agent.reward_function.total_reward += agent.reward_function.current_reward def apply_agent_actions(self) -> None: @@ -443,7 +448,51 @@ class PrimaiteGame: raise ValueError(msg) game.agents[agent_cfg["ref"]] = new_agent + # Validate that if any agents are sharing rewards, they aren't forming an infinite loop. + game.setup_reward_sharing() + # Set the NMNE capture config set_nmne_config(network_config.get("nmne_config", {})) return game + + def setup_reward_sharing(self): + """Do necessary setup to enable reward sharing between agents. + + This method ensures that there are no cycles in the reward sharing. A cycle would be for example if agent_1 + depends on agent_2 and agent_2 depends on agent_1. It would cause an infinite loop. + + Also, SharedReward requires us to pass it a callback method that will provide the reward of the agent who is + sharing their reward. This callback is provided by this setup method. + + Finally, this method sorts the agents in order in which rewards will be evaluated to make sure that any rewards + that rely on the value of another reward are evaluated later. + + :raises RuntimeError: If the reward sharing is specified with a cyclic dependency. + """ + # construct dependency graph in the reward sharing between agents. + graph = {} + for name, agent in self.agents.items(): + graph[name] = set() + for comp, weight in agent.reward_function.reward_components: + if isinstance(comp, SharedReward): + comp: SharedReward + graph[name].add(comp.agent_name) + + # while constructing the graph, we might as well set up the reward sharing itself. + comp.callback = lambda: self.agents[comp.agent_name].reward_function.current_reward + # TODO: make sure this lambda is working like I think it does -> it goes to the agent and fetches + # the most recent value of current_reward, NOT just simply caching the reward value at the time this + # callback method is defined. + + # make sure the graph is acyclic. Otherwise we will enter an infinite loop of reward sharing. + if graph_has_cycle(graph): + raise RuntimeError( + ( + "Detected cycle in agent reward sharing. Check the agent reward function ", + "configuration: reward sharing can only go one way.", + ) + ) + + # sort the agents so the rewards that depend on other rewards are always evaluated later + self._reward_calculation_order = topological_sort(graph) diff --git a/src/primaite/game/science.py b/src/primaite/game/science.py index 19a86237..801ef269 100644 --- a/src/primaite/game/science.py +++ b/src/primaite/game/science.py @@ -1,4 +1,5 @@ from random import random +from typing import Any, Iterable, Mapping def simulate_trial(p_of_success: float) -> bool: @@ -14,3 +15,81 @@ def simulate_trial(p_of_success: float) -> bool: :returns: True if the trial is successful (with probability 'p_of_success'); otherwise, False. """ return random() < p_of_success + + +def graph_has_cycle(graph: Mapping[Any, Iterable[Any]]) -> bool: + """Detect cycles in a directed graph. + + Provide the graph as a dictionary that describes which nodes are linked. For example: + {0: {1,2}, 1:{2,3}, 3:{0}} here there's a cycle 0 -> 1 -> 3 -> 0 + {'a': ('b','c'), c:('b')} here there is no cycle + + :param graph: a mapping from node to a set of nodes to which it is connected. + :type graph: Mapping[Any, Iterable[Any]] + :return: Whether the graph has any cycles + :rtype: bool + """ + visited = set() + currently_visiting = set() + + def depth_first_search(node: Any) -> bool: + """Perform depth-first search (DFS) traversal to detect cycles starting from a given node.""" + if node in currently_visiting: + return True # Cycle detected + if node in visited: + return False # Already visited, no need to explore further + + visited.add(node) + currently_visiting.add(node) + + for neighbour in graph.get(node, []): + if depth_first_search(neighbour): + return True # Cycle detected + + currently_visiting.remove(node) + return False + + # Start DFS traversal from each node + for node in graph: + if depth_first_search(node): + return True # Cycle detected + + return False # No cycles found + + +def topological_sort(graph: Mapping[Any, Iterable[Any]]) -> Iterable[Any]: + """ + Perform topological sorting on a directed graph. + + This guarantees that if there's a directed edge from node A to node B, then A appears before B. + + :param graph: A dictionary representing the directed graph, where keys are node identifiers + and values are lists of outgoing edges from each node. + :type graph: dict[int, list[Any]] + + :return: A topologically sorted list of node identifiers. + :rtype: list[Any] + """ + visited: set[Any] = set() + stack: list[Any] = [] + + def dfs(node: Any) -> None: + """ + Depth-first search traversal to visit nodes and their neighbors. + + :param node: The current node to visit. + :type node: Any + """ + if node in visited: + return + visited.add(node) + for neighbour in graph.get(node, []): + dfs(neighbour) + stack.append(node) + + # Perform DFS traversal from each node + for node in graph: + dfs(node) + + # Reverse the stack and return it. + return stack[::-1] diff --git a/src/primaite/session/io.py b/src/primaite/session/io.py index 87289c43..ef77c63d 100644 --- a/src/primaite/session/io.py +++ b/src/primaite/session/io.py @@ -77,16 +77,17 @@ class PrimaiteIO: :type episode: int """ data = {} - longest_history = max([len(hist) for hist in agent_actions]) + longest_history = max([len(hist) for hist in agent_actions.values()]) for i in range(longest_history): - data[i] = {"timestep": i, "episode": episode, **{name: acts[i] for name, acts in agent_actions.items()}} + data[i] = {"timestep": i, "episode": episode} + data[i].update({name: acts[i] for name, acts in agent_actions.items() if len(acts) > i}) path = self.generate_agent_actions_save_path(episode=episode) path.parent.mkdir(exist_ok=True, parents=True) path.touch() _LOGGER.info(f"Saving agent action log to {path}") with open(path, "w") as file: - json.dump(data, fp=file, indent=1) + json.dump(data, fp=file, indent=1, default=lambda x: x.model_dump()) @classmethod def from_config(cls, config: Dict) -> "PrimaiteIO": From 03ee976a2d66d40e35a20940c41f1aae88c5a9e2 Mon Sep 17 00:00:00 2001 From: Marek Wolan Date: Tue, 12 Mar 2024 11:00:55 +0000 Subject: [PATCH 004/124] remove extra print statement --- src/primaite/game/agent/rewards.py | 1 - 1 file changed, 1 deletion(-) diff --git a/src/primaite/game/agent/rewards.py b/src/primaite/game/agent/rewards.py index 86a61535..3d61c0b4 100644 --- a/src/primaite/game/agent/rewards.py +++ b/src/primaite/game/agent/rewards.py @@ -353,7 +353,6 @@ class SharedReward(AbstractReward): def calculate(self, state: Dict, last_action_response: "AgentActionHistoryItem") -> float: """Simply access the other agent's reward and return it.""" - print(self.callback(), self.agent_name) return self.callback() @classmethod From 24fdb8dc17f2a7608e7876a58afa054993e30851 Mon Sep 17 00:00:00 2001 From: Marek Wolan Date: Tue, 12 Mar 2024 11:40:26 +0000 Subject: [PATCH 005/124] Fix minor reward sharing bugs --- src/primaite/game/agent/rewards.py | 8 ++--- src/primaite/game/game.py | 5 +-- src/primaite/game/science.py | 3 +- .../Data-Manipulation-E2E-Demonstration.ipynb | 32 +++++++++++-------- 4 files changed, 24 insertions(+), 24 deletions(-) diff --git a/src/primaite/game/agent/rewards.py b/src/primaite/game/agent/rewards.py index 3d61c0b4..a2ffd875 100644 --- a/src/primaite/game/agent/rewards.py +++ b/src/primaite/game/agent/rewards.py @@ -230,7 +230,7 @@ class WebpageUnavailablePenalty(AbstractReward): component will keep track of that information. In that case, it doesn't matter whether the last webpage had a 200 status code, because there has been an unsuccessful request since. """ - if last_action_response.request == ["network", "node", self._node, "application", "DatabaseClient", "execute"]: + if last_action_response.request == ["network", "node", self._node, "application", "WebBrowser", "execute"]: self._last_request_failed = last_action_response.response.status != "success" # if agent couldn't even get as far as sending the request (because for example the node was off), then @@ -338,7 +338,7 @@ class SharedReward(AbstractReward): self.agent_name = agent_name """Agent whose reward to track.""" - def default_callback() -> Never: + def default_callback(agent_name: str) -> Never: """ Default callback to prevent calling this reward until it's properly initialised. @@ -348,12 +348,12 @@ class SharedReward(AbstractReward): """ raise RuntimeError("Attempted to calculate SharedReward but it was not initialised properly.") - self.callback: Callable[[], float] = default_callback + self.callback: Callable[[str], float] = default_callback """Method that retrieves an agent's current reward given the agent's name.""" def calculate(self, state: Dict, last_action_response: "AgentActionHistoryItem") -> float: """Simply access the other agent's reward and return it.""" - return self.callback() + return self.callback(self.agent_name) @classmethod def from_config(cls, config: Dict) -> "SharedReward": diff --git a/src/primaite/game/game.py b/src/primaite/game/game.py index e766bcd3..ac23610c 100644 --- a/src/primaite/game/game.py +++ b/src/primaite/game/game.py @@ -480,10 +480,7 @@ class PrimaiteGame: graph[name].add(comp.agent_name) # while constructing the graph, we might as well set up the reward sharing itself. - comp.callback = lambda: self.agents[comp.agent_name].reward_function.current_reward - # TODO: make sure this lambda is working like I think it does -> it goes to the agent and fetches - # the most recent value of current_reward, NOT just simply caching the reward value at the time this - # callback method is defined. + comp.callback = lambda agent_name: self.agents[agent_name].reward_function.current_reward # make sure the graph is acyclic. Otherwise we will enter an infinite loop of reward sharing. if graph_has_cycle(graph): diff --git a/src/primaite/game/science.py b/src/primaite/game/science.py index 801ef269..908b326f 100644 --- a/src/primaite/game/science.py +++ b/src/primaite/game/science.py @@ -91,5 +91,4 @@ def topological_sort(graph: Mapping[Any, Iterable[Any]]) -> Iterable[Any]: for node in graph: dfs(node) - # Reverse the stack and return it. - return stack[::-1] + return stack diff --git a/src/primaite/notebooks/Data-Manipulation-E2E-Demonstration.ipynb b/src/primaite/notebooks/Data-Manipulation-E2E-Demonstration.ipynb index b2522c2b..946202b6 100644 --- a/src/primaite/notebooks/Data-Manipulation-E2E-Demonstration.ipynb +++ b/src/primaite/notebooks/Data-Manipulation-E2E-Demonstration.ipynb @@ -450,7 +450,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "Now the reward is -1, let's have a look at blue agent's observation." + "Now the reward is -0.8, let's have a look at blue agent's observation." ] }, { @@ -510,9 +510,9 @@ "source": [ "obs, reward, terminated, truncated, info = env.step(13) # patch the database\n", "print(f\"step: {env.game.step_counter}\")\n", - "print(f\"Red action: {info['agent_actions']['data_manipulation_attacker']['action']}\" )\n", - "print(f\"Green action: {info['agent_actions']['client_1_green_user']['action']}\" )\n", - "print(f\"Green action: {info['agent_actions']['client_2_green_user']['action']}\" )\n", + "print(f\"Red action: {info['agent_actions']['data_manipulation_attacker'].action}\" )\n", + "print(f\"Green action: {info['agent_actions']['client_1_green_user'].action}\" )\n", + "print(f\"Green action: {info['agent_actions']['client_2_green_user'].action}\" )\n", "print(f\"Blue reward:{reward}\" )" ] }, @@ -533,9 +533,9 @@ "metadata": {}, "outputs": [], "source": [ - "obs, reward, terminated, truncated, info = env.step(0) # patch the database\n", + "obs, reward, terminated, truncated, info = env.step(0) # do nothing\n", "print(f\"step: {env.game.step_counter}\")\n", - "print(f\"Red action: {info['agent_actions']['data_manipulation_attacker']['action']}\" )\n", + "print(f\"Red action: {info['agent_actions']['data_manipulation_attacker'].action}\" )\n", "print(f\"Green action: {info['agent_actions']['client_2_green_user']}\" )\n", "print(f\"Green action: {info['agent_actions']['client_1_green_user']}\" )\n", "print(f\"Blue reward:{reward:.2f}\" )" @@ -557,17 +557,19 @@ "outputs": [], "source": [ "env.step(13) # Patch the database\n", - "print(f\"step: {env.game.step_counter}, Red action: {info['agent_actions']['data_manipulation_attacker']['action']}, Blue reward:{reward:.2f}\" )\n", + "print(f\"step: {env.game.step_counter}, Red action: {info['agent_actions']['data_manipulation_attacker'].action}, Blue reward:{reward:.2f}\" )\n", "\n", "env.step(50) # Block client 1\n", - "print(f\"step: {env.game.step_counter}, Red action: {info['agent_actions']['data_manipulation_attacker']['action']}, Blue reward:{reward:.2f}\" )\n", + "print(f\"step: {env.game.step_counter}, Red action: {info['agent_actions']['data_manipulation_attacker'].action}, Blue reward:{reward:.2f}\" )\n", "\n", "env.step(51) # Block client 2\n", - "print(f\"step: {env.game.step_counter}, Red action: {info['agent_actions']['data_manipulation_attacker']['action']}, Blue reward:{reward:.2f}\" )\n", + "print(f\"step: {env.game.step_counter}, Red action: {info['agent_actions']['data_manipulation_attacker'].action}, Blue reward:{reward:.2f}\" )\n", "\n", - "for step in range(30):\n", + "while abs(reward - 0.8) > 1e-5:\n", " obs, reward, terminated, truncated, info = env.step(0) # do nothing\n", - " print(f\"step: {env.game.step_counter}, Red action: {info['agent_actions']['data_manipulation_attacker']['action']}, Blue reward:{reward:.2f}\" )" + " print(f\"step: {env.game.step_counter}, Red action: {info['agent_actions']['data_manipulation_attacker'].action}, Blue reward:{reward:.2f}\" )\n", + " if env.game.step_counter > 10000:\n", + " break # make sure there's no infinite loop if something went wrong" ] }, { @@ -617,17 +619,19 @@ " if obs['NODES'][6]['NETWORK_INTERFACES'][1]['nmne']['outbound'] == 1:\n", " # client 1 has NMNEs, let's block it\n", " obs, reward, terminated, truncated, info = env.step(50) # block client 1\n", + " print(\"blocking client 1\")\n", " break\n", " elif obs['NODES'][7]['NETWORK_INTERFACES'][1]['nmne']['outbound'] == 1:\n", " # client 2 has NMNEs, so let's block it\n", " obs, reward, terminated, truncated, info = env.step(51) # block client 2\n", + " print(\"blocking client 2\")\n", " break\n", " if tries>100:\n", " print(\"Error: NMNE never increased\")\n", " break\n", "\n", "env.step(13) # Patch the database\n", - "..." + "print()\n" ] }, { @@ -646,14 +650,14 @@ "\n", "for step in range(40):\n", " obs, reward, terminated, truncated, info = env.step(0) # do nothing\n", - " print(f\"step: {env.game.step_counter}, Red action: {info['agent_actions']['data_manipulation_attacker']['action']}, Blue reward:{reward:.2f}\" )" + " print(f\"step: {env.game.step_counter}, Red action: {info['agent_actions']['data_manipulation_attacker'].action}, Blue reward:{reward:.2f}\" )" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ - "Reset the environment, you can rerun the other cells to verify that the attack works the same every episode." + "Reset the environment, you can rerun the other cells to verify that the attack works the same every episode. (except the red agent will move between `client_1` and `client_2`.)" ] }, { From 045f46740702918a711003f2b9859988def28dbd Mon Sep 17 00:00:00 2001 From: Marek Wolan Date: Tue, 12 Mar 2024 11:51:17 +0000 Subject: [PATCH 006/124] Update marl config --- .../_package_data/data_manipulation_marl.yaml | 58 +++++++++---------- 1 file changed, 28 insertions(+), 30 deletions(-) diff --git a/src/primaite/config/_package_data/data_manipulation_marl.yaml b/src/primaite/config/_package_data/data_manipulation_marl.yaml index f7288cb0..be53d2c5 100644 --- a/src/primaite/config/_package_data/data_manipulation_marl.yaml +++ b/src/primaite/config/_package_data/data_manipulation_marl.yaml @@ -75,7 +75,14 @@ agents: reward_function: reward_components: - - type: DUMMY + - type: WEBPAGE_UNAVAILABLE_PENALTY + weight: 0.25 + options: + node_hostname: client_2 + - type: GREEN_ADMIN_DATABASE_UNREACHABLE_PENALTY + weight: 0.05 + options: + node_hostname: client_2 - ref: client_1_green_user team: GREEN @@ -118,7 +125,14 @@ agents: reward_function: reward_components: - - type: DUMMY + - type: WEBPAGE_UNAVAILABLE_PENALTY + weight: 0.25 + options: + node_hostname: client_1 + - type: GREEN_ADMIN_DATABASE_UNREACHABLE_PENALTY + weight: 0.05 + options: + node_hostname: client_1 @@ -700,22 +714,14 @@ agents: node_hostname: database_server folder_name: database file_name: database.db - - type: WEBPAGE_UNAVAILABLE_PENALTY - weight: 0.25 + - type: SHARED_REWARD + weight: 1.0 options: - node_hostname: client_1 - - type: WEBPAGE_UNAVAILABLE_PENALTY - weight: 0.25 + agent_name: client_1_green_user + - type: SHARED_REWARD + weight: 1.0 options: - node_hostname: client_2 - - type: GREEN_ADMIN_DATABASE_UNREACHABLE_PENALTY - weight: 0.05 - options: - node_hostname: client_1 - - type: GREEN_ADMIN_DATABASE_UNREACHABLE_PENALTY - weight: 0.05 - options: - node_hostname: client_2 + agent_name: client_2_green_user agent_settings: @@ -1259,22 +1265,14 @@ agents: node_hostname: database_server folder_name: database file_name: database.db - - type: WEBPAGE_UNAVAILABLE_PENALTY - weight: 0.25 + - type: SHARED_REWARD + weight: 1.0 options: - node_hostname: client_1 - - type: WEBPAGE_UNAVAILABLE_PENALTY - weight: 0.25 + agent_name: client_1_green_user + - type: SHARED_REWARD + weight: 1.0 options: - node_hostname: client_2 - - type: GREEN_ADMIN_DATABASE_UNREACHABLE_PENALTY - weight: 0.05 - options: - node_hostname: client_1 - - type: GREEN_ADMIN_DATABASE_UNREACHABLE_PENALTY - weight: 0.05 - options: - node_hostname: client_2 + agent_name: client_2_green_user agent_settings: From 6dedb910990df2b289f31162b43e678d12cf0d12 Mon Sep 17 00:00:00 2001 From: Marek Wolan Date: Wed, 13 Mar 2024 09:17:29 +0000 Subject: [PATCH 007/124] Remove redundant TODOs --- src/primaite/game/agent/interface.py | 2 -- src/primaite/game/agent/rewards.py | 24 ++++++------------------ 2 files changed, 6 insertions(+), 20 deletions(-) diff --git a/src/primaite/game/agent/interface.py b/src/primaite/game/agent/interface.py index 0531b25f..91fa03d4 100644 --- a/src/primaite/game/agent/interface.py +++ b/src/primaite/game/agent/interface.py @@ -141,8 +141,6 @@ class AbstractAgent(ABC): :param obs: Observation of the environment. :type obs: ObsType - :param reward: Reward from the previous action, defaults to None TODO: should this parameter even be accepted? - :type reward: float, optional :param timestep: The current timestep in the simulation, used for non-RL agents. Optional :type timestep: int :return: Action to be taken in the environment. diff --git a/src/primaite/game/agent/rewards.py b/src/primaite/game/agent/rewards.py index a2ffd875..d8cb1328 100644 --- a/src/primaite/game/agent/rewards.py +++ b/src/primaite/game/agent/rewards.py @@ -43,9 +43,7 @@ class AbstractReward: """Base class for reward function components.""" @abstractmethod - def calculate( - self, state: Dict, last_action_response: "AgentActionHistoryItem" - ) -> float: # todo maybe make last_action_response optional? + def calculate(self, state: Dict, last_action_response: "AgentActionHistoryItem") -> float: """Calculate the reward for the current state.""" return 0.0 @@ -65,9 +63,7 @@ class AbstractReward: class DummyReward(AbstractReward): """Dummy reward function component which always returns 0.""" - def calculate( - self, state: Dict, last_action_response: "AgentActionHistoryItem" - ) -> float: # todo maybe make last_action_response optional? + def calculate(self, state: Dict, last_action_response: "AgentActionHistoryItem") -> float: """Calculate the reward for the current state.""" return 0.0 @@ -107,9 +103,7 @@ class DatabaseFileIntegrity(AbstractReward): file_name, ] - def calculate( - self, state: Dict, last_action_response: "AgentActionHistoryItem" - ) -> float: # todo maybe make last_action_response optional? + def calculate(self, state: Dict, last_action_response: "AgentActionHistoryItem") -> float: """Calculate the reward for the current state. :param state: The current state of the simulation. @@ -164,9 +158,7 @@ class WebServer404Penalty(AbstractReward): """ self.location_in_state = ["network", "nodes", node_hostname, "services", service_name] - def calculate( - self, state: Dict, last_action_response: "AgentActionHistoryItem" - ) -> float: # todo maybe make last_action_response optional? + def calculate(self, state: Dict, last_action_response: "AgentActionHistoryItem") -> float: """Calculate the reward for the current state. :param state: The current state of the simulation. @@ -220,9 +212,7 @@ class WebpageUnavailablePenalty(AbstractReward): self.location_in_state: List[str] = ["network", "nodes", node_hostname, "applications", "WebBrowser"] self._last_request_failed: bool = False - def calculate( - self, state: Dict, last_action_response: "AgentActionHistoryItem" - ) -> float: # todo maybe make last_action_response optional? + def calculate(self, state: Dict, last_action_response: "AgentActionHistoryItem") -> float: """ Calculate the reward based on current simulation state, and the recent agent action. @@ -397,9 +387,7 @@ class RewardFunction: """ self.reward_components.append((component, weight)) - def update( - self, state: Dict, last_action_response: "AgentActionHistoryItem" - ) -> float: # todo maybe make last_action_response optional? + def update(self, state: Dict, last_action_response: "AgentActionHistoryItem") -> float: """Calculate the overall reward for the current state. :param state: The current state of the simulation. From 10ee9b300fe8e6596c25fbad6ebd689ac1bc4aaf Mon Sep 17 00:00:00 2001 From: Marek Wolan Date: Wed, 13 Mar 2024 12:08:20 +0000 Subject: [PATCH 008/124] Update docs on rewards --- docs/source/game_layer.rst | 72 ++++++++++++++++++++++++++++++-------- 1 file changed, 58 insertions(+), 14 deletions(-) diff --git a/docs/source/game_layer.rst b/docs/source/game_layer.rst index 39ab7bde..ba400ac2 100644 --- a/docs/source/game_layer.rst +++ b/docs/source/game_layer.rst @@ -6,19 +6,12 @@ The Primaite codebase consists of two main modules: * ``simulator``: The simulation logic including the network topology, the network state, and behaviour of various hardware and software classes. * ``game``: The agent-training infrastructure which helps reinforcement learning agents interface with the simulation. This includes the observation, action, and rewards, for RL agents, but also scripted deterministic agents. The game layer orchestrates all the interactions between modules. - The simulator and game layer communicate using the PrimAITE State API and the PrimAITE Request API. - -.. - TODO: write up these APIs and link them here. - - -Game layer ----------- +The simulator and game layer communicate using the PrimAITE State API and the PrimAITE Request API. The game layer is responsible for managing agents and getting them to interface with the simulator correctly. It consists of several components: PrimAITE Session -^^^^^^^^^^^^^^^^ +================ .. admonition:: Deprecated :class: deprecated @@ -28,7 +21,7 @@ PrimAITE Session ``PrimaiteSession`` is the main entry point into Primaite and it allows the simultaneous coordination of a simulation and agents that interact with it. ``PrimaiteSession`` keeps track of multiple agents of different types. Agents -^^^^^^ +====== All agents inherit from the :py:class:`primaite.game.agent.interface.AbstractAgent` class, which mandates that they have an ObservationManager, ActionManager, and RewardManager. The agent behaviour depends on the type of agent, but there are two main types: @@ -39,16 +32,67 @@ All agents inherit from the :py:class:`primaite.game.agent.interface.AbstractAge TODO: add seed to stochastic scripted agents Observations -^^^^^^^^^^^^^^^^^^ +============ An agent's observations are managed by the ``ObservationManager`` class. It generates observations based on the current simulation state dictionary. It also provides the observation space during initial setup. The data is formatted so it's compatible with ``Gymnasium.spaces``. Observation spaces are composed of one or more components which are defined by the ``AbstractObservation`` base class. Actions -^^^^^^^ +======= An agent's actions are managed by the ``ActionManager``. It converts actions selected by agents (which are typically integers chosen from a ``gymnasium.spaces.Discrete`` space) into simulation-friendly requests. It also provides the action space during initial setup. Action spaces are composed of one or more components which are defined by the ``AbstractAction`` base class. Rewards -^^^^^^^ +======= -An agent's reward function is managed by the ``RewardManager``. It calculates rewards based on the simulation state (in a way similar to observations). Rewards can be defined as a weighted sum of small reward components. For example, an agents reward can be based on the uptime of a database service plus the loss rate of packets between clients and a web server. The reward components are defined by the AbstractReward base class. +An agent's reward function is managed by the ``RewardManager``. It calculates rewards based on the simulation state (in a way similar to observations). Rewards can be defined as a weighted sum of small reward components. For example, an agents reward can be based on the uptime of a database service plus the loss rate of packets between clients and a web server. + +Reward Components +----------------- + +Currently implemented are reward components tailored to the data manipulation scenario. View the full API and description of how they work here: :py:module:`primaite.game.agent.reward`. + +Reward Sharing +-------------- + +An agent's reward can be based on rewards of other agents. This is particularly useful for modelling a situation where the blue agent's job is to protect the ability of green agents to perform their pattern-of-life. This can be configured in the YAML file this way: + +```yaml +green_agent_1: # this agent sometimes tries to access the webpage, and sometimes the database + # actions, observations, and agent settings go here + reward_function: + reward_components: + + # When the webpage loads, the reward goes up by 0.25 when it fails to load, it goes down to -0.25 + - type: WEBPAGE_UNAVAILABLE_PENALTY + weight: 0.25 + options: + node_hostname: client_2 + + # When the database is reachable, the reward goes up by 0.05, when it is unreachable it goes down to -0.05 + - type: GREEN_ADMIN_DATABASE_UNREACHABLE_PENALTY + weight: 0.05 + options: + node_hostname: client_2 + +blue_agent: + # actions, observations, and agent settings go here + reward_function: + reward_components: + + # When the database file is in a good state, blue's reward is 0.4, when it's in a corrupted state the reward is -0.4 + - type: DATABASE_FILE_INTEGRITY + weight: 0.40 + options: + node_hostname: database_server + folder_name: database + file_name: database.db + + # The green's reward is added onto the blue's reward. + - type: SHARED_REWARD + weight: 1.0 + options: + agent_name: client_2_green_user + +``` + +When defining agent reward sharing, users must be careful to avoid circular references, as that would lead to an infinite calculation loop. PrimAITE will prevent circular dependencies and provide a helpful error message if they are detected in the yaml. From f438acf745c54137b08b41175b05d91e517d7db4 Mon Sep 17 00:00:00 2001 From: Marek Wolan Date: Wed, 13 Mar 2024 14:01:17 +0000 Subject: [PATCH 009/124] Add shared reward test --- tests/assets/configs/shared_rewards.yaml | 956 ++++++++++++++++++ .../game_layer/test_rewards.py | 27 + 2 files changed, 983 insertions(+) create mode 100644 tests/assets/configs/shared_rewards.yaml diff --git a/tests/assets/configs/shared_rewards.yaml b/tests/assets/configs/shared_rewards.yaml new file mode 100644 index 00000000..91ff20e7 --- /dev/null +++ b/tests/assets/configs/shared_rewards.yaml @@ -0,0 +1,956 @@ +training_config: + rl_framework: SB3 + rl_algorithm: PPO + seed: 333 + n_learn_episodes: 1 + n_eval_episodes: 5 + max_steps_per_episode: 128 + deterministic_eval: false + n_agents: 1 + agent_references: + - defender + +io_settings: + save_checkpoints: true + checkpoint_interval: 5 + save_agent_actions: true + save_step_metadata: false + save_pcap_logs: false + save_sys_logs: true + + +game: + max_episode_length: 256 + ports: + - HTTP + - POSTGRES_SERVER + protocols: + - ICMP + - TCP + - UDP + thresholds: + nmne: + high: 10 + medium: 5 + low: 0 + +agents: + - ref: client_2_green_user + team: GREEN + type: ProbabilisticAgent + agent_settings: + action_probabilities: + 0: 0.3 + 1: 0.6 + 2: 0.1 + observation_space: + type: UC2GreenObservation + action_space: + action_list: + - type: DONOTHING + - type: NODE_APPLICATION_EXECUTE + options: + nodes: + - node_name: client_2 + applications: + - application_name: WebBrowser + - application_name: DatabaseClient + max_folders_per_node: 1 + max_files_per_folder: 1 + max_services_per_node: 1 + max_applications_per_node: 2 + action_map: + 0: + action: DONOTHING + options: {} + 1: + action: NODE_APPLICATION_EXECUTE + options: + node_id: 0 + application_id: 0 + 2: + action: NODE_APPLICATION_EXECUTE + options: + node_id: 0 + application_id: 1 + + reward_function: + reward_components: + - type: WEBPAGE_UNAVAILABLE_PENALTY + weight: 0.25 + options: + node_hostname: client_2 + - type: GREEN_ADMIN_DATABASE_UNREACHABLE_PENALTY + weight: 0.05 + options: + node_hostname: client_2 + + - ref: client_1_green_user + team: GREEN + type: ProbabilisticAgent + agent_settings: + action_probabilities: + 0: 0.3 + 1: 0.6 + 2: 0.1 + observation_space: + type: UC2GreenObservation + action_space: + action_list: + - type: DONOTHING + - type: NODE_APPLICATION_EXECUTE + options: + nodes: + - node_name: client_1 + applications: + - application_name: WebBrowser + - application_name: DatabaseClient + max_folders_per_node: 1 + max_files_per_folder: 1 + max_services_per_node: 1 + max_applications_per_node: 2 + action_map: + 0: + action: DONOTHING + options: {} + 1: + action: NODE_APPLICATION_EXECUTE + options: + node_id: 0 + application_id: 0 + 2: + action: NODE_APPLICATION_EXECUTE + options: + node_id: 0 + application_id: 1 + + reward_function: + reward_components: + - type: WEBPAGE_UNAVAILABLE_PENALTY + weight: 0.25 + options: + node_hostname: client_1 + - type: GREEN_ADMIN_DATABASE_UNREACHABLE_PENALTY + weight: 0.05 + options: + node_hostname: client_1 + + + + + + - ref: data_manipulation_attacker + team: RED + type: RedDatabaseCorruptingAgent + + observation_space: + type: UC2RedObservation + options: + nodes: {} + + action_space: + action_list: + - type: DONOTHING + - type: NODE_APPLICATION_EXECUTE + options: + nodes: + - node_name: client_1 + applications: + - application_name: DataManipulationBot + - node_name: client_2 + applications: + - application_name: DataManipulationBot + max_folders_per_node: 1 + max_files_per_folder: 1 + max_services_per_node: 1 + + reward_function: + reward_components: + - type: DUMMY + + agent_settings: # options specific to this particular agent type, basically args of __init__(self) + start_settings: + start_step: 25 + frequency: 20 + variance: 5 + + - ref: defender + team: BLUE + type: ProxyAgent + + observation_space: + type: UC2BlueObservation + options: + num_services_per_node: 1 + num_folders_per_node: 1 + num_files_per_folder: 1 + num_nics_per_node: 2 + nodes: + - node_hostname: domain_controller + services: + - service_name: DNSServer + - node_hostname: web_server + services: + - service_name: WebServer + - node_hostname: database_server + folders: + - folder_name: database + files: + - file_name: database.db + - node_hostname: backup_server + - node_hostname: security_suite + - node_hostname: client_1 + - node_hostname: client_2 + links: + - link_ref: router_1___switch_1 + - link_ref: router_1___switch_2 + - link_ref: switch_1___domain_controller + - link_ref: switch_1___web_server + - link_ref: switch_1___database_server + - link_ref: switch_1___backup_server + - link_ref: switch_1___security_suite + - link_ref: switch_2___client_1 + - link_ref: switch_2___client_2 + - link_ref: switch_2___security_suite + acl: + options: + max_acl_rules: 10 + router_hostname: router_1 + ip_address_order: + - node_hostname: domain_controller + nic_num: 1 + - node_hostname: web_server + nic_num: 1 + - node_hostname: database_server + nic_num: 1 + - node_hostname: backup_server + nic_num: 1 + - node_hostname: security_suite + nic_num: 1 + - node_hostname: client_1 + nic_num: 1 + - node_hostname: client_2 + nic_num: 1 + - node_hostname: security_suite + nic_num: 2 + ics: null + + action_space: + action_list: + - type: DONOTHING + - type: NODE_SERVICE_SCAN + - type: NODE_SERVICE_STOP + - type: NODE_SERVICE_START + - type: NODE_SERVICE_PAUSE + - type: NODE_SERVICE_RESUME + - type: NODE_SERVICE_RESTART + - type: NODE_SERVICE_DISABLE + - type: NODE_SERVICE_ENABLE + - type: NODE_SERVICE_PATCH + - type: NODE_FILE_SCAN + - type: NODE_FILE_CHECKHASH + - type: NODE_FILE_DELETE + - type: NODE_FILE_REPAIR + - type: NODE_FILE_RESTORE + - type: NODE_FOLDER_SCAN + - type: NODE_FOLDER_CHECKHASH + - type: NODE_FOLDER_REPAIR + - type: NODE_FOLDER_RESTORE + - type: NODE_OS_SCAN + - type: NODE_SHUTDOWN + - type: NODE_STARTUP + - type: NODE_RESET + - type: NETWORK_ACL_ADDRULE + options: + target_router_hostname: router_1 + - type: NETWORK_ACL_REMOVERULE + options: + target_router_hostname: router_1 + - type: NETWORK_NIC_ENABLE + - type: NETWORK_NIC_DISABLE + + action_map: + 0: + action: DONOTHING + options: {} + # scan webapp service + 1: + action: NODE_SERVICE_SCAN + options: + node_id: 1 + service_id: 0 + # stop webapp service + 2: + action: NODE_SERVICE_STOP + options: + node_id: 1 + service_id: 0 + # start webapp service + 3: + action: "NODE_SERVICE_START" + options: + node_id: 1 + service_id: 0 + 4: + action: "NODE_SERVICE_PAUSE" + options: + node_id: 1 + service_id: 0 + 5: + action: "NODE_SERVICE_RESUME" + options: + node_id: 1 + service_id: 0 + 6: + action: "NODE_SERVICE_RESTART" + options: + node_id: 1 + service_id: 0 + 7: + action: "NODE_SERVICE_DISABLE" + options: + node_id: 1 + service_id: 0 + 8: + action: "NODE_SERVICE_ENABLE" + options: + node_id: 1 + service_id: 0 + 9: # check database.db file + action: "NODE_FILE_SCAN" + options: + node_id: 2 + folder_id: 0 + file_id: 0 + 10: + action: "NODE_FILE_CHECKHASH" + options: + node_id: 2 + folder_id: 0 + file_id: 0 + 11: + action: "NODE_FILE_DELETE" + options: + node_id: 2 + folder_id: 0 + file_id: 0 + 12: + action: "NODE_FILE_REPAIR" + options: + node_id: 2 + folder_id: 0 + file_id: 0 + 13: + action: "NODE_SERVICE_PATCH" + options: + node_id: 2 + service_id: 0 + 14: + action: "NODE_FOLDER_SCAN" + options: + node_id: 2 + folder_id: 0 + 15: + action: "NODE_FOLDER_CHECKHASH" + options: + node_id: 2 + folder_id: 0 + 16: + action: "NODE_FOLDER_REPAIR" + options: + node_id: 2 + folder_id: 0 + 17: + action: "NODE_FOLDER_RESTORE" + options: + node_id: 2 + folder_id: 0 + 18: + action: "NODE_OS_SCAN" + options: + node_id: 0 + 19: + action: "NODE_SHUTDOWN" + options: + node_id: 0 + 20: + action: NODE_STARTUP + options: + node_id: 0 + 21: + action: NODE_RESET + options: + node_id: 0 + 22: + action: "NODE_OS_SCAN" + options: + node_id: 1 + 23: + action: "NODE_SHUTDOWN" + options: + node_id: 1 + 24: + action: NODE_STARTUP + options: + node_id: 1 + 25: + action: NODE_RESET + options: + node_id: 1 + 26: # old action num: 18 + action: "NODE_OS_SCAN" + options: + node_id: 2 + 27: + action: "NODE_SHUTDOWN" + options: + node_id: 2 + 28: + action: NODE_STARTUP + options: + node_id: 2 + 29: + action: NODE_RESET + options: + node_id: 2 + 30: + action: "NODE_OS_SCAN" + options: + node_id: 3 + 31: + action: "NODE_SHUTDOWN" + options: + node_id: 3 + 32: + action: NODE_STARTUP + options: + node_id: 3 + 33: + action: NODE_RESET + options: + node_id: 3 + 34: + action: "NODE_OS_SCAN" + options: + node_id: 4 + 35: + action: "NODE_SHUTDOWN" + options: + node_id: 4 + 36: + action: NODE_STARTUP + options: + node_id: 4 + 37: + action: NODE_RESET + options: + node_id: 4 + 38: + action: "NODE_OS_SCAN" + options: + node_id: 5 + 39: # old action num: 19 # shutdown client 1 + action: "NODE_SHUTDOWN" + options: + node_id: 5 + 40: # old action num: 20 + action: NODE_STARTUP + options: + node_id: 5 + 41: # old action num: 21 + action: NODE_RESET + options: + node_id: 5 + 42: + action: "NODE_OS_SCAN" + options: + node_id: 6 + 43: + action: "NODE_SHUTDOWN" + options: + node_id: 6 + 44: + action: NODE_STARTUP + options: + node_id: 6 + 45: + action: NODE_RESET + options: + node_id: 6 + + 46: # old action num: 22 # "ACL: ADDRULE - Block outgoing traffic from client 1" + action: "NETWORK_ACL_ADDRULE" + options: + position: 1 + permission: 2 + source_ip_id: 7 # client 1 + dest_ip_id: 1 # ALL + source_port_id: 1 + dest_port_id: 1 + protocol_id: 1 + 47: # old action num: 23 # "ACL: ADDRULE - Block outgoing traffic from client 2" + action: "NETWORK_ACL_ADDRULE" + options: + position: 2 + permission: 2 + source_ip_id: 8 # client 2 + dest_ip_id: 1 # ALL + source_port_id: 1 + dest_port_id: 1 + protocol_id: 1 + 48: # old action num: 24 # block tcp traffic from client 1 to web app + action: "NETWORK_ACL_ADDRULE" + options: + position: 3 + permission: 2 + source_ip_id: 7 # client 1 + dest_ip_id: 3 # web server + source_port_id: 1 + dest_port_id: 1 + protocol_id: 3 + 49: # old action num: 25 # block tcp traffic from client 2 to web app + action: "NETWORK_ACL_ADDRULE" + options: + position: 4 + permission: 2 + source_ip_id: 8 # client 2 + dest_ip_id: 3 # web server + source_port_id: 1 + dest_port_id: 1 + protocol_id: 3 + 50: # old action num: 26 + action: "NETWORK_ACL_ADDRULE" + options: + position: 5 + permission: 2 + source_ip_id: 7 # client 1 + dest_ip_id: 4 # database + source_port_id: 1 + dest_port_id: 1 + protocol_id: 3 + 51: # old action num: 27 + action: "NETWORK_ACL_ADDRULE" + options: + position: 6 + permission: 2 + source_ip_id: 8 # client 2 + dest_ip_id: 4 # database + source_port_id: 1 + dest_port_id: 1 + protocol_id: 3 + 52: # old action num: 28 + action: "NETWORK_ACL_REMOVERULE" + options: + position: 0 + 53: # old action num: 29 + action: "NETWORK_ACL_REMOVERULE" + options: + position: 1 + 54: # old action num: 30 + action: "NETWORK_ACL_REMOVERULE" + options: + position: 2 + 55: # old action num: 31 + action: "NETWORK_ACL_REMOVERULE" + options: + position: 3 + 56: # old action num: 32 + action: "NETWORK_ACL_REMOVERULE" + options: + position: 4 + 57: # old action num: 33 + action: "NETWORK_ACL_REMOVERULE" + options: + position: 5 + 58: # old action num: 34 + action: "NETWORK_ACL_REMOVERULE" + options: + position: 6 + 59: # old action num: 35 + action: "NETWORK_ACL_REMOVERULE" + options: + position: 7 + 60: # old action num: 36 + action: "NETWORK_ACL_REMOVERULE" + options: + position: 8 + 61: # old action num: 37 + action: "NETWORK_ACL_REMOVERULE" + options: + position: 9 + 62: # old action num: 38 + action: "NETWORK_NIC_DISABLE" + options: + node_id: 0 + nic_id: 0 + 63: # old action num: 39 + action: "NETWORK_NIC_ENABLE" + options: + node_id: 0 + nic_id: 0 + 64: # old action num: 40 + action: "NETWORK_NIC_DISABLE" + options: + node_id: 1 + nic_id: 0 + 65: # old action num: 41 + action: "NETWORK_NIC_ENABLE" + options: + node_id: 1 + nic_id: 0 + 66: # old action num: 42 + action: "NETWORK_NIC_DISABLE" + options: + node_id: 2 + nic_id: 0 + 67: # old action num: 43 + action: "NETWORK_NIC_ENABLE" + options: + node_id: 2 + nic_id: 0 + 68: # old action num: 44 + action: "NETWORK_NIC_DISABLE" + options: + node_id: 3 + nic_id: 0 + 69: # old action num: 45 + action: "NETWORK_NIC_ENABLE" + options: + node_id: 3 + nic_id: 0 + 70: # old action num: 46 + action: "NETWORK_NIC_DISABLE" + options: + node_id: 4 + nic_id: 0 + 71: # old action num: 47 + action: "NETWORK_NIC_ENABLE" + options: + node_id: 4 + nic_id: 0 + 72: # old action num: 48 + action: "NETWORK_NIC_DISABLE" + options: + node_id: 4 + nic_id: 1 + 73: # old action num: 49 + action: "NETWORK_NIC_ENABLE" + options: + node_id: 4 + nic_id: 1 + 74: # old action num: 50 + action: "NETWORK_NIC_DISABLE" + options: + node_id: 5 + nic_id: 0 + 75: # old action num: 51 + action: "NETWORK_NIC_ENABLE" + options: + node_id: 5 + nic_id: 0 + 76: # old action num: 52 + action: "NETWORK_NIC_DISABLE" + options: + node_id: 6 + nic_id: 0 + 77: # old action num: 53 + action: "NETWORK_NIC_ENABLE" + options: + node_id: 6 + nic_id: 0 + + + + options: + nodes: + - node_name: domain_controller + - node_name: web_server + applications: + - application_name: DatabaseClient + services: + - service_name: WebServer + - node_name: database_server + folders: + - folder_name: database + files: + - file_name: database.db + services: + - service_name: DatabaseService + - node_name: backup_server + - node_name: security_suite + - node_name: client_1 + - node_name: client_2 + + max_folders_per_node: 2 + max_files_per_folder: 2 + max_services_per_node: 2 + max_nics_per_node: 8 + max_acl_rules: 10 + ip_address_order: + - node_name: domain_controller + nic_num: 1 + - node_name: web_server + nic_num: 1 + - node_name: database_server + nic_num: 1 + - node_name: backup_server + nic_num: 1 + - node_name: security_suite + nic_num: 1 + - node_name: client_1 + nic_num: 1 + - node_name: client_2 + nic_num: 1 + - node_name: security_suite + nic_num: 2 + + + reward_function: + reward_components: + - type: SHARED_REWARD + weight: 1.0 + options: + agent_name: client_1_green_user + - type: SHARED_REWARD + weight: 1.0 + options: + agent_name: client_2_green_user + + + + agent_settings: + flatten_obs: true + + + + + +simulation: + network: + nmne_config: + capture_nmne: true + nmne_capture_keywords: + - DELETE + nodes: + + - ref: router_1 + hostname: router_1 + type: router + num_ports: 5 + ports: + 1: + ip_address: 192.168.1.1 + subnet_mask: 255.255.255.0 + 2: + ip_address: 192.168.10.1 + subnet_mask: 255.255.255.0 + acl: + 18: + action: PERMIT + src_port: POSTGRES_SERVER + dst_port: POSTGRES_SERVER + 19: + action: PERMIT + src_port: DNS + dst_port: DNS + 20: + action: PERMIT + src_port: FTP + dst_port: FTP + 21: + action: PERMIT + src_port: HTTP + dst_port: HTTP + 22: + action: PERMIT + src_port: ARP + dst_port: ARP + 23: + action: PERMIT + protocol: ICMP + + - ref: switch_1 + hostname: switch_1 + type: switch + num_ports: 8 + + - ref: switch_2 + hostname: switch_2 + type: switch + num_ports: 8 + + - ref: domain_controller + hostname: domain_controller + type: server + ip_address: 192.168.1.10 + subnet_mask: 255.255.255.0 + default_gateway: 192.168.1.1 + services: + - ref: domain_controller_dns_server + type: DNSServer + options: + domain_mapping: + arcd.com: 192.168.1.12 # web server + + - ref: web_server + hostname: web_server + type: server + ip_address: 192.168.1.12 + subnet_mask: 255.255.255.0 + default_gateway: 192.168.1.1 + dns_server: 192.168.1.10 + services: + - ref: web_server_web_service + type: WebServer + applications: + - ref: web_server_database_client + type: DatabaseClient + options: + db_server_ip: 192.168.1.14 + + + - ref: database_server + hostname: database_server + type: server + ip_address: 192.168.1.14 + subnet_mask: 255.255.255.0 + default_gateway: 192.168.1.1 + dns_server: 192.168.1.10 + services: + - ref: database_service + type: DatabaseService + options: + backup_server_ip: 192.168.1.16 + - ref: database_ftp_client + type: FTPClient + + - ref: backup_server + hostname: backup_server + type: server + ip_address: 192.168.1.16 + subnet_mask: 255.255.255.0 + default_gateway: 192.168.1.1 + dns_server: 192.168.1.10 + services: + - ref: backup_service + type: FTPServer + + - ref: security_suite + hostname: security_suite + type: server + ip_address: 192.168.1.110 + subnet_mask: 255.255.255.0 + default_gateway: 192.168.1.1 + dns_server: 192.168.1.10 + network_interfaces: + 2: # unfortunately this number is currently meaningless, they're just added in order and take up the next available slot + ip_address: 192.168.10.110 + subnet_mask: 255.255.255.0 + + - ref: client_1 + hostname: client_1 + type: computer + ip_address: 192.168.10.21 + subnet_mask: 255.255.255.0 + default_gateway: 192.168.10.1 + dns_server: 192.168.1.10 + applications: + - ref: data_manipulation_bot + type: DataManipulationBot + options: + port_scan_p_of_success: 0.8 + data_manipulation_p_of_success: 0.8 + payload: "DELETE" + server_ip: 192.168.1.14 + - ref: client_1_web_browser + type: WebBrowser + options: + target_url: http://arcd.com/users/ + - ref: client_1_database_client + type: DatabaseClient + options: + db_server_ip: 192.168.1.14 + services: + - ref: client_1_dns_client + type: DNSClient + + - ref: client_2 + hostname: client_2 + type: computer + ip_address: 192.168.10.22 + subnet_mask: 255.255.255.0 + default_gateway: 192.168.10.1 + dns_server: 192.168.1.10 + applications: + - ref: client_2_web_browser + type: WebBrowser + options: + target_url: http://arcd.com/users/ + - ref: data_manipulation_bot + type: DataManipulationBot + options: + port_scan_p_of_success: 0.8 + data_manipulation_p_of_success: 0.8 + payload: "DELETE" + server_ip: 192.168.1.14 + - ref: client_2_database_client + type: DatabaseClient + options: + db_server_ip: 192.168.1.14 + services: + - ref: client_2_dns_client + type: DNSClient + + + + links: + - ref: router_1___switch_1 + endpoint_a_ref: router_1 + endpoint_a_port: 1 + endpoint_b_ref: switch_1 + endpoint_b_port: 8 + - ref: router_1___switch_2 + endpoint_a_ref: router_1 + endpoint_a_port: 2 + endpoint_b_ref: switch_2 + endpoint_b_port: 8 + - ref: switch_1___domain_controller + endpoint_a_ref: switch_1 + endpoint_a_port: 1 + endpoint_b_ref: domain_controller + endpoint_b_port: 1 + - ref: switch_1___web_server + endpoint_a_ref: switch_1 + endpoint_a_port: 2 + endpoint_b_ref: web_server + endpoint_b_port: 1 + - ref: switch_1___database_server + endpoint_a_ref: switch_1 + endpoint_a_port: 3 + endpoint_b_ref: database_server + endpoint_b_port: 1 + - ref: switch_1___backup_server + endpoint_a_ref: switch_1 + endpoint_a_port: 4 + endpoint_b_ref: backup_server + endpoint_b_port: 1 + - ref: switch_1___security_suite + endpoint_a_ref: switch_1 + endpoint_a_port: 7 + endpoint_b_ref: security_suite + endpoint_b_port: 1 + - ref: switch_2___client_1 + endpoint_a_ref: switch_2 + endpoint_a_port: 1 + endpoint_b_ref: client_1 + endpoint_b_port: 1 + - ref: switch_2___client_2 + endpoint_a_ref: switch_2 + endpoint_a_port: 2 + endpoint_b_ref: client_2 + endpoint_b_port: 1 + - ref: switch_2___security_suite + endpoint_a_ref: switch_2 + endpoint_a_port: 7 + endpoint_b_ref: security_suite + endpoint_b_port: 2 diff --git a/tests/integration_tests/game_layer/test_rewards.py b/tests/integration_tests/game_layer/test_rewards.py index 8edbf0ac..56ba2b8f 100644 --- a/tests/integration_tests/game_layer/test_rewards.py +++ b/tests/integration_tests/game_layer/test_rewards.py @@ -1,10 +1,15 @@ +import yaml + from primaite.game.agent.rewards import GreenAdminDatabaseUnreachablePenalty, WebpageUnavailablePenalty +from primaite.game.game import PrimaiteGame +from primaite.session.environment import PrimaiteGymEnv from primaite.simulator.network.hardware.nodes.host.server import Server from primaite.simulator.network.hardware.nodes.network.router import ACLAction, Router from primaite.simulator.network.transmission.network_layer import IPProtocol from primaite.simulator.network.transmission.transport_layer import Port from primaite.simulator.system.applications.database_client import DatabaseClient from primaite.simulator.system.services.database.database_service import DatabaseService +from tests import TEST_ASSETS_ROOT from tests.conftest import ControlledAgent @@ -80,3 +85,25 @@ def test_uc2_rewards(game_and_agent): state = game.get_sim_state() reward_value = comp.calculate(state) assert reward_value == -1.0 + + +def test_shared_reward(): + CFG_PATH = TEST_ASSETS_ROOT / "configs/shared_rewards.yaml" + with open(CFG_PATH, "r") as f: + cfg = yaml.safe_load(f) + + env = PrimaiteGymEnv(game_config=cfg) + + env.reset() + + order = env.game._reward_calculation_order + assert order.index("defender") > order.index("client_1_green_user") + assert order.index("defender") > order.index("client_2_green_user") + + for step in range(256): + act = env.action_space.sample() + env.step(act) + g1_reward = env.game.agents["client_1_green_user"].reward_function.current_reward + g2_reward = env.game.agents["client_2_green_user"].reward_function.current_reward + blue_reward = env.game.agents["defender"].reward_function.current_reward + assert blue_reward == g1_reward + g2_reward From d33c80d0d61153a7fb599fefa6d209d3b0e602fe Mon Sep 17 00:00:00 2001 From: Marek Wolan Date: Thu, 14 Mar 2024 14:33:04 +0000 Subject: [PATCH 010/124] Minor fixes --- src/primaite/game/game.py | 9 +++++++-- src/primaite/session/environment.py | 4 ++-- tests/conftest.py | 2 ++ .../game_layer/test_rewards.py | 17 ++++++++++++++--- 4 files changed, 25 insertions(+), 7 deletions(-) diff --git a/src/primaite/game/game.py b/src/primaite/game/game.py index 84e5e7df..05b76679 100644 --- a/src/primaite/game/game.py +++ b/src/primaite/game/game.py @@ -139,8 +139,12 @@ class PrimaiteGame: """ _LOGGER.debug(f"Stepping. Step counter: {self.step_counter}") + if self.step_counter == 0: + state = self.get_sim_state() + for agent in self.agents.values(): + agent.update_observation(state=state) # Apply all actions to simulation as requests - action_data = self.apply_agent_actions() + self.apply_agent_actions() # Advance timestep self.advance_timestep() @@ -149,7 +153,7 @@ class PrimaiteGame: sim_state = self.get_sim_state() # Update agents' observations and rewards based on the current state, and the response from the last action - self.update_agents(state=sim_state, action_data=action_data) + self.update_agents(state=sim_state) def get_sim_state(self) -> Dict: """Get the current state of the simulation.""" @@ -458,6 +462,7 @@ class PrimaiteGame: # Set the NMNE capture config set_nmne_config(network_config.get("nmne_config", {})) + game.update_agents(game.get_sim_state()) return game diff --git a/src/primaite/session/environment.py b/src/primaite/session/environment.py index 64534b04..1795f14b 100644 --- a/src/primaite/session/environment.py +++ b/src/primaite/session/environment.py @@ -189,8 +189,8 @@ class PrimaiteRayMARLEnv(MultiAgentEnv): def reset(self, *, seed: int = None, options: dict = None) -> Tuple[ObsType, Dict]: """Reset the environment.""" if self.io.settings.save_agent_actions: - self.io.write_agent_actions(episode=self.episode_counter) - self.io.clear_agent_actions() + all_agent_actions = {name: agent.action_history for name, agent in self.game.agents.items()} + self.io.write_agent_actions(agent_actions=all_agent_actions, episode=self.episode_counter) self.game: PrimaiteGame = PrimaiteGame.from_config(cfg=copy.deepcopy(self.game_config)) self.game.setup_for_episode(episode=self.episode_counter) self.episode_counter += 1 diff --git a/tests/conftest.py b/tests/conftest.py index 20600e73..3a9e2655 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -531,4 +531,6 @@ def game_and_agent(): game.agents["test_agent"] = test_agent + game.setup_reward_sharing() + return (game, test_agent) diff --git a/tests/integration_tests/game_layer/test_rewards.py b/tests/integration_tests/game_layer/test_rewards.py index 56ba2b8f..cfd013bc 100644 --- a/tests/integration_tests/game_layer/test_rewards.py +++ b/tests/integration_tests/game_layer/test_rewards.py @@ -1,5 +1,6 @@ import yaml +from primaite.game.agent.interface import AgentActionHistoryItem from primaite.game.agent.rewards import GreenAdminDatabaseUnreachablePenalty, WebpageUnavailablePenalty from primaite.game.game import PrimaiteGame from primaite.session.environment import PrimaiteGymEnv @@ -66,13 +67,18 @@ def test_uc2_rewards(game_and_agent): comp = GreenAdminDatabaseUnreachablePenalty("client_1") - db_client.apply_request( + response = db_client.apply_request( [ "execute", ] ) state = game.get_sim_state() - reward_value = comp.calculate(state) + reward_value = comp.calculate( + state, + last_action_response=AgentActionHistoryItem( + timestep=0, action="NODE_APPLICATION_EXECUTE", parameters={}, request=["execute"], response=response + ), + ) assert reward_value == 1.0 router.acl.remove_rule(position=2) @@ -83,7 +89,12 @@ def test_uc2_rewards(game_and_agent): ] ) state = game.get_sim_state() - reward_value = comp.calculate(state) + reward_value = comp.calculate( + state, + last_action_response=AgentActionHistoryItem( + timestep=0, action="NODE_APPLICATION_EXECUTE", parameters={}, request=["execute"], response=response + ), + ) assert reward_value == -1.0 From 88a3c42f2fe3f2a0d9e06d78cb49c7bc4f0d7885 Mon Sep 17 00:00:00 2001 From: Czar Echavez Date: Thu, 14 Mar 2024 22:15:27 +0000 Subject: [PATCH 011/124] #2369: commiting work done so far --- docs/_static/notebooks/extensions.png | Bin 0 -> 70034 bytes docs/_static/notebooks/install_extensions.png | Bin 0 -> 197959 bytes docs/index.rst | 1 + docs/source/example_notebooks.rst | 79 ++++++++++++++++++ docs/source/getting_started.rst | 6 +- docs/source/primaite_session.rst | 4 +- 6 files changed, 85 insertions(+), 5 deletions(-) create mode 100644 docs/_static/notebooks/extensions.png create mode 100644 docs/_static/notebooks/install_extensions.png create mode 100644 docs/source/example_notebooks.rst diff --git a/docs/_static/notebooks/extensions.png b/docs/_static/notebooks/extensions.png new file mode 100644 index 0000000000000000000000000000000000000000..8441802d34e1a826bec15cceae3decaca24b38e9 GIT binary patch literal 70034 zcmb@tWo(>J^feYU#q5|F*Az1|GdpI8*&8!6Q_M^;uGuj&GqYo6X2;Cj&F|k|`HYKcBjVLjP4rJ^yMO22?yUQKPB6q!W?W&r6#w`C;j z!y_x*qwDbPz-PAzaHv9Y!Q*r=p3Y{GedC$sbP%<^)f1FKh6WD}S+_Li2Ll-({2i7o z>7NO4MJP-R<9d$q!3`?nNARNI;!!6>gSTZM^n5taV)(HA^3@<{`tW?;()BEMn$N=I zsNTb}-f1xTX27z%G|mJ88nWk3DT6_F(YJ5Q<#6n^siQ;SS4MZL(JThqyCotj4m@-q zL5K!YVTKaGQ^7ME!6dPsImFu5c7c)jonkL7Ye)=LpdV*vlJ8>f?VK)(SU@MW*x&!t z>(s|9>c{H0%j@gjStX%$kcX;aV&&)gRGJ)b3<0nEBr#~nG(zG%&Liy4 z5neDBjUC}~QnlY{!n_`(x)~j_+o@F?w$!4$u8}Gq#|kEh@xsw{r={U~D3DW7KnZ=k*0mRf?Suvg*AFK; zD!$yGv9%cLGJh@p{hO}+<-D!g{fgX>3+7t{c;C0in7YJORN@I&c%`wXa)e@SRvSmi z7Kt(5+b%i@2so{oxj!ZW4>7@&Lng5Tuv}a|e11koM#YQ3JdV5PA4Vq|nvciDIh8V5 zY|E0zL_9c(KCpcP%!mSd9S()JXnJtbp{q+R^6cr>3H7!6GxzFxv`+{@7h1W{SNr{3 zWy@V>`BJgOde)7$>k*8)jo-n}E_L|{;p5});bQcKA_tX~(fhvLY4Q{}U0z)U1O-98 zKTY{vw@*7h-vT|#$gmbySKB1Ak1~7v`c!muez`Q?H`LO`vpzc#1!Lw^0j_ccgja(Q}wdFh*)LS0^7W;~f{ z2<^|R+;-da3Hx|G6ne!!UvI++f<+c}aBwI-Tx>Q-O-lNHy*I+`d0P@7;>ZDVD)Q1F zK~0v>(ZTP0e?GO+*px>!8>kVmKiNm6i6+VHfZFo7$*Mjj`uU7c*KE$N-x7?p*&g^j zM#cZWRf=>=Hv~(LBoOgP zo1QhKrQnTeZ9iH9uOW@wfm}~d&pjOvsgUQ^pJr)j!%}^7~bv+ z^XLS>hKvh1tqV0ZHLqNSG8#DATeA9jE)km>{A$|DE%9W+E+PRjrGy#Ehblfqe2}}I z3aA;mxugaL&K*bissd`n{3lMDqY1>n)Q6%@6{Un9#xA$}p01K!wDg&0W6%?`WndTMtG?UeiNVJJiqM@N2xoE$s1O@3k?zMQ`@ zer<2V{r)eGorv`U!Q> z@*&A)#E1;#nIx>rab>cY9(TOmueL)bSk<|nt+*m_pDE$|qNB}fV^Igek1n28b;Xd0 zglDV}9aKv|Ia>>DRhWqGrbSG>RO(xQm?an zAR#6D7li%YJ>1_U4Y}|l>b}DKTqH@F`x!Z=s}S`K43nXl{bW6$TRuVNQ3;Y%vgimB z$Ezw;QG^753nd(O-Ch&vM-^ySc{HdTj$`ntm>_tCM+Qq8 zAWiD~xDD4CJ*glwMX0{uOaxGh@SnNMJr(_unTsg@CGJ|>VKS3vmfX;0;8823e^}3_ z#^f$zGGjD$GOQeX#Za3jsrjt1wpR6_yTD3vQCYtW5UVaIn?W{E*r>7J>H>Y@sc_tQ zK&FT)Pi1$@OnzFIf6ir+)GBdUwHJHB=z)$1hf2)uZm;&F>K%A3wK{j2axEwNdk#5K z6lihbzhOcgFgCra?9z!fe<l!hDw=Hh`6jRx(MI(+@!N$bKhrAJHKU7tZ%rO;!stLur08TdcIYu~C^b~6q zr2(Zzs~AasPBy`#EpOYXep{!`{8n7(-?Ua@dA$LGB8x!`9Ee@`(=CZ|KC3oOSFFkm zekKg_IJ~H>w54kP;t4ak_u4weZ@iGQi8G#C0dV6B+AE4X<$5HogQkr13RFbM9Cgzi znlVxf<*l}}E*%=v9H20Di>9Doy{1)eCU+8gPd)_rqjLLb;m>jdB?5-sySUdS&^KGTT{dR0xHmJzLs89VVA;sSbe6y|I63&cmIN&?=pt@X+m z6aoRIL7~u*o={?9V)2QI`KNc(0m`0dB`WC*wvITwd5alzCVC|UWA3YMUo zVq$&S*tONW(?utvTtr)b_V7wFkrx*%bw5kMLZyD&=M@^83MOa$5}ClYGZMeo_^R2v zqPK^?%diZUb+IaO7v$YW`>_ky2IrjM-#9rE7;yWWypvU&R*g1N>_4^M)xzpfQ1N`Fo zq9;Jsb8NRiQ10nsaOKA%tlU>_742)J>rEeZ159v|cS>^8v4LH}=Y>|7BNSOQD9OIC z=)jekq9#;1bdl2u7{d6M2?n`N*xO#@iCj3`Y%diIJY~lIQFqebAP48BTqrwgX#eG; zoGlw*JDr6lN(=7S_=oKGO!fKbJL$=L8dg!CISBHq=6OEAEEiIMV=e%j0NH{1&w zro_Ie_#Jm5zTmM=(51)=!`NgEAUfL>Anqwo+{;=d@^WBJX(0pp!(=0_x+!0fnG;&z zV5^!d>VcwqkVIN3!5gV8{Q`4XcQ!Jd()8Vtm2)uVyQ?w2p@Q^;u->N++Twv7{DGeK zov?g+t-GOGo8S&`$r%TvlV^#voEv!Ly4T)Vm8>-DuV zmr773_T3cnZjOwR%PqsgxRRtfPCWx(M|3TSA2sLIjYg4;zFtlzg;Mdhe-}w#_#S%A z5f=R>A$^TG4ULhs#-ul?!@3dcVuDaTUh9vY1hj5}Sfhic<~$twZB8$tV(fV zXe4D?Gc9naT3{zG{uim#cPU!lAT+A3LBP}E8I!oGy-T<|HL=kOQ{1a3!pR=9*zfAo z3eBq!&d*m<;=@Mzk%~C7O+8H}2ah5p73In6mwYVZ8w+OIP4LHu6lh$r+TJzj+=*tQ z-PXpR;!?xecCkr4Y6%O-S5j@7;Ojoqz~$LTf|?7dib#u@yky6KD8j_7+P(^ij{czn zRWN~865M%VZDd09$W*4mX+Fwz71~es1jG~fN1o2D%DlJ4!DM1#-=#@f7KfHAtk#>e z(WOU+g<%;9ZZ))5QV2i)G_z%?+r+L&gkm(JCfbn9Z&dzf%A`919jhINM-OU3orf0P z)&ALzJv1db;=yH!m6{cwl4h$DXZA;Fbjeb+942s*3exvYPPtyfprJp7Jn8nq#H&8U zvb{Nb-Rsm)ecb}PcS!)BB5Wzp1yrzcMuQojR$@@ZEVY6kR?WllrS$jy?wX^AE{^CK zYlfqb&44N|9nyT9HRY7i)#jWrKIT&Nfu3_l91Krm;a(AyY9}kmBjy`g^4M22cO5+`Qe6QO(`n98T@Vhks^`P}kjq)&op5P77XTRbyW&vpcc>kz*Qw)U~Rd=$-N z9Xo9xeW1Mm@N;ZV+^_!Y)Y6mv1qy^~$oc~Sq{v}>^&tgoTkUS$s`!kHYY^V~#gX8~(4i%oxKs)=X?8D-#k z+FJ`BYkZ8Qzq?$qGM{-z__`}2QR1vks2LO*IL&u*Hnku^6Nyjip2i>YAWsPiO~`)) z6BG%2@E3U;811gw)Y0$}(C-2!qEqY52+ic$X#^wS`o^yGPs|Au`m80|(<#vOhMhct}^9_$xP_IG!;4Vuv-NiJH+W#B>JfTS7rThH{B0s)~8h!xsCuGpQo$mx3g z(2npwYy!;xVnR6YJyCnIlqUPD>1kB*Y~uRLcT2ANapwQzlJSG9DySx^kM`j zB30i)xYs;;GQ~yL1=&kf`vzjLGT1FEiPex9$TK`9Aj-d?w{*x>0RN&pqUir(G*$pr zz88%=;sk}lq|F*y=(3W!o=sLtCWn4PJyS#_V4wv9+0)S5s_csXKjVg2=7X05N&nxf z{!in4$|igSOz<3WbzZ1L;YFZ=gbkEGO$cU9{q>`^c^F}JXAEebx()^S)< zGPAN&)JpvvMSr~@!(Mlpi=ndww(~cht8LOv;AL8t4q~GwNan)xA}ptMDP(; zZZDMb>V^Nh&#_7?d61L3i|H{jF@X$5@yUyy(M6YGLT11i8k1VS8^_Sw$W>2M)BN@E z>hkVRLQ)d;$B!R-)05jjh{rSlO8C*ChFz08&*c;Hn$5&U*Ar`9|Sh&vN$+6{r&x0 z(;zWUq6<&IG*|Y@ris3UFv)yRDY}ivN9N!A_G-`@FOV1)=aGFR?ZNXxCnh==vVSCj zu)lvMQY-XwZF&baSS?=f|6Q(Y7j@&P)N2Wh6?)f7omyDST~7}Ug}ptQk2JJ0>Fw=x zMwJ#>EPftx(R#ngnclq@Z@(P2Jeq*zsD$^mM|eM+G?-PGJ1Ukf{8+VA7-f#1+nLQ-7(a#KV^#F63H-Lyy9 zd%&}@vU1QO$7gU>t(+ooa%83jOkz|mHCSmPMMf-0#So78Wvt{>LUhQ=E^7H$%bAtu z3SwskIkeDvuu9T4jioZ(?3V2U7PGk>_oO4Q$&wuNosS3=a|9>Gl4GPwZp2@R1ijNp z`sR34i054VPvl))IX7b`CD3hL^i?O5V?cT|g;Dcn($fteeI)PQeguZPW;tcMj4mms z6+;~EDDQ{I2=)`}-N8=9qqWWhM^Xme?b2JteqEstsP$Mfa@d7IZEaq)uWfQ-$v^uG zDXy-scarC^C@s}{N<>x7zKLn<-yYA#XJkZHb-n-UqL58)Y;I2Lf|cNUE6(v9T`$S7 zZAB=LdO}w0>gee3kPxun`XoftD&pwq=+1jMnYDY&#mRZnAH^Vn*!6Uf(UMW3?hC_f z@cla}A`;TmX&NF{?AO;gGO@=RTE8SiUhH*-q+%t(Cuobw%x$iVxl*;KiS*>;fiX%t zx`?hxaIgvjGbOvJhQ8Y#;FpJn31@}Vc8$AJ(POR4uS>DNWE_w=8ol$64ElJx@M}>n z8H>1%-hk0S4b{rxL`)u%sVhmQ`xci&b{=ZT}VBs(gly?`~BMg65VH>Rns7Edt`nt;N$ zqi1DpZeHGN=VM+K{bw+@$LxHh{Jv7*So!|`{@Rq4Ma0C0!5dMW1X6uZ(ky(XJuj3? zb?0?{SBJACDYT_qtabwQA>40)!jw)^Fs+qVON2h?eYw}5Oe{8H@gQ{mu4zVjQYT=( zw?jJ(&F#E!r5KBK9(!d+VgIHtLaS`TJ1SL3jsp=p`V75w`Askq=Ru2V-vWFuHOw5y&T}AK&{9URE`p}pu&KSgUR{O_M@#oY} zPl&v}-b}rQMn*;L9j9Bpkdx)}({hcJsue#P{^o`b|H&I`x<1W`fzI35asZE5+^F38 zl;Y(_?S?Io1_F(R7co6IHo_EGA{pqmVBY0Zi?mu(1bn#SMNi{C!mhgx#ibEhch^($w>p5k;AF|3~ht}ss1UCuPvFVd!EXAKmqz0LHc`zfqwD%ICCxb1f*RcCg&q zt5@din9n}NeJ4omf*er0FgXS-vc#SGpq{g|$(yoxGdrqd4aT6Fx=`X`k}qGVRFFId z<^9M^&u7coQ9m9j%*)7LlaW&v zoIkt-8-LQW_qT`5!@yFlQ6l6l8f`nu1ZP4M zs|4``e#F|9BfVpgse*s0uQK5-D~qO`bpWxRI@}1ky4b!bHhD5;p;TpCVCgjtAd9K% zb%vBgeIX)bndde1Ot;CnY&m3wOlkL!sB5S8Wg^Xf)xO!_^^3MwF`nyzScsm|kEw!PT;0S`7n;bJTyrQZY$_2{ z&4^<5Rq)mqky^#^I>OT}>e_WAx1A0eOYVz4Y4nb)Q_Cm&xw~`Qae|xy9g_{DtI|qv z9n3u3X~#XCtv@FT*(#%EZsb#Nzp==yUSoh3TMPdT}4?O%ndU)pP}kh=es6M zO4+17qt-HS>4EdSIOasER;NS7b+LlB>Ar#V^uC5I>ZnM*H3E7S;7WFl|CLpAXchf0 z(e`u`u-+9|DeHzkYBeyAE;}WHOMo7d+wFUKa!eY+v5@z?10)rL4yw>#RV^;+m1T4l`qdP|B_$Hm9I&^ z0P=Xp;X39rwi`}5DD}d3WY+HtsQUu2M!o$p1oTV997b+akQv*(28gGM8loam%iD=u04Zq zMy-tCXW?7%ZLmfYxqSlgLZHHgpW*$_xKRn9nUeDVnwDj`f{B}E>UtG`mBZ1)tiKiW zV6;8hi5>zKBSHVhPaZRxsNifncWm~6b94o2d6?dC0&me`UH@j(i`&@MZD%|dIK4Fh~vXGYtuNML3w%(eZr z!f%SeTiA) z-Q`w+NO#RewJ*I>*S`HoAR%JT#whLxUDB8A{^Qa6ww3<@GkNo($GpbaJ2Y(Z4Cdr5 z5>yFUQU91N@T6JFC_e}DA3}QSz`TlgTJ-Dz&FYc;f52y9y2?=K9n`wf;dK-H8~rw* zS1$GIHaLyrcALCsiD*PBv;vq9DD{wL_Pd>O?M~0LQkngSVRUn~dyW#jZejs&8=@SIUtQ9B`BE%ekBvx8DveXGGsN>>k z7ChI2FSu>1mw0gh{sHUZgo2CJ)#c?8vIS6cJ?fbi0=?*Q#B@3vOA5mI$X|tFY;y3v zv;y{QnmqI}+4hP0SVY2ArXlO)bc zMv7yFp$49YCurPdobD#7J1{khl98U^i9Nxep)u-nc_s~vuBid;a5lrZoaFuXJyP0g zGo|m}sHkZ3as%qk!nw3@1|WuIKrTUURHF4rnAY>=7;c9rhejRM<&rA4G5!ru??H5= zWK{gx+oZ;n{K=aRXM~+PAzeO42c~Y6HBveWn{-(dWtSPrQSr0tu(1jBAZw4T!dBM= zS<8CJu!(Ig`S&x2uDi;n-xX@4XlbD>8+MbQI`=9cikrR1GR*bubxw!6c&8=v{b3M0%ZTbLTt4771r^6`sjgGcD*s^`Ogun70&h5R9XFHY^$h;6-l03kxPAITA6{ikR2(O z5q3;^l1g3ZaRm-^l8<-&`$$Dz9TSBjYuutTaaw}-LD~psUu4ovUSY zzJ|gfw4&dhH_8ZVMUXJTZO67pU&q3?zEY(4lG?HLTH{A?D%80$qFs0*K|{)|d7f5q zcC=a|dS1MMv0uWXj-!e8zq4&s6jP6#t7+pr-^bEW?mxDL3z{8i8Z5}I(bW_**T**C z1^*YB2w**792P6}*OD7y2SCk@<8rkBxSk&5k%si<2YiZu=ZqeG@G0Z}H%Z|CSv;tO zw7qQOA>7XIMdvR`&WSyTtUuAW3llMMxY%>Rom+*l{Lw#v$ya@L%AYhphR%zARp~~b zmKha&`*w9rSTN4Q1=S`zogPdPFyE8O#U*y5&Wb_p1*$DUdn)wzvnPdI`%3Pl&$?i} zIC|B_*{GWYm4{A35F#>}>Ttc}Kq#acVi1&nwH5T|65SQpL`{|~C}#A2(-L_86V_J@ z(tc=DHGV5G`pd(BNzVs0#U06r^e>WFZNDd21Jq(tkCQti{S|=2B<@=nv-<*$@v0Yz z@y){2)l<>K<@tT0MR0LzQFu z(obbu=9QLf?S(L(id4|zfELPO5Xc`fdt_`!>{~M>2P%D{I(3D@&fW@Gd1R21cO4B1xYtM zXpUOXzCNSdXbf?uilWx=*P8`Z=|!YM?g8o~bqOrG@4d7G(X&38RVH8;%T&IN{gtiq z9dA_MJ{esk_^~W$lIeqniyqBKBSq$1O+&c%T?D7-f}J5(X?+xWFyUt*S*)Lg>c{@@ z5dxVtGGLrtDdhq+dVGgn}^gr&!=vSu{G`f5nZKYc>KY#C`7by zuu%i!@Fd)`29rT(98T=*8DI0NyDz;kD=Ex(MuawF@pk*r*o_&A)?NVEgG$W@HtFnT zS9jHVZ2VKCi9%UwaeYic(%!V@LYonz`Rs6g<}&+RL*`VOy$ZQLa{V>Bz3Ev&mS}+| zs`$N}iNf2xi+s4y(%<>#T9Ij3NUc!Id=EW7teA!0dAbQtv5h#e?a}2bOjrT6af1*v-XJ1Du}7ysr%CRMj-MclC=^%J8Do z-Dcb>Vf0h-_*;5S^Y{2a$l{Zuy)nd;G)4|2D1!BD^!09zIz@=Bc3M}fyS88{=wZSy zlD@yndDh$_ouMY3Cu*2VKVlh0jvyswIF%q+LSU+3G~(`s9Croeq?Dk}`ki(nKJkrU z6t7lC ztW?_1qM7rgP+Xi|C=WA6OD64m2mbAqW0eO zQrYzwPsilEGH1^f+Vb<7G0~{&eU%ZM0;iX1;zt2v8gsA-_q79am3-&iY7xR-W*A8e6_fMtO^N%>y z;F-6mc2J(q=V}i_SGa~+HSFhNkE~of0k~LvXUcHW3BCck7%J$KH0wJ45^V#j+;G6O zaCM4+atf1S%zT+<{(`!fEga|;i+bcND#W9fnKpTXEl@~ALB~C~R)0}M?3`n>m+l*} zu8GTPVqwMaYR}s&9@&t2?IdsXzOYuJHcg5SR#>Z)A(1m1O`kS&0y!Eok9meUzeiS1 ze4v4jF*Un-YRLvaPN4U@@`A2^dkowmMb=5t43G4fDWe7x+k7?;bb;-`4Jw1=?*gD?E3_=h6PnR_i0qRF2oU`>Db5 zW3`bHQ(N2fTgzGFRT_^|QM)<*v!k9aDJTg#MrJJqSAP{nF{Ya2zjbIItMqKg74uNxwmm71TP7tR-UMd~j$Cu)+o*PTwZ~5_N{+DkV zV0Y?SP+V-XTcohmpOTqL$fKTDS_HY@wlS36Q0H*Ii3)la=EZL)v@8dRsqMpbvTJ0D z1vTO(w+VJHH+}r9yP(Q-{3y1xEfG_mR*;tWh6NX|x$lGv^(`)HDn9WB>$z-yMQSBG zbLx2DCbu_53w?6O|19q2d=VzHQTdnbnoaP@l19-@*uu`Db>pJrf!G(!Me6z@#0te+ z?GDvVo6lh%Zm+e)##b>)SX13sc1$xF33%S(F@!A*esk*pV`YgIhNKOg(dm+_&@zOK z`kH%k#gA5k&2w6D54h-`$MT?ZFhxH};%ACoEdZ{t+g_Q)ORakkAN9$Y)?0PN6}75% zyFi+fLE2(@jxDdJ!db%ygRj6!iHs0Ow3lyQUr{%GJD@^Rc{eLMe`N6}L^rpa5RKMp zp041Z5oV@sdGvrDgt^__`+6$4{t7(zO^zVDj$d2oMZlF!?)Ye)?);f?2x~=E&~x?QBx;G&*P|cIuZT2Zpv=~!MeswUbcR? zG{Y(+nf#K1FBG0`sMZIZ`7m#TURZP}sxTEAxLZy!t>0T1DJXP@=Fvty&tx*?yrA#D zX4?~dL3;T4Vsv4BO@y5RECGmpo1|8MYY)-R75MWpMN)Gsuvbxp4u-MLjMmtr-N#DC zgZ5i{4UTqLE4z{!S_>h_Ws=?N2Isu+wW=4KjYxjTcX!KoHGv2H*?+Nt}ICPA*# zdHMCGw%7oG{5V`M)Y!>#f>I5t--f%Up^}OE2>h9^z+!0nK{mE z@+l)7Q8-Dd^3`k6h@m+PtYLKXE1GG5D3=b1joA^xy%Cm~tE&FFOVXFVyl2GaI}WrP zqPMG^xWG~8fTRUA-{~K4Gx9d964Hj5u(kBVKYkKWhx~A>N{E@ty*#QFn3j|v7f$UY z272)#2JWJb%+43fOg}M1siKq&WH-@X3~pOjF{&CM_r?~TmJ<`7XE7?gk{zloO9hTn zptOcBetU6zd>Y&DxAcg)=GA7afsh1_;TDkP6c1RL{`S5#BQ0D+UDoyIc9oA&>6}Q; zaqj&4e6c{zO803cFL4@rx?2e0?kQc=XOeMDgC|Bkw!j;6;UrQe+r7D}$Ax7wwdbkk zx#8FzjhI=5X(cEcn`&2{lhdaLm1b;xi_IAx_Re8&z-0OHvTqV+Wby#4YCi5IDm9~3 zYSoCMByTK{#SroY!XROPe}8>)KS;Nzwq9oa>WGB%wf~=flL=<@359$K!34{|VUAx+ z*V~yL|76$u9aA>-88{}Z5WCI){w6Ig-3?|Co}L>df`-HYQtOYe0U8SofA))RoU2E? zg*CwAg4}w&rC=c1nn)Q#226@Yzqr=u9hcS))~p84Xtle4X)DDc7vbpZqW(?d2+W9= zrnAh;OJ^ST;KujoE!NwzU-4L~fery(jJAr^x!!F)Fo?F%i_b zXbRDTAsZEB#Xgv;LtDME?TpCDQv;ystI%6oz0Z#GN1H;f6TdHR>aK86*>EsnGUBi` z+KNyrt{r>%ns+wB-^VGLTdn@9v23akZRkZi__m`KKTQ{UM}MGkObfBU zd~q1FAC4n)-%r+Lwpw8D{WCf?)*{hrI)d>vGlR?S0Q(>ulg1rSwo2B(YANx<94l(y^w~vl*JCdbGxCcUwO9{G23c`yudDQ?zTfwhG80h9_rh--9#x<;g zGS(-eG4kY)?yf*NCQk(@ZY0k@05*?Il@DJvl}&~f7G7x}P}Ma$bD=271?8$(zbqa9 z>?gKX4u?vH2^_k-d58{|^!GHx@IRA)MaB3Y#ZVM6U@lKP3FJ5`9*wCe8H0Q2>?N*f z{hU^P%pgr`h@WkzI~uF+x9(y^^ZR<+MQS!SRbQ@r9w(pwOioR|?hP;!fRUb!hN~&A| zy3G_s{kzDM|I1Lv9MC%m-G6c;^0k_>wFp%2tjBHRo~WW-V(V&??jWfp_zh@P0_+i% zk0v{%BZ|9O?8R?LSKYAqp5mHf7?xWpMGaK&A+s_JFLT}X`J1_S1 zu0oV@QXotENDV6(yUIc;?n1;>f6%AyR2VPRw}M!%M*n^l>t}zOfXiYG{jtg;PU@YeaY61>Cf$gL*U93fu4Ec0uv|=gPEnSGDv6J{ z)2U|}RBYl|jlFEXTJ9KEW~=#^dCzr5>s!W3w-=f~IeZIs1!qK6eRR5!R=q*yAT_C? zOk|ctJT-=sIynxDf+6-=G9h+xEu>k~eeUx?3WKE0oG3wPZ^@c{+2T+A!jj`w)~!|K z@|REIWvi;C6yb+u4f}2lmI^-c<&x`S0sI8|%gVgv@4qYE#G}%!lx&7tjg;n$3T!jL zS5)|_GkCP$*9#q7T=o}qy`*Jj6a4V5_frk?>^3`_kBc&zb$wpWnr^g%rJ)f{Y>H!k zeY|ac>~Hsl%ILc!kvMkH>K)V4Jm@W_GR%SHf0N!|1pcTQ>LllhEAW+o;VvCG{mT|M zt(CUT98vn)O1{y04`kgv`rNA9k$==+b8~ZX4kkNdZAijI zif67yiy%D=^RQ4v9*ka-t-T*34FGauYs|h24C866So_*=aW`W|%?dujM1F`ulS#Ds z+Zw_{-@iG`VSO&$2-B}O4#Zv+2x9i7ygaR>00`6~h3OY>#kZ)w7e`g}EuJXG&D7Zw z2qD!iIfQALZioHV2cZ6nlsebECJUK$>f0^4!qwFEPux9_eJZ%GXwoFhAZf&cs~tsW zeL!EMx!}qbo^R7}fNn!vW2W-`%4e}6h~lz(O9b=m1n7pqj!m7|ax^U+m2VZn89j~- zT4gG$jv!f^;YgSvR#x^ma5}v98G6c+e5U^}QXR>yH8xYVcO+~JtrybwqtYL3EWFM? z6@vcuQm|{k1#50GI<;ceVg5d}0L$3R zhh-A8?dun^Gyo$22$cS(*1K4?{FrAM3S%6g%k9aPE_*SE*{Jh}Zu%Q#~6*hmhZDTIR z9SkCRw?|>#JDX^q!FAT6l;L2=);LeTtgaaid-l!J=NvHn?X(Wg5F!3=ig?s?8s71A z2bxV1>%<)gch@!^`@EKKS&;y{9^F98L$<#@p9N(r@325L`?(UwtLSvcu*YI;(;xk# z`^u(lbIUGYA`S_!KVB>{)lF3b0E1`_@y>AWYJ3qZQqWzIcz6V-d^H=UW_Zf#s=#=9i$Ah z6h9(RnL*z86Aj}q7TAR*B!0Jqf)Fu2P+P3l{DcC}fBfZm8p$SZ1)J|F>tx+Ppuf0v z|X609{>gSsLR#$@!s~;$5SlK09f$Q`EeO0bjh4|JZd(V#S`^B`(#-@lULe_ zJy#)SsOfBffm9p-I{IVh-qy9YBfEx_Y|2_%5wlJ^q) zf&j9pewxtSeqZtoeq~3Jk?uL59niY{xMntSfE-Mzl-fB>FG+Z)6>s_?`wR10=;H|$ z5pnK#JGqpZ>919f}F+b$>Ae!@*E~ zp0sL<)s$MB`)h{zuMo|5LCtM z=-ef6C-@D+?{bi;@jvUkHenx%h)c$&r1UM}GhM5|P_)gAU>{ty5x75=s{2JIa7S5h zrI=4eZPq_Ge*5}Yu-qIjG&=_~Lh=>zKpIOte3Rf#snhgYfOev{%Dq_xe=i}gKIHvV%xV-7#iJ=F(ehQ-z&%I3OXSlGQ zl+?JkEae0$@b$#^#3?QyJyt6CdP|#N;-8nRHlv023Nwwp-;99mVxi9zhZ*NvrNulP zK@==K5-9#i{wACe;)cN(b1YL2VheH$EHj66!aTa3*DMVTI7+=a7;Wu_Vb z7{BQnZpjZ@GyED~=#-b3slAK)ePmS7l@i6#R<`x91UU{rO@4ESl|hYp>^fWi=a6tR zM~EqG2}R+^>tGyD&`if-b^*8m-vrlWd~I2}TLeRyKwFjTyP}56)159vrT@GU_zs0{ z&)`;t6{aNe1@f@nhg*=8FzAP?ksm@GSqF{L0@3~OQw?liSPh-j?6+uz?uZaI=h;$^ z&1d-Rw1-dU>6|c_b`D}!=d$wBo)AuUco8CM=Y3FpWAVwFvBP0Gy*U>-0enTO?II<# zqXRMrFYdtt{>2AV+b>G#?C?09Qv=#56tWMcG{oIed|HqFe{h}m-S&(lUgImXaoJNs zP#3-*y(M}$i79nCq_M6bYq!N*vSB#mkfVLfIBD5`R9w2agf-oGymGan^`I7ipT8F8 zf8OfAJ#$A(_c*)?6A}#7ec|a5*mGUOU%}jOL(#QvJl4Rba#_=IY9jIV;MjPLJYM_^ zG?d+a2BqNneDpHS>E{338&{Vn1WHOHa|a8we7PjS>#>%h*2ov#)^~*G;h0&#j!Fx9 zVuRb2z1L}P#o(2N5?4LiF9|-M_`O?t)~nb%|`+T7)|$Z*d1dOjVl63-%vlYP!o=uFb``Xa=wbl(f3cL7fcMjx@A37*Nv_v*qN-iV2&o(-Le!h|X6OhGRoCu-_+H!P7<+Ndvlt9L;s;awF zI@;0mcz!1h-rNhUUC*c~E{8?t7#N=9{fQqd9E`#saRoG=Qj`}Km4|*cOBJ#VPC7qW zH!CSE6S=y#v#(x(3gC)#l@4H>6YIp&$^Fwj)>RJnR`p4*99XoojMt(3IA-Rt&Ym)R zglM`w!)GW8RB$=w!oy6&Kqvf&K#;oz_%^T?)mqZrr+QG_R+hrMm@E{8RGnVqZJbsL zKcw+|`>~MRqPlu*G&ijr`j=zecum#+*=Y7^ZztrZc?v)(t5P%w7lDqM8fW>hNJR?; zL{*X5_uXq;?392zT{*PJaY<`$YBZ{hMI#ENXm=xlh2r+80wGo;XFHS!1BO4~oi(T9 z8tP;EK=1I?jzHaaaZ<)-_bz5jjTs!U!iDs>Ulje&6j5Q> z;zDo&mc&FNIayFMzx+vqeASry^l=o1c6hlLHX!SbW~;~J=5p&% z#HJad4O{Kwnp!f|FQSlS7-CUizoabLPbaT&;e>$KOlU7Rjc2XvFCS%CTG7D}dx4D* z+{7NuRc`{7G;TgiyeqP!peM<)MF)$3147DI4~%$4xSHclLzYuELZ_6`97-QL3}lat zIA8y>nhT%yshPXZQ*8zh4}|O}$NnCrg&q3D#1U+xk9XGQ;EA4@!=f>xz;g-a10go# zHznVI`HPfp#vg(Sh7n=6DmCBxyOIKNE>OdC7i6u+N&NAYsH&Au>pi+#9{Q!OzBj){ z7(6+c`dz_Xk1}*^EE4}C?fb(qJuX_vPIf0vcj_`JA! zoOuej_X3U-o5@~BG_S6+6o-ZOg5%KK=2jQU9wyw|bwr^i^Fa>wkc!wlz^ zN5igbCb(;G*Wm8%?(XjHE(z}L?vUW_?h@SHC1`Nxbl&gVyY|ekGgIf(nHv7^gMvk` z)v&ss`@XJcc;$^-VV47zl6v=Q%}378<=o<&w2`tT8iDRfV?{8L8*7x3t2c& z*g;>!QkTZ;+PI$1*O3G#lvP#^0!?BUwSvIFz*{%yz!>4qHJ~oP13QQYP#38P=M%Ld z<_0WgG6;d}%)4WV{@-JnVGYZHPNaDZ&>?F`VFL*D#os0Njp^5Yc+2tr@!f?NoIQ}| zF9rd?*LCn#A1I;ZI$Q3{+13J``q$f@B)t8ONm{+ zQRAk`YWN-^b-m3()Sl+`9{-yrsZ(h4>L0F!E42<}xS8Q*EE4CG%WVnM;^?=oLF74& zHD2@1E$mr=+=MSxG$YM`uuT}Q`}2h1*<$g6feH6dF`)_#J!lqI5s^2l_QI5c<1~uU zpU{5JdxVd~9v>-MoB#?m0#;#-A8IrCk9!-6~P4srY0hz)}3I zm(@@u&3cSdo%z}0X!)g3L%H)|gE#+^kv3`z~4K3K(014Xv; zO)$`cPZAPLOs*H{?#N6h)IiFG!s4-Ys)q0$IF+I7WN2It8RE0P#A=f8Do*M+z~O_) zs}!E?bE@>hzomU^W5T(9gf>WJ13jRCpua7IGk2|UQj$^Kvucv;)@4Hf-TQQ}DrJ4XJtNV$a zA1oF#;yWKUhiaC%C&t@#_QH;!F1Vp$Q^3E9Z0lpraZF#aDnF8xmIU4uDZ+({hG~Q{ zI?NLOX|q9nDJCIjgoplt6$WeIZ5Q5K;Oc}c2cl*+@O_X)a{Ms>!B7Px!Orl`sT|@4 zr>{$wu9Iv0A=KkT+slqUyDSHVJlwI#L%I9-orbxyYxyg*{s%A;)eeo&QBdtqhmEVsx^f+Jm!iL^5$aSRNWl$sB=`W0MztztKV$AW z#6(RNOA6fNZ`GvE3E!3!BY9C3y|B*z_tr`ismK-La4XR+CnbCginyLjvW6?oD9XYX zDazSUIt}N*ExcKyfhoQ8V*AG7>?Ps+LEgSP;>P+|Q?djbo&Ey6thD)N&k`QLDY3CN zxl?%nGAkQciC#?AY8}MO`tY8-m{j_9xhRZ(TrnX(hg=o=bz|OPikt{=?<>D$sgdX8 z4r(kpFdL^XVr>VNPPlP3gDUhm*Try2sBiy$R*b3|#cnUbWGC5hID=d}Is{CpKe!pF zEBtDxT21idhCZ`)Nrf0V0i!2U_2fYM9;U#Ktgy-TRMJ`XV>LM1ddUEu_R>7VQ?eM$ zv-sOq<@HY)Y;T383gi`uoWg4u6BH$OBQotI$mEOOQcOsmm}>@RKaJ)hZRmrOxzg&$ zgNz+di1cez?$B;tq%a0@K1*$7AbKeA7QM5ha1;aHSNTpS%hhMd{$%yquXXS-Y<; z5aO(GUZf3G{4wAhz@DL}{YE~n)#=#(?WSDwDe*2n2t04=Oe-5vkmVr?1*nvWHz`yu z2?8AA?U#d5G;$oW-+IFpHv5T~UUgDz^w>luvM0M4p%pyu18k;-=^NchT67&=u#33p zbM_ckORF-^2U;o0;SD^=tcl4{GAkfQvdA_cF%2&EB6V9bB3h#!Gz;Oy1bsf~x=*P3 zibT2?D7>e(BN5_4u9}zGU+TOncM!Sm(pXv7_U>|Op#A7o2$&j&RwziC9O;^$M8SAT% zJ!OF1V_2ys4T6R9nl03qVsnUJP3eN4h)mS6Zgu`@TAf4y%EQ{0FA8lKBJ@+EaLn)f z1WcnJwHv_@e>XNI1bm$8h);I-L5vhfy+QNx6Q*`6><1&&eb793Pa8tR^b+mvk|k@R zo;4yfQBt;ytSmg>2#5r3(v9zaFJwPQI}E}og)DqI9PLvqGF6S=!RpP;GoxiNZLbOp zS-0*AR{hCiC)ny)*D!t)pG^jSI^%vwfu1tCyBB%hA6l1cI<}axNtHM$-7mbB*`=Cv z4HK3aTi*5q?KET5B+JL9I5bDtHp!{Qj{oU9S={oS8yD53Rv?ekjq+jg&rF)^KRyp1qbZ0vIzj_z-jKgL z8w6;H>jk0UV&44WGKiVr$=X_3wCsjkq08?Y+R*fcuWu$4izP5#N;s@l&A_;`6lQS4 z*8N$HfudTd2nRQk3vt$z$UNzYP`3%Ud@^$c75@2>Li#~0p9*zU(vl**1~YSs`SiM2 zgtRLuVBwUVs8 z*w<4k!G6t=v7{|C#^`HuSm?5@UFci;$FOG4Re>#mpqJL0++?!W4)|JX;-CaU+t4ka z8+dAXZkco*teBXXYjm_0fuy(wd zXXoZ>9p}hxjHKn{VsNQuRFuD8>t60ntgdi8T!t$665>U#DzT^~<^Q+_(Z{Bq%oo&- z8q+1%K3nr2Sb0EEX#G%TVV@_WI3_10=L=k3*5LUwkXspHk}B2`UxG~R*-t_vHROHS z8A{-GW+0Y_hl1~q3wWf=^M94mPWHFD6Oia@M=VR7>3Zku_j%nOGixB!MwiEbFMHpHW+&pDr5&uOD8~$4J6rr* ztm`(l==gUJ1HSFed&&p;!jO?Iycj6d=UEd4&4!J0&niq-NdE4qb^i0sdcgOpg$(_k zmv?1$++?Z=`!}+^5%G$KFY*ERQa-sqcLt7?!O<~X^^1O}^|T0QiRa&jt1c{264md< zua0!*$jj{>eYPqz>m(PUyq#3j2-s9(3d!}*s{Hnb=oa#~A2;GOzKEXXmjCg6Our@$ z`0BmTvqGZ+mp15E_lcV!u<>0k0>4fd>JxU9bQ6YV{Cfi1A829~iP*#ZY-u4ez@+SaY}MhbwyVt~YnOHiZ=b>ShEnlUZsy2VT~%liHDM^qb~#5T9X2&FB) z(DCB@iw&qR6uc#xCaZ4QRHS;z^2>_XLZ?1|mTnRog&*+mjCQe4b@kzXiC2q!TNWIJ%gs*DOcGmnH@C&X;%Mvy$lpL10U-^E0<&~dDoeYW5(853IK6_PY zvIU(q*w#|0UcEjDH)ZKt>hjr#LhndUKqDziI22(gQJ!x{NaCCk=5`3d zaeoAvMx*A_&C%2_^At~@>3E7`ympHN5uI+^z}~>{@ZRH}J&iUOO1_U*=ht(4|2@a| zyK4VGES6gUbA8=Xu2v}oSkUe-x2Be=X|YA*OoXWT)92_#jCPD~_w6mgA7fxZ-0TIh z>!)W|eoRNVXjDDA6dvbZO<+UmSxi?IhyM=MSv4a~Af?#pZ=m2X=$h4*Zm)cd`5hY2 zTzsR~Q4ICD7Mh0L2i99+;Im9ok?|q1&JhZ>Ju_KC(*R?C4F_G355L)GYoj~cnjmtj z4Bq|ybM1yOAE{AhR7Uaytqn%mq&Wt+x5qB~%#IK%r%l}`)%M1p=d+xak8Lh+C@z6) zhPuGh)&Bzs*dYjYl5@k5KTqRt(l3Piwo(`!*>y&*c=?{daS2jvI6l!q&l2+*uI`xBv} zr#DGEOD3J-u(RIb$=u8!pT+TgeqQBCb<`TZUW#uqQeBR`{xu}{CbRlh;B$ko&oZr$ zgk8c34EFaE#X8u*coDTZef^Wh_HHZBo8#%-22G;c95-#sUlMb$m>Xr+@=@6_5@)^Y zT&GNsmNF7#QjQs%Y$>t!(zwhF)UxKbIja$8h1g)xN~wDgsyW?#_?kXG#s$cEo2dte zr*7o$R_+fLP3Hl&Q99%}Dr&e3XkfANr;zy&l__9|Qf@e7evmOv)Z!UQUdp7+wHQ*h6AON?N*g&F3obojOpfGG$6m4puV} zkOE+GI1v6-8FX~;Jife)Gk%YVfO&V{ABhKif`^NwwEpimx!Pft=G&*0);?CepuTxC zIf?dAbs!Dv1v_@lyX5IXtHq?LGR@1=n<6P9Rq+e+2~8!o&?u5tTPm|MOWH|6@jZ|C z>Zw0=;BDKmdQvzR^R0jIT35~c?#zitI$s~6BLZc`X$_=THDj7K2-iXM+og>4i-N$z zDxze(cKkYX<1pI4hxgik&-HDU92yc5QYM=#xqZpL^A4R{He;Y4`uD)oL-$8Ca027V z^ZWtp0HFTYxHu$0$RPdon+dDZ5xnfi;l)MF^t8e&@b^E+|NaNjP8WqlENa`I8!7|=epZlU2Jo3W0qj(NF``?z&?|J*@)6Ab68fTIKWcaW(3L!8JP#2 z6KGL*a~&jRtgG2*wl-TU zUj9CxjP5iF6ysh}W?oPFFns+@L(BX~BAfU1 zNh}-tr(-(pSR?~MDGLdX=owFuvtlW=bHgW(IK0$L>g-aj-wo|kL^`9)%?$_lrd0jS z`D4s$KYuf_i$+>ggl2}UA{jbF&v*W26Ar+^8Q!qF`y<8d#F(8Su+cCt?w_buTCp7Qf#Z*zNnXo9Sq2XL|1PNyfqVnZ z86C`rRqYo{oGPIJqmP?Aohl*^uNm&X>G`#piaVkF0j6-*PYXR8U0AD)$Ryq6p3u)S zEc)s5=8};{lt3Rah>F!9Pe^Xp+o3BvF-7%r$BtbbAB1oscRY8K`W5a*(C@j2yFJ;R66MpV;2foCLu5$_g zxb%S76RMf?K=Uq#z+7UQb^7aWaSrZ$sk*Slg5FEs8-ecgo`Jc2G4zty@fxRk%ntbUZsnzlRxg+@H8HkTUQrsi_}0mobstO$MDE@=HAkouza} zyB4uG1hfO`s`U!)_wJtBYpqJRsB+aEI2e4ALWtG94)Ezz_Q-&V2Nw8YPIfVa0hED; zRn@o{{$i`*+|$@!n{Q~P!ZUV3WhipRoN34L>M8JE9t)4IpdHR|KBXG&?Htd|8QIjRDoi?S2TZzZ9gS-=`u+2+`tsWjJ}SXA}JoZrwm>+nN2yRQ5mZEy1~ zeb>JI>)M>lS!R2eAA8gJ1AN%;yHgk(s^~M7@m{eKOBP>L+unr`l7H=QTFf+O6 ztmiSuZRU%8rYHcDx$stKB?ZQw_oPBjXgUS{3DqpzwqumTlk;iD*4}qau|2TTN`i@2 z#c(_+@6Io|5@*q+Ock~b>{?uQ9$>l6xMev@M_a|_+AO#YTnp4@SlyF8ds;$~NbCTl z$lA43N&N?nZi)}wO&wRbYWNl})0yRDNxxeuIVU1)DtKbY`MW}Yb`pS^4QWwLFQN02 z(+3S7bG*mbHBHwFjf!07S2M8oq29iYNP}M*4`UOh1YGn#4xaugc!jZA*!(h~m-5TM zIi!4AY=!YWEt@upC7n*TMOry8USXDdt$D)@=lTAede{Kl^ML91B(B)oiI17B)r^Wh z?C-_=YHF^Qhv2y$h1+BHjtzY~n{I`70z1ERXs}Gb843AwB9l%AyxFJ>klyG3Ks=Qj z5j4%b{CZgK;BUh#!Ylwm1di%^>x?Qx+_$nxoHJ;RB zmE)-t-?ZjVX#zSi@XOgs(?Nr54$UIjC-;F(;H=?*Px_eu`Um9TM|2_{lpPCcd=>$C z)(`BE$AeQw;~MnA_LY*2!Rh-}cuH#&#-=(IsI5RNuY49Kghl0wQrgVTeTCim!lI`i=c4sPwQM zb+X~2sn)mE(bdqSa;VZsUtffM=fjWV_ar?|v8a8oq<0`UVMCWSv(_&mwp{U&P`zcC z)t4U1*igOlw)t!ZW)c6?wsR(P2xJY+Hp>i;&%bGrGe&*>W>Bklz)AZfjYH{oi{3X3c8V@yrTPJ8iz9;1C+1%0?P%9|MSJtXus-7NHZo$SPWi8V>>S6?oXMebAYAE3Minm-~AVg+i= zDL0CWogQaNd7R4GbIXLD<5GBDo{as2u6L+q=Y=jJVB2tz!~7}1%k|SgcjIFReHdaR z!uxT6x)h_yWdI z8LjjsjK+!M7Yx7rO>9w8b1ft#Py|DHJMdR=F$V2~@P#r3k5pVCx#)&QaFRoV_le$? zgiiEoTKQh}RNge-ul+9PBU%~BuY`RB8L{3W7JpQKJ9TvU&~{bhMtS3te1{cZf7>bh zh;N-?*?UYtj2m}z#kzx%SAV(Vukkr?s`&M@XFDA_%(>(Vwtlq6FF?8uulcS^;Smoiv2;q{UXnVSw5Du843B0XpwJW z@W+6~hVTjys;Ev6w6PRp`vQhho@1`U-+Ll9AC0)PgyiOrn_O__A1Pt<>LnRpB>8lX z-Fgg$EBJa#J|9U zBzh&sNIKt);x%QpD5Df}TNIr403&uWpp1|Q?LtM3Lqh%RzY+(JO;p_O>5gUf+e)G1 z4F|X4USRuI0iKcp>|LCF2)YH!#Wnq@2GSVJ{7k8Bz}}x~)(@uobp-4YBk8P&u}B_O zLG#35=}RAIt9EjoXW5~FA`!6RZlk^go(O%~=pQtz;cup!P@UFPLK|tUmOH0yuiD41 z>UrMmCn`Tyeymi@H~9qq$j^scu}&LoDgJcVU$Qqk2#frSMlpsQX(Ukn}lPoGzXyeF0sMe>$<`JA!{&(4)68lCwQe0$);_tJD3Vu(o~xy&BDSHt!;r3k@8{rIyRUx0?%L zZ-}fp4yhC2hu1_gM<)~87$O(eRmp2t7}6$q|S#ZApj?vYQM@CnUbI3 zvd@=5>FDduFf8_MsU$TyWWh(U4ULq9pjkG?`a`Kv7d)Ut1R9e_>(l=Z?J>}}4V9v* zg8wDp0F+xm%&Z{@OeFvR{B#gKvTtHDF(LpMBt*sqmr!pR%ivNzqUkAHW5uo^-1uDN zen2~=2{_yVni4KVC?O4xv_Ue9Z;kXo9{qMMcBRl{n@PjFa3P4`i{;Ugl`tc< zBMgr-|B(0ExJTGOg%J|SjL+Fy3PNzU|m#!t5E3^tN46md7N= za14NdA?7tho_8y_#xq;}T5pdMX}s$_K|TlRJd@aRM|qIlH1bsH{A-r*$DpUwF#Wvm zi>7PNSl4Z0;i_5f#G`yKd=OxWJU-!;ZQ3LSF;-{#At9`XT-i!w5-@Lu$x9Rjt75n* z*tH2lf=seLL}qxv;~8u)oG}D8P23CHB9SoOxf&pWqV&8n!lyI11lqsfG~sEebNmyb z-c~7W#uLJ572*x@`hCx2TKflfG0A1A-31WMnBn2XdJvZT{ID@AT=^M7*z1m zhM^45>wwy*g{zcg<$-_R!3wZYeJL%z1tckTS&V@E!++M}4S8rVcW9Csj`T-AQkNgI@b;$%6J9=Nimt)GYL{VxSvZE)&@W1&SRGh)DNHHi@ z-qU~LxlLtRx}S_}XZo%ltW2iXY({$H_&#$d)aVS*YQUq3X2jZDNR3kr)6Gf==~N{T zsA{ScK4i=uMeffw_voZU+fn>qk~eYyxl`0J&Z6JBF#Ahc&uL42#n$3rN6)_H`Z=9RO8!_*L%ap4 zd`g9)9p&)I6T^@V@SuPp&5enbl~tqNjrKoi>82*N&DlQ`#_+Cquzz9c6cp4kSf@ z+b!#Zj*hMuh{PT*Cx`MLk~LKlV5Q?&DFE~{FUP{QgMHyVG(vj3sf=69Ww9i}HS+e{ z7q7R?rS(nzLZ&vOt4nzp9b*eO!c0pc>qnZP#f$#XQ}?|B+;u%JBM*iDl5=TKEuQ@++plqnk*vcJYeMEz}GL&e-1Ewn~EwxbAj+CO0aA=fE^BKx)W z#hhFsV-~tAqn--ETy1MOg@1Q~ zf8`R04S)H7x|&XOSS<2;2LuKhnwt;%KOE110$WAcKYZWvI`}Bsb41g1wMdJbgG|_4 zcpy*u;L%+^0V*pqSuu#d)@LL)0*jSHwYPCQ+@Ed&+m(vzte3z4KjoYuZ1vd}m5F98 z89F=2ks3k)zxgDInc?QXAV;$?EgvIMQqWD=%b)%8HwPwbJT?Lwe@L?%!yi1M8& zc|&ZW(T6|$x+75Y@tv`XRI2-;ZTyGDElkyOfy+4q+tG8FE6KciF+4Ln5cO=Mb9>sG z5SOQ8XL}Ln9{)sj&7H7gdb*MLT3jx^!B@H@ujv(S7#4)4U7pp$4;w zxKUjTz#RY%pukn=$E^kX7bfdEu*KpjEWg46q%a;--lZ77^iN4BgyJH1q+IdepS z9TDt3@K)o__Jk1mi$x_VpUNEdr{88D&2-N3$5E`tGyb*O++USV8+uc-;wq%ktcDw? z{z$)_wrIkmFZ*>`*HcvbH$f)_^`i9F^&@r~k*PS!E6p^7sWp7tW(ky-3DrwhOCq0~ z@t{s~f1PK)rzuXc7^vF`=@W-zIGbVVZc*i9%g`xh}m#2n|J1 zF0d%7^~3?<`Fj}l!Gf2yk|5AD7kAYxpB-iY0?d;%Yy)i&?*WkkGZj99o$r3!WG_4U zkGbF@G4y5x<89tBe6^t4!N}T2-TptV>Nt*_tD%6zEfU*HyLw84Co3&%K#d;J*amp3 zZ?FCDaB~0-)H!DoprKi!Z*o8MKoB}spl{gN1Oz+Ap$@b210ZbE>DiqBm2Kv_zG`dZ z!WY{WhqWzS`37vG`c*1dcs@Bf3pszxe(rv@%y_ohiBoSrby!WK)B)^ade;uu)|Z#Z zlT`W3HlI%r{fli5+$fm%Dd~l@99O5>W$5cDKa0D)2ZWTORSGPVwv+-2Hl!>Kn(dI~ z9y$@tNN-K_Vyk>zh5rR^HeoFOenwWOwHqRtzq(Ogw8u=r(`JL%pcoG|U0f}`N;gc9 z`3TB zt9#oQ7l4ASNye6QY%*tXg^k{n!hTpmN?lzY;3h@&tZ^hIC9mm)5%77!{;uc&6wJ)_ z@)0p9W|%V4(*1z+SOMV01}A)<0q5(VK@9z?M<4>=MyJvE#{as5=-}wso5ksjgpB+h zz@B#jN}7U(W*`U}_3G0914p~rZV(7J2%-S(E|A`M0MO&(yfrW^56aCY;7`c_M&iQn z3v4`g*s<}CXzej7HIO<;L$P3f8?InB(M`l*AP5(I@i6*PIZQAlFS!HU)fGeLnwtNB za$?COr>P(+UeQC@!l%pjnnqtI2SyTe4Hmp}^L?(qz)@%ft1rIxh{oE*h_81I?XvTU zs4W`arne$BFPZOrT07>pf)NW|Vlz1MC3tXt~ zu<>FA7G{-R?mT3uC*QJPGv`h{`@S=Q55ewZYw9%_$Egk(qA-d6IUjJ*$>>c*E z#7n9J{D9U!g^H6?i9rv@aL>WB&r#X!J6(r2MCaUIV@N9JYr$jTQkt)j;7%EKYx{MR z1xzI}Zg{I#W^xbxo16H+htB$@=MmoP{hB?nu8SgfJD_5|pn%v83jvD>th(bGrk&B; z(U6v&{s{dfflT_Ux%&cZQM)iv z;l4(y=1zB^m0MLK0O{GQ|zROBN8Wq2x$V9|bHgMP~_>m%2qUrEH zzanX6F#{e2J4qjq{nyh;-3J90F%%{|3^|+>)&;DM{$VY?GRXl687$7rDx<1*p`6sJ z@;a$c?PDhbawqmZI|2Zth(7 zx8c@~i3-};f*BLVdnpK-R2UKiw3=;dgz;G(2<1r)&6t`=VhXKRQ&hvFg4kQJU~`K^ z^a&%U|6tmEvus*0Rfc}i`ECNmG6#cY=Nhq!e9_^{O&G7))+}z~xlaPS&y8B&> zDo}_0<0hoU&e`2v+`@w5{duW-m*C?OvY8Irs{D+H7>Q4&90TFKVX58yFR%^&0_NQ( zuRQd~xOCDhAuMQeQN`xLRRU@4dSNX+0uLvk(>??vrIx{Fl`lurx`4?#Tmf}}YeLLt z%N0OZwtl0wy_Sm>G{zNyX=tK|5V=T@8BXQOvyZLaVPn6x?m$JNwurb{h=Fx6q*XU- zD{2)16(+kaOP=+8cDg9#iHw2|?#3vH+^UU^R?j@i=lU>KVnUI3nz)40b!f;Z$xd_( zo%TjRhS#921ZT6va$u0dVJc$*C1Ht2OC8+iBC&FJ4N( z-e2e}H>o}LW_RseC1+T!Dk|R(tl(>uwu$5aQTm0}t5B797kvr-M#rTgto6Q?$5+p6 z6MSMUI;r_|N}RJQp*)3mp2>wK5E;@*ld5wQg5=Y_wP90p^MTt~p`A-$N7bdR+Cv$0 zl9OsM&VF$IMfy^-Qd|>eiRr=XucQ7e+$0ZCZMB_s5!DSwMaXK_4Lu5fU{m5Imh+OX zdphn<;Vf?V82Mvs9&XP68a!4tH)bja*kxS>QZfE!Qh4u=w{}2vhf7c}b8p2_bFc+) zVD?55V3R_pLyOb*?n~PUzqjW`B+1CZnM9nD?Bs1uQBsyYn_g&O6`!NQd(pv|&x} z$g(|nlhU3sI?YV>F9aN^6pH61uRAa>gMY-Y6~b^Fa&dhU7I3nLV4ykwt1x@{=#>Y+d`h{6{Q!%&me@`&WYdPiOCo%&XPZ{+`kE zNB)jZKJGGGR%lG%(nM-HndOU2*1yz37KJR}^|;x-c4FPFr`udcTpu+W*7?<}ZQ{H^ zU5HgS$r5e|eh%Ia{C56EoL(bDfPL95NYpaO%T5ZRo(_k4YVSJsGT-WQ_|>^7C9j&+ zOGXbWcE<6Q#MCz5m=^HfBKijZK+f@@oB1cj%OHz08~6fc=QBjF7mIPg9{lsZ!~lQ= z-`iQC@{{sMT`c=_GeDw)5;j-5&YRYzo9*>EA?8M?Qx)A08Gg$j71l~cmON`IG$Z)x z&h&QDXF-G%hKxOZ0@efM3cHwZ|U^hC{nxQM9_T153<`WS6FZ`kLwK>1ny%Jhp?J5!h3( zLE5FBcn^E9qEOJ;?~sWv7#2AOgu z#K!h~UH&Ba(9(+}N2JsI9B@q?K{P;=M1IH`LcZMjo))zkyA|Dgtp#h9j@D`gE0tkk ziYYe9z5%QWMU2^&keQZ^*bfMcf2U~A3%>9z{&!@zn`_$w(b87ap|Y)0%k;exdBW@b)-=CFh?q0R4Ttz+u=^d5uTxCcvX zw(xZhbVF=r0^bOS8tA_L8byHr?L9}Xj6W`7Wi%ZM$o8Z!5zXX0(GdKvnG*PTqS6j< z82RBiyszOVai_$dPfyUnl{J!>ZovotF0bRHJh=o#q1$(!chAer5 z+n2Kr^B5at&_s$_u9$yC#~FlMl1`4r2zg_UFqC}O=wa&#)75s?d&Z4rzdf=#sPTFs z7{t#)@BlZnTRwl_;rXQHqtA)?z$0c`uoKqKk9)_@#GYZcmLfW9I#0r*d%pD1b6qUc zP*26+VFt3B)l7VF&O6~3Xa3voLAi)l4)T}cq`4>t@d`Y&_(01$$BQLQj(pe-G4uct z-y-4@z-FB_U+=J6M>GfJ0t0ORQ`bL7z$rCcp5+)+z zbGKxgw6Lp=P8v7!_m$Y8FWb!p5Rc;gK@#>D9Bq#zUe{19Ivhdk^)}9^^_UO#gOE7R zd5sUjAB0WAJH#wCE(8(RA(5!X-jHG~7LLd2{erS67>>2r$0sE-?i_$OnNz~wml3_Q z5fKCD)S*Nop}U`eoalWMb6_23YVB)yR_D|7V(NAzFq<}yZA8E`RNRb9Dy&j_w+vs^ zDz`sQdW#D*I&}D`yNts%%E%y?i)(trWl78(fR#=mG>jS&S!Er0I`%cmy&Jk6Ak%2u zmlWZ`8z}MjAFP;in9!v1=eqkL!Ln~F^!&MLxa;8$pY+m8m3i&{0htHW7&0WkW@NRD z9EyI>+spVi3LB(!ZYEtQbQ?x*+Q$UTE&mg^TDLYxbJ>%GA0__m@MHk;hZ2ll2S2Wz zCUq^N|0gq^W>>l?BYeqT^sIdMq&+ALIxlzw{nCT-`VAs+9yS~{sZ&#LrZ+OAhn;4?7kmYkAD((~tS?dRxh` zt0I9qw;~n}DO}GPRfC0EQtPRXU=>xBkwK!kV$-H)96WJ%Ii9V`iOh(U1483_52nSY z^0>(@r>vAL!SFUpAy*n@(+Yk>lJZpnm)Cs(G`1wg%tuO8EN$j^ZM3MeTB56jzy%ds z%|PFay+2<`ie;`Ah=cL5fe;QcW^O6-W+M4$htc-gteF-V0|Ox;JgmyO(f3+XBg+x$ z0#^1QnK-)?z$*P}sh{Q^SKa*0j>$?oNgcY`Q8FZ;KZcc7;N3Rn=0u}2RkGL|3_Yz) zQ5H9Jms}GCALnMV4i|GVW+~&9AwOd8NI%R4_PjEQolecEP1Sp@m~B8U7t&i}Lir$Z zRmyaINK~MEsD|vkNvRPQXQ`?eTWfPlBpla90{U9&bGP<^YI=id$rvRPHmaVm&~LE{ zlStz0Hpr0QTF3Y*==h6&x9E8Ra%p8hqoX8c0m8oJU-3<%PA}^Ln!$x10Vn8GBAab2 zG_!-nF%V7mM%XAu$(dSiIL%*_z`*`R1*UK#0;pIW$xQUmIzkgI+^^)>!@=fI1z+7o zHsQv5um4ooFQJAc*D0Xc)pp(#IYe$6SuJ={*tM62z!uceU#ckCr`A%QBar+X7~J|# zU{G4s?v`OUptLDtgJJvCD#gE!FR|v+EjPr;QL=UXx0yk)q_NVWn)1XQGMJm1O=uXlP2_q~V*yx~(&y@dGhn`~*a8ligJN zmqn)nOA1fFCewB0Pqb>@>R5CPY%SG}7lkB+4v&v}FuY%4kXhyB5!X@JKnm@ljV-a! zs{;dhv$DK;vct=mU)D4!ssLf7gF0EeN*Da|v!tE)H?dW_sJiSo>t*PK=zW?t)%1VD zQ1n&wQ>N19iv8kBVY|g*>6Gl!%uyf2s|8MFs6BQ;v<98L31dckvvI+`)jt)7r4-_P z1kAE9v=YKxtb#T5ORZB(=aj~}eE+1<Q486L_AKf47!5 z_q0Ae**OlIjx!L6>H>dzc`!yVruMpb+1WiF3aYiw)jQ+BzP+_6|2-vb!=QK%u zET@q0$mdVtHiU(iNb|T6qQOnRm|{n>+L&%mBn39^t>omQY&^9@Ya1xHQph4DHFH=Y zSc+pcFE5qx&Kj-G`$?YucGJ9To0T;AsjFtTw02U~VGXbLs(5b0T>EN567iMXSk{Jj zvAZKaH5T9Ncw|X&5*35};IUx<IkgMnD^b zfN;Dq9vG=*oyX$i3rTpr2nC0|ABoRPDji?3u$>7qv$YmkJRUSN8Xj4)8#8w~8MIpO zav`b4#N>(&uNg=y8mgQWwOaAn!3NAiu!(&O7LWhpViOh zKoUxLGE{Wq8!t26uB5PmRHYiPH?yKmM+i&FGp**bJSq%rJ&(5%rlsJMQ){gPKZCAk zcVL;xwQs)ER7fgD+eRiQsS4<`XQM+TT85@&Qub0oSH2(uqx_{_Cz6*l!}_|8Y?C-! z{Qv^Nq`0whA#OowRTaJ|2HmLj5@sF9$QX;evU5^1y95W<-Z_$BbCEq^-`o1r)L4Sf zX2>$yi5q%xWMradJgLMbV5B}^o%3jE-#OeS6p3mDzc_0K_9juR_xB6yF$b-RRwE{T z?mS$V_@0NCMK5ykU8l=MHJ-FBTY*ahNfKOI2%EzNYA6~Hl)wA?gl`j_+hI^b%*OS4X=!QbOw|SQKVIM$LrJAmXOONg4qoc1=(@q6FZ}T%yc+TT0l0n?$#=ih^XaUN zV?EoScjAaE4D6J>Xa|G@O)k>;6~^cXD|M0U=VYlZ@zBPq3uv2bvYj(9c2!mD#0_G~ z$|O`&R1PPzWb^YnJ8D0$f6t$6Xp>Z*DY(V`M5*F@F%P_J8nV(;xpQ+s9^TZ^V z&Gn;RC>)txYe|P7;6+%@ zUF=6vN=R4(n@m~%N-t?cU=?x5I^{flcOtzL5**~EH@d}u6mt-!!a%xDgHvMq$Kw#G z;h-_{wbn4opJf=*!N)OcT~MMVH4euDjdxS1)_D@~n0+Dlmvesshnh{%ucwZ;$1@sD zXUV{BV_*XkU7i)sx@`B#oR>roY40?x6Zd}ClMI>Z}d%uH@Cm117nNqumfcOfZ z2ZX$TQjou+^v64~m+D!M@c$t09itUKPCB-2TOHf%*y`A}ZQD*IosLzpZQJhH z)>gmo%+Bta**UX&&Yt;HAM>PAsptRPzx%p=sIPrpgn4?QkIsbL&QPEzuf7T_jN2VF zeAJy^Jb|o6MSBEIv74QxXv5;O{Jw)eZ=+T=A-Tm){&C7R_sMvoYQ5n)biN#6)rlds zOwtztl(e!4l(00dbok$U9K!drqT)L_;b+zQ-W%Ge^%{B{%s-nAX6?=|R2|95(>QUC zTscX;z#|G=n(O02{+Meg2F!G305(YuuSH;579!2`g47J<9t z^XL%Oa;3q+Z=o3sqcP2vinREL=0%*e~|f(Us~W-)v` zqz=+!oIxd8TTJ?g)nA8*bo;Dm7r;DnM&nb;6M-+DS$`0fH0eaU&Ie8A`9X8OZzuyF zO&$I{kDXvsJ8szFWCmM(u;_ZM*HVg{zHNU;`-X+_m<@w_PUFPH#6ZkQeltHm*!Bg3 z9E4yqCy!fiv~b0&tZ~X&zK)P4KpRWPUp2CEgr;ScZ$>oXX=E)Hg6OA35X-6^SfL4X zN`4kaEPz6@wmdzYL8Ybg?C`;~uop;;zU4^pLYxLRXZ{1nUdjzh$FOtPD#*ho%(Rq@n1&xqdh(ltc|?ZUwGG1tZc5yRKT&`DXDU zHD6I3kssj7BDr(hVG{kNZnPrsCsMmI~LL#MqvS`)S%1T`@X$};v10C&oY;2S{4fw}+ zDuK}Zac7_IZe}P$#O`$jG$~;y0Cf8hy=dN*J11vLUjYz}!HlD~?JqeT)!S!*`gPV{ z2M^3?jSyH>zS`%e0ID+c6>O2dP}j33Aw8>zpdiw>x3`S34KU1xwCCo@LGgE_B4A(e zF*P72u>uY-J671DYqznFM;AD#?I&a5W;d-#(f|(vB=zVYX(yKb`M8ZZzs(i-^JPTt zCmVhm(6ha#IA<&ru9?aZbk0VoA8WcI<%X#V+G0NZ3Ob<}9a#qhkDDoVV$*iZ#Ro&> z&1qDLtXx~+y52h=di)LXo(vWTFVQ`tGq+23^h$dGA<#(pT?^jZnPd!nF_{Ugo^e9f zDN5%-TLm#pSvz5ZAbiJk)er#GSJiabxh$m_a_%s{ZD51K831avKuBlR>0JR>V6h5p zYw<~=$~HmGsr=?s$0zC%ApRUmJ&*Yc#w-2ZGW20vycu8b>*W~F_N+ZJUplAfBAP+> zO5Bc%CH&dRR8cDsl7Hk;Ot)x0Q0T%{QIWXw<%Bkfz)o2~Vj5JY>%miUO>_?|vMZ7` zL+5bJG;k9VtRN}0CRU%(8KC7GQc{}U%^t`s#W+G=4^fWFV`e`J*tjc4fHWW;u#%(f z3z-Y$7%iKd{$qDFDX!{zN2CBwWEec!$`L}L#I4>*XROvHZLBRc*>*fFKEcdPQ*huy zN3Sd}FWU`r0XObeHE6ZNgT&ApEfDmp$z|gz_kto5j1Y#SH30snhq;zp{0Jmz^nJru z&_wVdmQT^E0Ljd)E28MR1tMsKJab3Q36J22y*3Y?Q-224@AD3c-S!P})9=&AdJPD# zbuPwLW%3(!XlbYvjK}G28eW-=PRpea%k}O`Y{A!*U=Mc@^BvBzXkQqoxZF05CEvwk zn}Im0&kjjDtOyJCQjpMG%f#fVw>0jpo_>1b57aIZc&axp9 z8oSZtcRT9#&P^QisZ2)fGAWT9%8n4TXdx}NDxoOIvet2|d4wvfUIl|jek|T?9#DBX zjm`^rK^SEl(|9XS#Og)1Jbey8++W=lX z-ekL*joXK!PJ?0c(B}u*ddVv1Zqaw&b(ciHIcCR&^9&3ND}v=*V5{yrADc5DX^Ggk zu*Xwd;c~1-rvyN;8!TyjzVqr|D8Yu-_ZV(M=Ty?1dWfC45RoEFHS@0rS(||1| zJ$ughY&R~^s*PTtyWI>%e;bG_{x!>zq9_nN^v?!8Hu@vqxe?-sh65H$V{IH?o_NgN z0JfHlZV|HaQSdyw)j(sur`T4a(FZF1|Llz3%5QNTa7DI+we2+8!RCZ_IiOU0n3E@c-s>Ni~3fgl4@_(#3!-p}_IP-(Ty9b?%vd(D4QGKXuNg!_T=O5oeg@v-*`$^N#!CR|YnE zW`_-IKv%L6)tLNLl2V4!3ZZLGphPl@$@7QSMgd?R-4*}&2bVW^8;vj%#|J+(KYh^H zv&XGt1%3C3gA?GC0Pc{wBG7p?wfbw$D?^YIepsuG=c%SXVlfN0fE9*m%^m>(+mNTv z@86<%Gke<(!VIuMb;?T;H1!VlJj4rpR^dBBG;ADOkaL4Z2RMjq9q1wPF%j=re8$6|WvkPZeWV^2c*4V3#FbRfY3j+KZiuW* zF7WeE&88D#2mAp04pp`Vb>&-9JTIKiHaRsD-yY=obgUEQrJ#~u^+EWWi4!FoW~-lX z&#+Gxm%ez<@4t~oY#~~5v{dE0@{@MXd+FCW)`CFa9xiF}OgYxVh;ae-$3-8>6!myk zmWoP_N_ulnEAJQ|OJ&z6c-rAIbq7-H;2c=SD-{|&Lm!Qm%Hq@P zzkTM$Img&ZbnMXQPx0+P{dU&Puq+wTwx7)6imoF&5n~{d!jfPw=zY+;*6HEWAZLd{ z&UbuY_{?eUO8DW~82NlcTUN+>1JR(WoPx#53R`Ls$k#ps4@)2@QiZVW*FKY)B&V4Q zwr*e*R8?av%>;BVJ}EIQ;|^)X{_0-WqeTeWKIC?AjZZM3fqF34zl7`Ak($E+hNjEx z?XQDnwz9U7nZCQmGSpn|L=sfJZ_iVL!v|f6cYKOe+^s9<`=ap0eW2RLx-@&Y;C+{f z-8J7~{!nBF?RFXwfqti0TQH{m&6qPrmqRwD0O!CQK6r35v0^W$!Ps}ki8p0+Ul>Z@ zxR}U+g*jWtb16|~W>wTKsNb_v5Q@B~f7+@)=nChV>g?Q$^($}a>}6h%h&;UK1{-Qs zXVK0+7nCc)qqXOC8)IkUL z=*^zmtBi(h?YIfq=~$l^BFjm_qGLA|JXsw?~0SR60o_ap7S1htn+K~ zhc_$eyF7W2Qw=!X!Q+&^utfV;53c$BQ;NaW3ALfiMsNcl%q6^L?{;cIlo*^=lGbqd zU`%r2fZlaH@gIPtOEyQl$l>n8^Vp2YCMYk5{Flo{N5gemdsAy6*x+xh7T#fTV+UP$ z2er-j1KvOu7QI5tIBVSZSC1aW`wm;jzAyxMK@ShE$vnm+k>dp*EnP)N(tYOcf5~Dq zF_s8~7h&fNTCYJ*YI+WR4M)leNS+W`Ti)mwag`Fo^7Zk-Xx6z((PE#Bh^!ctzpRfv z$vShPwL1e=ZRn*RiIcW@EHda4Cv?cB&fY#(=@UhhX4(_qUlF%E9tQb#E~*&pPYmAM zb}ENZe*&>8CMPK>WIVSrO6Ij9xeOfR1Nqi~*}#z`xMuL}*kv9h<0sAh^2q;$D33#* z7NhdtB}uphU^tb3z+I0m84doTk94b-Yl|v4cfwU#Br~)&VLmB5B)xyOutq!uJ!z6T z;4$$-Bk*-Rd3x-)aprWO$+`T&{=Og_^1pm{xlck5 z-C3kT<8u*{6O{!wilV-eQ8}T(ny;9~6YIE|+-Ty0=7|sZh4ov*us7epn=u7VE2u|4 z#|M!i6`xTp)ZMeWx32>bu+<-Y`xYXjqrd~x1c_*P!YQAg4UzsojCm7I<+gZ6#E;X> z-M!oJto$mzwqJJFM|>R~vF^TWBl0nh+%!4dVoRWKy6?P4=5{D7m$P>`eMk8=c4G>;C1% zi@V@Mkj9kKjO1wtjjlr=y=7UI^KE2I^5u%jFx9UAjcNOAgq72Y7x%cjR2yyFcH@*@ zGa=_Q`}gnmULDOob?lK=y6WF23JKOy^sFx*A^O969HfbdT>k@M^kK;q-v5WZHxCQy zKVeSA%pT8Lx%jIJwVYN^jy|gh`h5*0`nOvNEf2z*l7fhs;@d~v7$KXmwA<|k%l!O8 zzWXZ&r^b0eca|7WaW_Ufv+aD97Z9V zrC^z^k@WQB@a-pcS&c-A>r)(9u<0mQL%$3T;mgcO1rAfWi?lwuZXUo%l_2GNsr1BT zmpcG>09N?lQ=FCKNfkfU3xwdZFtL)NtRM0h*Ax8J=U8eSJm6r*x?d{Ep}b8=+4)h! z6DLk<5<fU9rj?htI9PdK^0Y6bhR{7QlXBLnb>>BQS?}BdLM~qKmS`jhNU`%^u;24(p*Hw@3ac?k2!N!U=>{2opKtX%mz0fO4{edwz zZsN~)RAJ$DMLYelb&kDjODU4skN-XmRugcbr5nY~MN#o#!{54~7t!oQlIn^1iSD@6 z8J^sh zj4`TO%?ex@t9!m&1aaXY*=q&pv;zu zPW}g;>CN!X_JB(=BPn{(Px^SZ=z}O(lz7$%gV<(M+PEL$o7i!X24z$qq~BaIz1zLvMhruDQ17i4T=~ zR;`FG%5dpS)OCSAPpc-mjv@%x=hmk2L!SlH)KZ&F0(<_DZsyO46^An6@L!kLOHewn z?5`vT{zpIz(Ncf&9|3Vn!n(Ycx@Pp~N1315+VFRPAcrU~C7?%fcX(_t?I{5+mR!|) zZ&Vk`rsa;7Nw$leKA~mf#_q@Hgwe%dLY$@lODL;So=GKi1wfl z<6xcZkA2Y|){&;B`lzJVB`0i$%(XHF3(%CLi3Us2NMxHFvb^lS>0!%w(TogdJ>GW# zKQi94$iwWumQdeU1c90nr{~;oFn;T7c5Ae@%*78?a{Y^mX$lN&&=2wVPw9ygirJMs zQtWZlicwf0cox}K9NEZlSHjAR^S(MH4r4*Zo1iG6?@)Y0HrVe?f>O*X$rbFUMuhuu zdXsL9dIQ!SZ67kO+;T+M^%53UyEYk18fCKMar_4HG^==z(V(rrDgvAasXl#3fj(;I zy@QQbHKD1GtcoO%xJrTTO5K-g9t-K9c6j?vQA;l~#Oi$)-g*Dv`5286jDxSmtY1`? zv_8Ap-fL7q#Q`^W$8$>qjuThBL9!qHKZOvQPQD=z+P*c=bLDHV(Wk3&zA&bbk=-l; z3=$X^T&!z+%7Vz%P^3E{kfAjHO{fpyeM6N(@LaBr0{>9>Tw*}5+WF%RL-E%z~LATUSm0%}-vCQdSl&vw`}qZYWMwqhcV zE%hFrd!#hJyi8Qhc^qifL#pTlGzS`*3dKQRD12fbjv*uB5v@zipdS0k{BaQHx-s0^ zd`L{2C{SCLwu)u-$|_^Pu4*X8#7Bx`Mx=zHplK9&ZwjU9W-Rr)Qhtu=B9|mMAaZP| zO!(vH@gSQ^_Mh8XFku^VCt8+rQOi@~-t_LuTh`&y^LB43PEAjbMd`;u;{QRU%qN}m z3uFIVBl>WbQ*XQ(Q?E!1yGq)^67=*{7`YdcsYQJMNkEn6@Hb(q>TeSh6Td4egq4+( z@Mc^7a+4UBi!N;r(qoAKx3pL&>0erW{9n@IHH=dZ5Z|GailOEYYKYJNgF-4+tQ}M; zUiTL(z(+2p%utagDuS5*>`+-d&cY+|?@H{xG-@O|LN+ykmW0Es#yeE;V_AeWL!Xqx zy!Y>_icmQ)*pBIc=CHkwCY^T)tQfE1b%n3g4x!g*3fKQ!7~f>OL(?J&u1hK_E9+Tp zw5s)fcC66rz-er3yh)9fIPO;nUHn^-NJ3v831^xzgF0UvB0;t0l8Vu?$YvSGR-40Ux+(}}r0THGQqDbIA@VWC zyE4Y&p?SQjk>W%(CDiJTkoX-ZTrgF@)?@Sl7pptgsR$@PdgjT4pW;^86DjZ~$A%&` z&sy}l-?$>8a_A+EL)t|xtTl-NI+IQct3@%N)(p5jE7~{X1|aZe#HZHOv8-!iG`d8EoNw!+8U8ZLwwSn zC#y^*YX81GZxV~Hw)(@8kewWw2pv`H!B@|qFD<$&L#@%_%c^wA8Pq_grXK^Fr_a-Y znLlr{nOk`aw@i}epjEgjqwrbsG~20!+u%tk<6O?+#QmqJ_`j4MZ+QYuA$f)fYEEZR zT^|sXz|r%39=Kf3SIMit_Jtw#wR@zVgB}bBpO;j7|Jq>AQSr5qn7XTq^z9S722!5uEdd9}Z?I987a^GqEHlt74;pX$6b3!zz8F;)npW_0x zm*JX2w)(*5p#cB@C`-fwgM8`T+R~3T&t;%ZUb=4E`zGWC;z9luiCy)@;_FbM{x3Og z89+yrZW3WCY*1h8^7CGteNEHRVlikTLTB=YlIGDy*vTeJ?Lf`oauYK*38UNSj?m?z z`Nw~?zYenf0EPE1R8x8rbW&yJXL$cB)xujWY>?L*}ll0m~LenIXEZ|DhcoI=?VC3Y)Z=|ba8RvjqZ=zo#u|nkBWk|b1HT@ zaFKYCyST448oB~`3Q5Swf-hyR|NQy$q)%?^c4 z%*vb{UWqJrecy})}6@w&0gop6n88R zPsLO8;~Z4V7@BWMc%UjJk;kAp`ENo`c!|bvhyU&EbBzbr|M#EvPd{XIw0ZFXOf;Q< zZ_32z=<^u8X)H6{l{z*nK!Du5+?vm_k0%NGk5%>+>6a|6+A2*Tko-crRfgWct|rnd zJv2Qra2NI@U795S!|&)|vxRk>Dd>{rs3?rdU z=Am?%dCUToZq@2x-m>^s=pyw1grSiG(cueIU2m_dN3QOIZZ*b67EEr!r*EUnAD zGu-pne@g@X+nojJOcy^Jf}r1{U;p$h{YV8)dbaF6p!eLXTj^kGiZ$jQYW>_j4yKj*981qR78v{8j9_p{;&5lIpoHZPs8&W%(pKykP|1@S zy6MId@VT#!q(4AKb%XzIXkwQiua`%x#|H-oS2s7kalUt?ypQWn>AW5+msq9pdE#q8 z8)ml)9fs`F#mc?Ze+7i`DJkTBG#*9FMSpc=DCsAQl7w>iRoBLTUChpnKu^XSDSNDz z(Tgt5Z|wGE!g6r&UY9$v9)m-o=n|Nb5Jy7`KbwxZsvlGdC1_HF#!8??);ITpy2kKLi zAkP5cOeh-~1f)!{fj=DOHStkfH4!q#u$qvyIc6ND7YB%TW`|q`*kP^{hU`0p;-$`D z9&k>Twx+x04tJ$r8Ecxi&V+4NwF}eie7jn_lNDCGgU1Q*d0h7mhjYKom&y}@ z1n;CQEGXsb)rT0A^(;Tqbc3Kz{#9k)-8s|gwPR5vMKo=-IGL@xuG!Sh%MBLvIeSW` zcbns<=uVvHZsQpH*w-Q(s5L-SbeU$~%hsfu^zd}jqSBb+)t9c|P}D^q0FC2e3B-mr z3!ogVB!W&cpSH1wVVas-enc2RTY^>D;XiBi)JMS{3)P#uAu|i5B zt)1E9W-EpC$!&<4H6q5u8K^eif4>-Qo_zo;3|G246xfojPh4=Mg`r4;Sw|;8V|%S4 zI%TMZQn_mpxI=2KqBbRO+rT(t(`>ocB0;8 zNmjD-%}-zh(uTjov)7oPLf+UkARU=I{0#BXbq;##3495O0rRp!t2rAaTzis%?O9r3 z1NKU!W;!&Dtk$n$z+jwCeU)WevQjH>!qJ6#YwIBsi`U#E8l$gkYv`5A7hMg$$%&1X zVXk`yvh=jCCv6h)wXr!MGg}+&8Bx8&KL6gcYw^(WcwH|yAc(DpZ5(?)yipLAs;QNN z$nwT!HHCAl*7vzrU3Z$|uxtL>Gh$?^L`Z&5YWq&TXjB}m%)~7+x$9W-s zF*{FXCA6;f&1u;^8j-cA+f_%p6pMUciJZHAsFs=}!CEy=6Jat~Ps3V>Idx5^MpiIExEFV? zMRrV{?H8^$2Wo*R!5Z)E4BU&*tL&pj>A&nXz2ro#!`UI+0Xl$(=NjnqK9x0C7uFZ} zEc01ir$1&+UJ0~|Z8?W?yU!|*Tl);Y2KD+LCNYEL=Y)ho4MU(~h=PvJxY!g_JqqYVt!JyM zCs(y4kF_#_9cA0v;Nj4mAOFiZ$;;UE=x+KH8e_e4^& z#@b!AWmRyfvMT388s)Y_h&)*Pkk_fgv& z5Rw=)oK2whQAH=<~8go3<>$$0u3P+@gR1h=sJpWew}EMUU-bg_TJC zDZZijz*0-Qr}OM*?>_R*dEKPaaJ&wxB8y3oL4z5n46LKF`CYmEQ~23Rhg+V3Q!}}; z4ZLvUylA@B3aMR0Jl`eE*7`*&6?lm9`VM?1(gf%i7QFD(k#OwwK1!^7Yj}VS+-mp? zTckMR7^03+`gaw=7GbMkYxZv&T+J$0x3FF)l5xQE0b1haa^hu;J@SXi?0S_4HinNY zK86JjU;D5ln~$s46)W?;&Bya^(p2b?S+L~E4@B2Ie#K~%PPt-zwLUDjH&-V-a5yiHCkng;k zc*zRV%YDwUu&~dh)9DIzTh?)STqvMUmK1VH(kY*~R?;>_zh*Q{%kgFnKLTs5unygs zxhC4xhm$z=4co3=4i3E*1^y@=efMt$4}RvxJ8um80(=C!5t%SzGCh!czG)%*9}+be zfTNw)Wy`zQDdS=i)KhWwUz4Bb-N6mUaFtpyD^a%!q*gydP^6_SET|(RBaNm1alHM5 zTAx)9p7saA&m zjk|bJIx*L_>2fYz-d_uBb{y0Cm0}d78zhRbTa*ksQ_3oB1pjtJWuUlAAPP+nKqM+e z`1!$MqlAQydEzarcC%q5U0zGv56V6VTccd)3&fOOIK45!i^-JIx4Ll@_^Ko1X8iar zMGK?wq5Aa(VY(2^V|YU;QvM@3c)z7w(HrS60S1D)Z*WDhQZK={6|7hHMWqCu?d!q& zUsB~5PI4tuRrMbGCy@gDp+NRyO31DD~KE2i+`zp^6?M!aSn``tS z+~#4kf!@r%Lf8w<#ti)7>53G2i^KH6 z54DulAxhg*Ebw!}?rG|J*r(viN@nO*6j`mK0sdXtjQAwXG1&!9`0or}aV59^ZwZ2d zCmvaIxwPX@RFmbqNo^`_7-uLytdR)hc7BG`osJf}g5bi64T(#{kO=5sLD(j^>N}M| zijq0l-`}Bwy*{IE;(JneAe@k!SkNy-$r2CW(MW9(g&$*W6ubCfm1l2}9_nT3+^M3o zZ*a~&*1U^5J8-X~7D>qQI6beRV$T=_CwH?czAI}cqdc(pJM0Y_^aew}-R^`Db`q0# zxNymfZ=F6xPAqaFNe!I|D~@1;BSe#FC-z$^_&up!2s2xh=t9Vfj282As@HsDq#Nxo zx#WrWp}YorsQ4w%yA=^Gp~Q48VQM|975p5fww+Y(!*tEePJt89A4a0^`MqW4jCxCn ztON2ryUFU~h*kqcF!OxEy~s+77h-x5ka?}3dtH!Qy@DCvrfEkUq0l5aOOPOORq(|6 z#z$=`(qa-9F`Om6@R=>&tQ0Z@+B?`6|>(t@$z7Q*f8OT_uGC#7!p#fhXe(63) z{&lq+hhM@3E$8XO_wBYBtNgsC(O^X-pJ zLnV!<4`vqy*9|1ZDf?|gvAa%OU0{Tz&#yqqcuvNWw_xgXxX7D4A1$k$hkZQ82>B7# zQDnKdG5861Y;gS**ydF^u!neAe;yRLwKo4P-s4z@wUk!CZ_Ha#Iw4G_S%_!Uh68`{ zQz3+&oGKr-(ZZS~cWQEARqQ%BEouRm2KjAYtHOr`E9G>vUu!hR+w+H-St9NSYMo#c zn$snKdR>}oWqGR-sfv9wM+9kp4&7}n)zbT3?#ElN@QkfIwDc2rywB(;t-rt56;+$+ z&|21dhN7{+s#2)kC@vD#D^%fI`^+j2Qmq5nwvQpEbnNVIlrgjInt#(GM&J4bJvc)$%ux%o5k8(bQOJC*; zRpR^J7Z!C{hWH!xjY++3nbUVm_KsVe5_tQKOV72?y6R!ROT07rKIqV;^WZDmxb1du zuqWJO2Ux)Nmus<_iWe9Rc@3}p`~j@$rLkPP>?~z+`_Pe%vyI8|(+-exB}CDWwORYK zgU=5S>r1<-Tx`$L8-KIU=`8R>oLX5CEbk06dqghOu0aPUb<1)+E`oeDq951@;A1i{ zWjWv;sxGf3O}AQ`slDxY%QmMxxW?jDd$dZPYyn!U4cKUW%2-iN4V&l z$?dt?sKu+Fb29MOZ{tfATiGoWo#5HKzD~7NNuxhhwsN2Oh_Jsj|u@zI3rs?D~ z5Pn>ayhxKsF^=smecArZf zXAaF^nFbQnSQshYpr5704HG&C+2eZJ%Nix)l19p-QARN)JNJIDU{rU8Sl8}}%&f`~f5KOKQ?vvAgt9`RHY1M8jCi9E-<|84h{oD+h z-J0sfC1pk2(y_)n3sGFQu{wDK`rUtyrDyw{0X+fVWL5C2-Tsa#wPTd3z z9L5!PX1;Q4sPEa`bmAg#&?wR2>tEucZ-k;Bi-*#iE_kNHm}9pGaj-oVJPQx;zqP3MoN?n;V zE|52|V{8f8VvDrj&kZZ|o8iTU98+C;fMx|+MZvSsoA|By63ddogZz;_i2P9rUEbdX zay!2)W0gRR%hCK#LbPETaTz zv_cG=)+^R9#brB^P-VMC@7psZQN6EE&dd37mqm3F}RI<%Drub}X<$;bd7lyU(Z3i@y!NaujUeR$j%BD#9dTBM{qBOh%i)ihY{n zI1UhU5Zk!|Wv!m_hptW9FH=JSh7cOO1YAR}#Ho)v#=&m%;uM#8PQSF*Fvyc*uRwdu zSK!g!XYzmj>|i`Y;>1gHiOuJ#NO^g+_fXo@1>Xuj3CzVjY}VX_hX{!OZZbl+MQ6lL z*Rr}l}LBQz=-?QzWTh-`l`cwZ()Jvwt8Qa_F|*lDKZdrQe)G z=a_y$%fD$Jz*?42D~-TKTuD!|6Q;QrQ4jS?R^TQw*Z3AF&MO&s93g|rxVswy@zO53 zDj6_)r{3?8-w>^DJf@L3`touw)^*+0@--D;!a~WfhbkrX;A!xF9}cR3x$rUOV!w!Y zPKiZbG`*Ioh`}?6V27m`WU&mgRkSQf_>pgpELv)~5~W-bs%6PZ!9G&3{~}>DWBHFTuwO4vO5BYYZX=kG=JeUdxgboZxrtDtWK!V*fNET#XGSR zjA4?460Rlhb_}cX3!#_Uk>7q^{EIlwb=UETZGU+jV@7D^$Le@^qc@XS>5@{)3;@Fp z+wbO71q~v&cKRP9{kDGB5O2Tu17B9_e{ZTs6aFLsh8Lqr=u%bQm}Jw9|Ll0_tGDsm zJd7z7%$uLlHRCZ)r7SX)`MLM?j)F>q^LvI8UF9!zdoG4Ddq~UpCVTce#37RN_XT6! z5~By@<6)gnoKro5C{kK8(sv`CchS->$8*+VvwFEiUO+K2`~l4^MfaL5j#{~XED5Cpv`yNMJud#2agc|l8SG!KX-76i{C2=51X*G8n* zFvl59@3Y;tvxdSJAc2UO)Vfe_nBUzzM`XgM>%;lh6a0g2e&2!-kzS-o0DonLu$^W%4_$MYmsMuZDe0Zr+oI0|wq7v2@ z+DkwyaKK_G9nY?vGy#E+{1bL9hv*SCRFl8pv_dv;z}TNWK1( z%I*|Bw6hN-*x#bJB&x6nhAq4_w=~U2bKElddE9f~wgscX5kWMuY0MYJBVZTJ{;Mtz z$lk=vH{b|*bCh?~ghvL6`}WLm!D9l2&gh=$7-nU^G-g=QmMi)yQN(Fe*fy{{h$d23 z)R1WMQN;V3gC%n?x_sf~<8vR;PLd=uGbRcWuFIh`+wg3Nevj~ue%Ps%%&3d=^Zql( zf-^zAresfBaJJmRxa#hP6i6{38(04gv`&IAb4p^NDzUE|{GR5qcz`41Q8`lI*-s}) z(Iqzs=ZpSV6nz=^a(hYcHsO&P@V@7^W463UUeF2T{?}4~+ z87=WCQQtQw`a?w)hk}dlEhtZovAT+G?zsd5@2@-Y)<+BPj#r}^B*QaOepsM^m;giU z_nE!H2;2?=eTx3%2>faz5#0$XJVx5?M6tf@W1%tlDxiIz3Bi<|U{^e?->AaAKT+~! zv2AT5_yKWk`mzi|4Q!4Ab2pA7V@6bl6A4Ux!!_kec75+?jf%E7rJ`kfj|Dt5Aa)|v zWDm^oGBt6y_UG6vnM`_mCKReXPcad?u5ytaGhADcQg=H9tXD)g&zvc&_H)uLQ zEzku<8tQr=Or>Lk{5LLl2&|HIdP|1gJ|kWX8CNM5#WxVG$haE1ASmZp2iv!t|8Ym&O)ipNYauI z#ZAmC#a%L`sH!axz@Ts1-z_Opl%{9xUO?A0u_Jvay`mk5- zrnl#(H~UXZ&Y#x$avS~3`+IqYb=0J!3q%SBRQ5!pZzQdHZA`U$%|dakW7?>Tf6h%n zNuvc!E7o5_Z*$yHYhQpBgHDkhj{t+Nr&3nTtD5Qs4qD3#tbW*O!+WfG4(+ip^`3g5 zHZ;Ht*N)n<7iPYHvI^=(e*3j=Yq#5PbI2{PE96FAeYb5&?fU71QEg9fXANyrNNfg2 z<>N?~PsRHgW0d^^`3P~}=(--+{bl51-?84sQmxp&zEU*tyN=+|PxXhCCq$SK3%iKT zXWWP+Rs?*CjN0x>?sH?~3!KZp434`sz9jYx_8dNo0#-~f7)(p~07A*!1N{0%bn^P1l7fIq|6!$I7p|n0iUbN0e{DQQD!Ms!q zd#^lYaXg@t#C3bYc>TkI+xSF(IgH9{A#CBDpU9u3bj=?hZemD+zO-BW)Wyr zcB*Djbbcklk)~s3cG}>MkGFVad?yXMyHxPFX~7g!ey0v(_i!qx!XQ7z=-u}~B0M59 zT$puu>RU&4|IqXz#+fRGmk?iNf=S?|d)w-f#3J-(&#mAypod8?cBmt{XO^~YwdJIz+66E#oeQ#28| z)DOCs?9OyVRrA+L2H>iFNR2{PtNJ2n$#ea2D45Ffg8el)i7B&jh#%3n5xJ7@q~^LB zk?6NPrRExfiXJLAv8NJT3lvLJCNvAG&}bLc_gRJ5IMox21a*&QHTF&KWoSzvsi=4R z$WAeWX3PRI2FIajEdOygg}~E(tZ9yt{rljlp>YzxEH)Rg)R^hffiircqiil*2-F2j zuRJ0F<;?)mGt@0iQ}|Z*Tjy)(I=xn`jb9Fh*VjKpe1jdV%(Y?DyOlcAhyV13PB<1u zrVuIwW_J|+)=l^7*t9;l(I1)EJmb-|o!o?ye_h#X=sM3 zwtV+S`FZ99F6~U)aqP0{D}l^Y9ow{{)&v<6of%5-ZX}r$OawE-=Bp=quF2|JH6=Ky z{b*$0oL6B1siz-_=Tv#GzZ~8jqCUl%JU5`qKw1DyZVB%4)rk4jKHIjrR>ud0A}Hz? zi=h*Vu>zSZ`*6*>p4~6IDO-bcP^Mx(zb~?x4G$yOnkeS-Kj2#=;wQ|{7Hj?(LhP=N zQb#2j369wyVxTm9axbEACefgirI%FPuj)8BbWD)QTc1Vq5c{+l)NV&phr*rvF~$Rq z#*sKYgo13G9^B526_!{9*HlO4(|RW^y30x?nN~qqG&rCPby&-%UubjRbv?30Ii`gp zOSDp8C_KDNW(xtU*e~WKd}lmeDc#2+l1or*!gW)+m4C8)@422?M}^J-u{Uvumqo~} z!!VdN!4*o#r2~C&&nu0H23z);BCb{jYlI}RR+pBN6`He8Ei-(}b&ES_2lF_r`93)^1^hiX5k(bsW` zL31E%TgqhF><3IAf1kWc@$(GS)*of^XG{U}x;7N1Xl$nmQCU#J;2E5j9+@tZ_f+zJ zhh+MuNRsqd_g_k<^t#(CL^Q5Wi2wA}gTg(z(6vt1u$`S5m|VT{XPLob+k}gS0=sJ9 z(<3CRhBSD|FP-(^Z40&il}v8g7ct_=1(vbIg~b{-N!%mdX8Q=(gJ*89gMSD6Ky6q6 zsql*{Spl9rbC4v9Lvh2*LRGa@_tq^!Q9%H`Sy)1f$-#1IjY{LwE=RfjjaMCu9n{yW zj8=jm9&6E=Q>OwwgAxTcMDk?UZQ`Xd@Dyz>d~4l@%IqpiTs!*9Yrg;5MwCUW8Kt2Gs%XmLEVq1aMAs?Wuu2n zIJ1}p)bjMmi;C3J=gO7?FB$~1Tb?N(2MY06>$aju*_YvuTf!d z1r(ScGslgK$gtZNQb9;Zs2Pb6vwefJP&R-Z2S|`PJzFCPX#2MvVHmg4B+Jm8=XNS9 zV@q?^PYf!Vt3G|4L7tU!$DBPfD8`tI+fiCt;iK>}ixfj_ z&WNH6Fv74RetzJvQoy0A?~ib%_*>9ZZSBUKM5Wza+fl4{`{F5Xlu*opX60UN$d_&< z1(=!23(tmwCHnpR#sBaW_+KEmXy1Ip1W<9IKTP#-sqXwR|4jt zf%}^Ep+e=e8Q`5Vlh>(}%5lejjpaZS)d+A@e)t8>w$N|-tMIH9-K0n+stU%M~MDu9uspM*^^B;t+n+%=+$88 zL|teg&R3P0I$8z4KDN!CLkxQ(DieFQwxb5>Ys^GXAPL(ImRZ}~tD~Zx-j*|NcbUaj zmjEd1o?3M&`Sy@0-#^fC043pL8c+v|s8)=X8Z#-FrlBh$si(M(JBw8GI!WrPA<55I zjtyG^jm20ga=paSac&hgHIEpIZ;hMK@UI|`mFLoi*AK%G!~rC z-C4-}d^!AGfNZ+`LDssQBJQyrIsw=ua*f^CA`sZ7^WplVRx)t{4>6~XsW!xU;UBU$ zu#0T8(=rp6ivk*|jrYuVf_h({_Ou|1&g_anw}jugPsuG6 zQX=})pPI%RwM6WrXqWj^2q9?^q0!Ek4X1L$FnBsvRtV|u(2P-%gWlS+To9(OnAep`F(n>yv*WLgfX$uTiJ&R=;NoQGy^ zxmVab=Z+@+++#twT*T^nzZkmuIJbWp+mQd5)X_{tazC$pAAWy=!4`IK;t9*cLQpG| zV(Z0-BwT^@pzFUX`GgnCSR{IS1)6reKkhmn-yiVf`c&_htI~fHcT~YLgyKa}p>xeE z-9rF_mWXGNHsmN3di&;(pG`pZHpZ65j%PVH}yc-r!v4|Lrng>O$briGMtD>`aS zq5e+H_;O++%q@0h54G8=KAD#z0$J>n62wV230Jy+z59hWMKHx)fbZlQ$LB33y;cnj z-OW_)RG~42r_FaNKZg`=xYtqSr(33#dgy2L-Vsdo7SM=Lf<;0}q2Ync_+1uCftZ{B zJ}3yD`Y<8A6;xOvQ)4HT#-~GI1A3Acyfs2}>K+@NGFbgQ6F-5+lpyRpnD5}j&*&DM zfP#c!dO}9-oxwIU+Ks1gCmXTD*1G>Ar>WXifM5nj=FprYl;8KR)b;MfJv;INF1qd0 z0CQ7uwQ~zYuh)^aBtPyb6c0cPVBQqJMY!Gbp^@cxs4( zoJSDNe|8_4kYp90t`W7`ruD=61BTD<=+|Gq1@6K=%#&xBGyyp(JzS?~v{5Sk1l}AQ zfuL97wdkDj^)PI`>VXn%h3%tjt@)*dBx#dWm^zkWa^UH;^o+%ufjB0bsc%FW?N+|M z7h-AHshps~y9arLp$kN?me%S8!W*!EYKkBr zo%1-OlSE}9q?o=!3>pMrw&H?q+ZV@c0L>u%sk{u1%yp@$-EZthJ+lD*C( zvwEv;{_0tlMA<)#THN#xjl%zOiQcZ%2Sv^lKiFaezNw{+;6&#K@lcG{J~s3HToCOX z`m(8FqZa3{%}`Z!xp;zF=D-N?FIPdTvA~4BD4PE^poA^6i?GPrVJKo=Qs3#1#PzNN zt^|TUL97vr`PLhf{QoJ0(o11EgB;(rBP8?uhtcV`ihS4i3okgQ!>Pf$qs8UtX3S;d zN8$ec<)%u!&F#6Gzs+aVrErhr2(*gPqK^T@hAX2oPhuq`KDzNOmnq4V6JrBx$l^WJ zez1$l4?TftBZ;R3_vk}dF)y$MeOXt+19yikpPNlI8w*(PFVFd1KM7@YW%_QD>f_!W z>E*I*`~zO?8_bx!-ROa5cRDzmil*2m%1!Ryly4{9y*rBV7K&sjFd4G&5-Z%H(sIE3 zyR_qy;=`E~Qm5ZtwJ@+FFR0;|sd>;nT(Y*?8Q^IdLn%Zx6G3%JadbXA29=O7;%~Ya zqAdR>l{~Eku}TFck+T17OBJ{vObZ(rY5*C^qIO63ftpAsTZwpFBxP$DOfqfMm`@(s z&TQ>NbKDgVAadN|xFr$`!&Vj|zU&gCy8)>kgeQx14D zQPlx{Jybw1!_{M^@hzF35naA#Q!OPU<5Wd6DBnU3=1Cc4s4F#SFB@{$of($RHz&G6 zeKsyVK5(S_879jwIqZ(5IoPEvuui-VndkaCv?NxQ(eZbGf_Ne9@Agek#<(4-Aq;<1 zLfP2PDh!VK#^oT5ZW!XJ!CS@s{D~bzJS2!fI5)Q9~A1^{kskW73FZN~o~)zYxhO(He0WIK0)3gS2bY0eSV7E~WKW zi%}mGV5ifyVGy=QS*EH&z!`Osg?zac9YxK9=>@%?#}KS zLG}yxVjWKC75api)a+&=sRq==@*vR9Cwfq(Laf)8G`-E`*`1qss$vBYo77grU{t(gfEYC`)<0X)Ot$u zSLjEvb(r|~CGyg7>}!p1Vpv&BY#k5MnEOkA@}G`(Zxe*eOB}xrsmd@(1M z*p>lbrwL?#z!sr{4m`p!HE}ReJ{SSS-dN;*&v3r{K9Gi{9scdAn?0q}YWjQCx}x(; z$@;^JZ1#swJV$KSth~=5y#+}n*886Q12WEF29%4r?mnDwSO;;c3J^iJ(QyQmCTK-D zOrkIB5gA=}0)VWj1TI4V*_7p<{F3vM$Pm*%1zk6}N#pl+c!)iF|sgPSbg_ z^WGx}XSfn>Z?E8`EO&zKAiqC;ryI3e>q6&!fDwN5Woa=QcMgos>K)tCkfP8_|LyGi zb8-lYF<5T6w162^01yt=RRMd)`l^2*VlF@7K$_$H?MSVB(*t*(PfT*WdH^*$&tCSw zAekk<^jdazQ{tX1LA!5q3S5^eCpnQuLv|L|}pdCzhG0 zGD)vVt@Zc_7irQ7OT-+m3=JU)JN;K-aw3Y}yMdwzY=>(Ra35VVo5JrFFLXQnN?Joq zbtd%kCO+>k`CCt0>tDuZS<}#otHTOOygF-6JO^N{?Dam9wjOrpezr#^M4(gYSZ@%j zv@p$-X*}#;)Sc7Mdyfy?$Y$EewhD$x;fgT6w6AivF(kuRqwq(R^mUNV0NItJBoAy) z-1stAf}!>_j#%rsvNn$Ypf@%E#FZTo^|a(pP!s6P!wmQ?TVK zVv_?E+Tpkg>~S3@hm4-{#c(>$(_@wlZ59Ni^muXa?WTZQ_*o5dZ~J7RY`}xzu0#Po zXnmiA8}vBxo0ZNk*HK;|D{LB`+DSwAAN|uO%uMqcy_Vd|(Z`#u zst0Z`NnhkD_xn@b(F$Cmx0e-6VX$K-Aqjnd#1R_>(S|KCl3uqU3=zjqZ0VQ&VuuzO zEisjOmT-!szt9oz_*pnK6NQ@-6`k|I0Ux^)k8ZS-q%UEs`}-;No1RK^u9^dOH~meBbih@20{s4Of2n2Lqz!UvW349)@UNc@1O?X`s;}hlCyE!aYNsy6a$2HK) z`N(3WBnX=2_AzJYF3mHoT8YM%YTcF<*xwIMN>1DdNcfNpr+8l)P{8I*TinIK3!|9h z7Uc<$s^bCA}T5UzVh&rZC{-@9c2Z9-# zNVr5oYb53v2!>`OW)5+tV5Ji}+L}=}39KILtPTZ9wbb!)20@r3CoKLDV)(fo9%bNv zkB@t0H#NxOGULL-I*o6%W~|6m*y1g0!nL!8fvmCDsR4F%kls_al!=7xkK*{3NFvjP zsmBg#-(_WMjVu5Zl_#Oz;WeMEQ*AorG}Rm)iz%s)(k3lZb&3;z3a1z5q4Ii@N3sug zW5UYj4cHKRl@B@cA;u~V$WrhwnN(9GuSeMnE9tSqPB(I@`d|Ksm}C+RWq)M;Qt4cA zZ4HJv0Im9oLWyRbusQwyLWmJk;3bN=Wj1|y#*BPvg(fs#XV+6JyHqmBBb#BtBnR|B zBVs*~0WqZ}SESiaW)GjxzDL%1(g~jWIcuw2yTTmdh<9a6#Yqsa3F4_Nxeyk7~LYA%8y=Pj&U&=y9@>i-Xu6kSFi zw`neG=K>nq;20$LfO`L9UEX(9S?JQ2NDyo+_m>Mk&<9?>4Y;0Yi=N5_YKYux@H9jMjF9W?2j`5)GF6C^k%ZcltsO z3+L-rdv_Mme{TL+d7vPZ@#b-MVD~azN;dLvCs?Bz72+krz2P&wa)S@+CbtnJ6D$L`%#NVG$#Cixd-+;(@D6Aw6#-<6Y1Qkz;da zMb9^s(r+2!ks}#Wl5Dp19S0n^lsim5%;0?$qqg@$&SD{*L zO%$_A-tcK)G~@45$Tb>*2wy6A=b+Sx!Oh4|GauVOm8LhftfGd63yahgB64kFp!l)q zgSe7r-5u0ZxDrZH;BLnA8_IkuK&VYw(Ld*{*bDKiG-i_p*u--Bd9IMApWi{O2DH&% z>({cM6Lhn$YAkh2b4>%GzF0hra5Oprh{QZvTML7gfwN=H@YtO4^l4HSBE#UXW+ohX z$(n;E>8p96*=CSMipihQTbLE!N2e}(Lh}HvC~)f95HAIX*WXVO?jGY2br4JE;>;5- zjW@b+D81y5ipy4}VIa;KESwEBKuI8g2{ z8J>&Q#cVp~T-yNtDfm$)tLW><1z*?VY;`*gg)!}h%{x3Bo)#8JrF8a`5r86WctlJr zyH%dYxCWe%s3m{E(m3HQIKc_if;eXp_8DquACG^yggV~*$ zClEs0&O~?ajm`bk-O5dj1JxiZ%7!qyX$R~-1fjeg8S9b~TBm1VO^A%Ft zrrKc?@GZY4v#RdsNUdy(In#{nf5H^FpzwT0S6V9l!}+1G5!tUst%Zq{Q?qrAyXcbf zt2Jkp;zxoSsdi2zs{(=RwQ*xWze~D9#fU@{kSC!1h-zY%RfPI+b|Wu!a8y%sW1`^L z$lQm2e1Q{xa^S*oAe~gak{SR(4xOshdY1dZtL zSAL51b5gJfRo}kh2zTa5bf%K6pq&`1o!+M}?!(%@*!{7ZA#ouSz>*Bco^cK^4Kl}B zBK=uX_h*7M!TZh`Ss1OblB4OaB&QfB0|#N{YL;>StY5IFREqRTK)ki%d+!ySJ7zWY zDcY9&tnXWxi)KSc8e0G3$oA~Wm|C?Sqz~;Uq>7$z?DK{X%c<#GJl2)UY=vt)A(3C= zTwngjq-`wejuaSb@MX7_BN9Gg%x2R{Vt#(C`$z`~wC}haD#(&HG?Iu{CvI$`|ysey5`=bPs7e67!Hfawl2uUropIuh||UfJ9<~BC`NRQ z_BYmDTY;a37NZ=9;GV$?LP<~yw(?dvletb2;M46~P{4E6AE$s5gP$2Xw2}=QIz<^8 z-;N+n{EYY>mSmz4DG%Br_AF?ofp{5O)b(IdujUm%8eLl3&e;=F?iS%3`GX@9v|j`s znSUJNpD0o^Oxq_0bkQQqv;@#SU{}=gjT!laVOB0G%)VVYg5!E4d*32j8fLg8HCUmj_L;e?ZL2B zbecI4Eeq$uqy@!!lAk!U6r`ad>`^(`%3h0+S*L8Vw~OyM1Q*m+tNu$VWI!FOcWh2F z`|X8Wgneg+q%o;d1{22ZYGSqBPb@xn?YD*8nR8YKWGaQZnuBjszgX#lASNcquNH!B zgxUp$k~7A{iF_PoRrfI8mnI|XtI510fy^0eJGt<^4dxo!6!dm0;3&#m{( z@8nn5nD2!ous>>leE0UW+Z%+IOfFGhuH;W{o9=+Cunv9 zL2r3TDbkb*4F(tP#k(U*jM~+m<&+*Pl}m(kHIk24<6yTC2+NZ(L+9noV6AJ>5TedDlf&-2hvSOHhmjXWRk`{A zz(2Cxa1ar#dH5nL=;?rhK}CNCvAZ>c61EbOJVgJI3-58(4amcFbKvjc*n;vsKnM&R zd-U-#DW6(Q1%Hk`yf}GrFd-se$M)v|neUqv?Kk8l<<0wGv70z~9P|~`vjvlqQMK** zeHnVpi~i7t1$T*$ibhjes$zQjzt;zUeT@trF z(c$(6$-2*mRWHw+=ShG4vaa@l2{#q(BET2m zQ}cT6KG5BXZv)ncI?aJa%Tz7#a5@x4y1vp* z`9`$wboZr7x*1%4SiQE}0G-9O)rqW*_k%cDErr|ty}lL)jnPM`HCUr+Q~9Bv5eC-6 z8lkTGGj)rFOdk)Y~8TbM7aC zlxY{T+Rm4@BJWiM{A^Zm@oE^kZ{=WnwLofuVbP0Z74Mr83W_N})K0+n#~S-Pbj%Df z&~+(f@+v~*JJ&ao*rC?du{N#+8?Ra3!r2ROnAnaG(w|(4Vid4Y_a~?u)?r5Zm`h19?5FML(i5F=k9qoaf)m; z*Wt*K7olF3p)x4Wqz;8`+CNsS7G9jv427FH-dY;1T=;!ky%l~iIv4=`-_#wy{Fl08 zoIn~hs+2bk*u7q8iGRt2PsBiMp!f8YNBez`A>KRd|ft*^JLqU5|G)CsYY zGgBp7az>%aKr^3bBy_<`D<RiK04$aQ%T_ z$}4TdLTtpO8Quz8Me04;Du=@i8Oe^4mT>f@04o|J=KbE#UR8tF=+aoa{D$iKG5xjI z?T>?05Z(MODyvtjTo>yB0cE0m50#7HnkU?&P!pk0S}QtJmu{G1b7tSnZewXRHC@6e zGpeystYq}kZbJUtQ-An3it#rrbk#2L?FT$1^rbZK%$HjU^O%qO|5ur^dBmHq!4y2e zuW73FHY!935ATn1O(y-&y-6uDZp^VoJxaL%+Wc~rL_iz*4+B|PxFZo8 zyo|`hdZ$`fW&Ztr!~0+v2%%Ois~iN0{Wh-JWJmHG-Kd4M+qjp1w|=iK5pZXxLLuzv9Ld5Je<)xuc`EMs>R%f} zGCGA{*$Iw{&-G=K+BGi_Q9_p@!eI@nqp=C+KCZK~>2emLT-y+*>XgmO2PuIWlw5BK7t}Ewe)@gnVD*!?imrybyW^_47NL$`;lf z@1VAfK~?oY2rk=`aZEidA!Q;%{9LKizOdNg6yJN0!hOkLDM`p{d1bqCw2x)?u*AcG z5%ZutaL(zF%p-I}VXcwI*9;Rb`o-YwtW|^AjW>VwV!+GJn(UMfYz}J}dVexfq(AyG zwm!?!8W8kzzG}-y(ct2(HI--skMFYyEaOZtwV7b8>1RKmHy+ko@;k)OZQnrB{Sk*F z-z!miZB5vmBaFf+S+vLZ*}6iHH1~r%n5R9a-ql&6RA#m`$E*V1zU3WdA%h<+=z^iC zAN&VfYgk3?tND6Ddh^YHL`P($-Mbt)>-3_7M(P>t?TMow5P~nG_fxa7;rqRI&+_R< zu@osSH*sTPntv3u{Rk_}FH#MN$DAU$RVA5rqpMRrl%*E}$U!;o7dG&<0f@{N|uo6s!koB`XA*n*UytUOTj)*#iuL$I1IZ8d?_QEu8 z*fJ=+MloAg`>I%YymVQdFRz&DG65L5tn0UpCnjXvyyfm$>r5(%D*4igBMt~cum=2Y zV%tfPDLD*6iB^%bOq$}-@5gEv+#q~GC>7*?D!s(F{7Mdb|*L3w- z;QnzyH7W*VFwU^@%d}HsLT<0e(>IE^X&nisk=fAb$#Z&P(`%TOYY5R1CGyXcI#0RB zW0`UftL}C=$<`@WmPspjh(0Qkvs|DkS6dDi*G}2wvVTnK8=C%Pnl;@r->^pbQH+8S zHXO}5>0q-qbPVi6EPF3f;ec0ju}ELN~l8P6-HhGsL0``4qZG1ViR@|c>7wTIs-FjcAZ7=b)$Q{?W}X5U9Y=JTDl&;2`d(Hf)r|w*bg%>g9IvtTCCsFVYWc1!HU7TGquGoS zNLetvZ9l04k|3>XH7cn}M<@D3=97Vtu{P^CfW2MAnW;&a$-3?vLnB$$wc?)8Ee6rz zg)hd4H&_W8zOGohiRTHizw^wx2lQ;J9grA*y}C+y)wE*oa2;M=pm7X)O3kV)yZ zk1SvxAtDsF=ZGJ{T`4Xu z$D2$&Z*>3GxTA5RLI2%VPPJdg;~#vEaKL@8K|Sksb|N08S-NQRPnr#118AUJj@;P; zwp|bM0eNY)K*Wj9;M4Y=L4=fy!+g-}H@%^ezO(sqA^x?dLz_)^`it5NG+B15IhWGg z)yQ3zxQ;e1FSgTVeaw0m+BKKezCh22qJgga5w03$Wha@&%&<-GMs zoKYPIGaL4Ll8x&0_Nb_*CFeKEB7+UfI>y6^p)-#(jV4dRx*;NAS4-ZTGeR+ouUgv2 zXOl1y_kxmex)0W}IV?l)SPF3_rI(zRV=N~rJg!&AXECLPLXL53>Q915u^N_Q3O-1> zT>ux<1}yRajEbW)n;gjvE-Gr~mkXm7YcZk>cJ<1vgID98>b1k3=y}kc4$;Bj_?!_X z#C|c$O{yhdu?%FOf_kg z)FLkh!%Md?%~T#wTVv? zsEjSeFbQ#ocJaAl>Rk_6^&9PM0WB>X=~D>Bk5C*f?%uESTM~X%Q19LW zh1;$><2`wx$wmgQMBaJsPG+Ka`W6mySnatot9QZrMCj{xQlQb(*$a#Q6+*{>@OH{Z zWFmQpT{%K^5~;K4kbKt!oLhe-{piQ8%5=dNOhi&CJf#n(V^-8}no*7_vl^;0BFqDi zrXMLj;j%!uS`Irjer=W{)AMkUKT$$yx8McM{8_Y-Z&+`T3}pWc2oUFF$HfJgiEUy7 z!({>1usebO*&{nR7--^!QB|@_6J^zI!ANWU=*!np%uhmrw9QSAz*~?-Rw-`2)VDyd7%*6tWK{h{D%Q2k0Pt~LmKw~_AmmuC`CQh6XCvh9Gxo86 zh9q8*$6qc)r8{n8DKN}&`yba||e(cvE)DjfRPB~_mS>~z1a zWzd2k1p$p3T2I}H-kf*DG&ozM}u^@{yGu zFvE?mE!efIpK8LUiCz{&hfSeL7z!FaNmcPe|(W7q8xZ*k4;l3SXfYV3f! zIEh50T|*Zf)KAgr-EMC%HxM6|NEOImBacj?+VZhSNQgZ z6p6E%1fOT$D4r|iNrc=m`Q49crDx%n0>TOZKHti*Qe=E5mGhkE-M_%(TBm&T>4jIo z#BXDlZ$4G}RktQ)deTPBpE@P6Sg` zt`gu{@}B}{=Jq>h-Km*2>lkt&*9RglKNpZ1d1t-LATF=rpT4|;Df|KJ?f0Zj@HF-M zbaC6P^l>cX{kZatXzO#(l7PlLqmQqYMk`?Sv!gsDoM}sBWk_h}&EK2emlI4;XeCF- zwn+%iGVuSFL?FDS<})j^I=eIz|=@G%6EQ*&WpMAs#zivg{}r>>*y`KrlgAn?|`$ zZ2+-C{%`PD;xx>F+*%#38Edpg9vzNTg6a`?;fs5H36&5*9a~xR^opxvw<>A1eJjbe zyK`Wjz#zY1^6HyUaByUyV7r7WN~w0%90WiocG6as?k_b*p5Bw?Gy$We1 zzj~{G5Mj?&#E*__Fu)-5(0J+&h+`J~V#BZL)u)9)HnL+Zeqt2A%6c5GT3W`#)cl~; zqr;9)MilX@%pN_9H6_4)yK)FL5c*t3KS2=|syQL5l9Oi$H&DapZJc}lyO-=m)*vFa zo97?SFyXOO{E{eWR!|H>g&+^5&Pp!Mn4qINU?|H@6`fr(#YX7dOP7@C_ZjC|JTM^Izys7p&vP8`?kcMtL5&2A$MP#(yYV6CAx`G z29{O2JW(ra@rIUf8zcx72QO|CN+lL*)G6}77HE2%-Tqa_pII$H!vB0hcfPVAw_5Wb zWgAnPFVc6hqd*s4%znbiFHJ(V&{b5dpMo#t*OB#DLZU*U;>^u4J9-G=%+;8h-TFF6H}~a4zn=97!f<&!lna@6+oCg!b#P5)jI%);YuZX6ZghPdBF&_+%Q61Q zVoxSKA#f_&auK&a*T{6_oI=*i2X&mq5OwWv{C*==`240*zkV~w^j$!Be0Aiy{){~1 zo{`l`Hp@m;mHSUSqUaul3}^da0Do6rVBz}!%ABmQ-w3w|( z--Z6WG*}KBXWTbri;{xQ0-|x~yr_Y{@B%QzFIKf}8L>U?MmFr@)bF;&-hW10F>{St zr%wEo8s1m5HeBbtVW}HP?~wiOAW90ZkEhvVvQ{lW0@%hmaz>1TfHlw5+K@VvZUqUQ$r-7U-K#l$X2qV`hPZMb%{C1 z8ywS1S>R&{IpvQcccVCavwxlJYqZN5uN+doo!(x?vDyh0{Y%=5cI&2GWEaB|JT}9` zZ_tcTdKmzJl)W%p%bY$V7dl_sK~)15wuy}>xq4>%U;5#ur#63~F5lE@P{nawrzJ%R z%`AqvCvH|zIwSBqsFS70<8Mt13eT<+xeLpl$Ete)0``8T5NqYq!f#zQS#2?od!cBf z&pay+t5}d|s{;y(N#j0edinAys2v45-a1>UTOD-^aj~R zx#*Uz&GjWRRZSv{TyIMYZ0}sfa6N}h>Rp6LX1Pf+WqGB+Wi01pyZtsA_UNt4!{|RP zosi8~GLnIJ=Tag(*@jSY#ye6L1?2#}rC;5Lgc73Q+LK7+bYr8niUwtt*MoLy+k213 zCYvZ=f7x6Fpxl;2^Op`qI{W1E%!xqVwmm^N?_NbmuyON4>{0n;MK0HS`7|loNv)y8 zLMq{-{Vs`aouqNz#^^(0t`J@>D`j;*pR8NaWP@Ir$!s{Xj;7SlbZU{{F)7#|HPeV?5B63-el_ z3d?_CNZ{CcAPSJW>40LN=OWo(v2##=Q^&bIVm#aMv+-*_PmMM|9W`R;?3jK^IXjcs zL@+j{|IebVs3jqP#|jIf6MiE z3k4&DiHIe{fVT&y4jJAEe3Wjc(&oI$_r0H%T+jQ+ux_L@9c^v|z5saKO&2jJDrvqy zt3wVO#VB&ehO9FbJ?$w^9f*RPCtNQmh$eri`@xn>>Qskia<4y(z0OD$<2m>;32L_yCF!(?GBcaR5tgHs z3OPZ+MD)?vrG2#%LqZU{hppd_Q{BhE>RT6gzjV~Qb}DLkEVkhZFv48j)!`$rF@tV! zEjKfytza>_FDKrS>ZVOamn@6YlmfKi)=xPM~0-EZJ#Nv8HumN7)yGp97 z?b;%@<{Rv`hz=*S63VQ`o^P>dzKie}hD!S#F|Gtc(W%0ZOPb}#(KF>0R8wCdScJ^_ z9HQ`5kY{HtL6d_J)PohJ~R%Qoj?sBHbqKn^@_3H^32C%g!v0}JpG()KLs3Z z7JS`GvPLx-_9x_TBkpju9{eCeJp#N^HvNnre%%NdG1AU^iqKjo5&r81e!$! zE3Tw0i?*F`y&bymT!*kYteX$4?~7hcYDUWV;Kgh%V0TIig@)J(MZFQ;hrX=Hy`AL2 z;_wA0okp$Rpb-@I&yl_vjLW4BoyK&Pa4C4J{4Qt^uh>Xa2+0Q$YIG3w(;AU_Cyq*JfMr@lOuMVwuo=(}3T}#&sv{*@G zJhbpE;Dj(`nC(hG9HIQd$w!hYYVqcYeUsXi&dirxde{r)P6C`D>8|?n<*Z-2z*pSR zg!HH29w08VLft7K(fy2viYvrZyUig5dDfuOR}wr>{xvo?$o<4+b-h^%L3;Q7`-tmvhim8Zv zkb!rq|) zRT}GQJceWZosmu`#Nx9ayNu}vj>}!T>g|QK^~Vc4J_bq0Um<=7NxjUdDA~HRaEfk# z`9e9XiTrakYbI>yz=rQfDBPpy^TX7(6!j}ILeS$3Sx0j#n3<(?$A_kVtB88yFt$?= z*$$H359}&YWfulKOFE_4ZuCaN-!t9nnBR~R1n?6g_nxF6WKx8jf0?@h3^*)LEtPAZ z$y=J~L1idq?!0bL3K0u|0F&A4W|Ry`OF{AhDFy zqbA>F63RLDTQS3s$}QNp#iE8`+#cu9v&#iml& zU+N{p^Mu|~okyxg72CbJ@>*UeK@~p{tfOSZi%xb>Ar@O-MH_mX_2Cj31Fp?OHD2j!`ZrNnuWo!`p3SIl5ko z@q7*P%$rL-BxLmQ$VQCI?ll#0P z4(3H5GFh=u%=2TD_;FR!(b5$5edUSLjS5ClD5N-^3kyk9_mL zIK{KYsW0Jnt<}Zu{013F;vfxHi@o-Ck<2CaDQ{CmE!?^Z7bLO`K?yQx g|GzIY6g{8N&$^dC@ITQSzkpuS;tFC_BKp7o5Ae@Qxc~qF literal 0 HcmV?d00001 diff --git a/docs/_static/notebooks/install_extensions.png b/docs/_static/notebooks/install_extensions.png new file mode 100644 index 0000000000000000000000000000000000000000..db026ce38f37c6c7d164bda34ab6c81f7c98a62e GIT binary patch literal 197959 zcmbrmNv`wCwkCF7$7v*x6G&vszy;Eccfq=7ilRu0VkL?aiyrGjti+lGJOIzaJ-6(J z2jX$qv+xS-ea^er&wye0-~1&i7z{?SVin(7i~pl#$p7g-{^$Sr#~*+Er>i2`fBf+u z#y|e}m;d>{{coV;fBB#OhyMe<{$;df;gA3IfB!H4=O6#_zx{X9#haQfE9>-+zmeyk zv%e8o(T&sJNbzq35%&GxlQPVQuo?f}rV|vw^`=Y8tW1-iIs`^g|B8|Sic=0w{f#`~ zIDF9D-)Wu;e(HyL+Wt1EcSl**;ok^}{yPRu{a3ealWra1)NtSf$Do)L;0!J>&>TA5 z80x==uT$UGshdW(68a(0B>Q)gf#UyqQyg9U8*zs7x_qbbC8zPbL${oZp=+Q-!U^K< z(De72k1z{|@*kQ&V@jtm{~3>I4P+2kSY3%yIy8X8Wv-`*26|I?>r|0!Y7 zWTI~8!=KOjeJmk#D~7{>*8Drb z-=eIme@FLQ(8Iw0sRk-|{JSYdrEZx_#ZO(1V1Gt|%9XUti$9-?Grt3F!apnjj$|xC zAi8~Unp&QYsnh=?uO+PK-zoo@!*SaGBw(1MFNv4UcUc733R4M-p@mUeTisYr zKN}%dp`N_ zeV#gn{8l)5#>2+0r(vXG=8kT$+xrt2pw3pU3+LaTs8EeBMG&v2lQ^PwSn(7m%ST2x z2vzv9{X{b6&=ZWnvx`8MF#p@u>6Gqj70LDbl=(ht?c-YY5tLEas#~?QN~7=Wv9Z@S zFU{&g>tZ}!+c%sGyrzt0dcHEc^Ina8Ez`%9F~sZfZ}m^Vb?>`Q;z<_7q#eVsERJ|Q zZQ-R9DQjSACOANi!aZBt^-~tgP0amke80;tSCk%;P1&{Khqau)#-}^oefQ&^>$Fd< z&j*V?Za}uqDaZ2{Vx#>i1&>a$UGe$B{4w@LOIMTo=}tdt@j@N&9H^GSSC(X6ddz%n z7~{Kv0*_=HH)xVJYFaO8YSPWJfF@huITC4FWi+rXcPg*nKg>Ih!^zNX=0=zG>R#-N z{Z1=_aN{i7*^}o}xVEF(nt>fm&;%`mzj0LU(siA?NUzfigI_nNx#aEp_BjpTw)^lr zKfY&=SG1j?!BMW`EBv-KY4HZtwtRWp?WCi&Y_-b-&ydi$dh7ku>mXScSiHbL2rNu= zS$oZdVNTyCtD?jLpAlGTs0o(SU~E6fgKw^4wht5xVke=*bUDe?mPoFur3u-){yj3~|5+42+DD|SaD%i-u#7QTf2VNvkQ zu<)R+zweFF0Da-TP(J*+Pi%H>{ryVw><`us_L*OfiSalZ<%_`i4#T$IW z5kFH!Vb8l8rpafWHM8>~-nSmpDmmTV2ZF9Vo@HHr;SLE?Shud6i|EVPqFhYdyt#y|SuO zpc&5RGpWPoCym+6vU~ECq_a5Ibwh0h(7n)Hk`2GV3H@@+Fr@-ror_*GV3(uI`xLGG z88H#wTAd`zHo{-#%X6QCjv(gyLcoT0>Z9-5ZY!om)S0%VZs)u?M@Kabn!YC{pK*?z za2FDUsGmHDG9sJL{UDJhMv`8dLGuqa+)Q=IKfJTF!SE^R^u>AtzFSMO$#yeqtvSw# zy1sV%3B)4Zl$IgmyG(EgaY3{CAYn2_UM3@)*ITE1rCv=3^OXa_l;myKvt--t`0=dO zdu=k0&^Gqy&IZ+)j6f|Fs<%VZrgx81M4A#mr;CsbxYFIs`<@0OtrEl{qrPTUgKmII zV(*yssWT=~`_K}1m#IgfH}V;Az44w`{OCH}`;zrEMdghyR~}-jn%BP6`Sc8(Yu2cz z@-5eM;RiSQa}BqfdUx(JwrdvJ)+E^w408^WIL=#lsL8?Nhc!Bj_7Y{E+aaW&6G$_o zyB^aK$({0=gVUPHJ6 zY3S{-y$ZA=)RvT9&7*MLMr%p3okfXpi<~?SFNV^m?&aK9#Ajsd{?X3I04Yug(rk~j*2^M`VTy|0A5Y#PGeUNJ79?BM|t<|cU8E;xY9*&FGPsaj{2 zg&S~RzB1O*@jS44sRJe{5!%AOdybDi)U2X;(z3zwJ0rO~W+I|yy|t?H6~o0^m$x*t zn&!^*!@j)?)_i2ggfS+V6w+nvTnmXQjw3~ujnXRQ(|L!?-iE-&Xa8{-7HxD?mW_cYVq zl=8ZPI`qk@lO72?O{?Fv>V#sYqGExnaPR}!#H@F-;D>+&1{Hl+cIbvwA$-AoXCpWF zp=gnaA{ZJTAb=o6;tviEQ5JDIA+@0y&}w3^(t@r_6Gg;+O)4*0IAumUd$DxTWW%_j zIM2zK{R%eSrt>3(n*|!Dlq0*6o4Z`nAU&V>ZSdxlI1V!VvI1V4xeZBzEF_neL~{uT zi_RxG_6B(pHpyL`N3LE$=aHA0UaLESHY@r`ZK-f_u_+oJ5;oPe~`38ZW!8M&<1`x+9Wa;iSSJh zXUKahGOrqTk2D+Guz9|v91OQ6-E{46PY247j_7>$SSGcs%=gK*s>F=5FK+XZrF&u! z3}PZK_sl+Q!<(RK?AJr*t?XLiaWVl)167QSU5kUyH@`#rKhW>nkGwZxU47{zeUhY@ z&%8Ki%`SyYbtoz7l0MZ#pEd=b`dmPSLVN9lO7u99KD}CoyP)1pgxsCyel=P3tl~9h zip8YVENm0OY`2?q4_~sfZ|c?!47Zgwc`!_v35Rr-L#A+gjBO&ohGbcb{K~>*Yb{;w z=G~o>oX(xLbL^g4Yt%U8Ra0}&;3`2At#xOF5jM5JCP#FA4H-u0w8i?GxaA=9&mv3o zh(h>1K9qG%c$Qo;ogntpQ%Xgg@?5yc`1wnoeR`(EyHUSW;`51%YP-+=HuM=kAAwJQ zZA9AYS0b8L-#dqFs0=`4c6d4laIF`q~FS|he4VV0#w zblg{6=3O$9MX?Q!;5D$xm7iF&Lz9Kjohs;`qo-p~ds!^QBs6y(ZYxG(uTfb|j%{xo zzg$CtoW+f3oxa2S6Og3@Q({^Zv}{yHCealiAx>(vUdi9Sd^-j;vYazSe%ME3fV4dK zlJgi44l3&}U`c7lMTDON>bm$<{gFIbkApd5li}$4I=e(9>V*8vjaLxRUKPzgzfm3B z5M>K{wDg$8Cn_-~`%Q_rPC3m-g19Bm!ek54qdK@s=C&uF&2J9&=^*({THS68rw?;> ziBghyr(|Ur*`~W75rnU01rpfoDz2(pS2f>2e*y`b2YIKH>dc=Q2D6{h)SPzI4^PNV zhP|UnQ8M7WSI(6K;Df0=i8TKx?iW1aj`(crNT&m4B3#`dTU|aLkVu_kb`TFI|(HJNc5_t<4 z=-+gsl}sNWfoi?z3PF%UJW!3lCY!n81XAvz(b_7Ookk~hT)rTqeHcB(uH^GNy}jX> z3zD*Tj4jx!*xH&VCfFmWuG9(bt1G`XIPbo8Q&2yHs=qlm*9KjUB0o7%Hv-q>q|3bv z`8eaPyUHGhorC*|>4iA@&H3rE&J&3^Um&>i=(9eYdqpq})+{0YMLNWzeP1MlseI`c zw8BpKFfPf(XQI8Y_ifXI{Kofh4Pz{sZ>IL9Q=TJnWB|1&{nAShPrGoQXS`>NTjR4O zMw-meJ9#1sW5Ml~;nj-^Xdh%r`l6E;;OyyH z*yC2!3I2HO;Oby`hCe*cyIf7Q?X_*OD8z7~+0^ycI34+P@dSQ3b!Q}kZDXE2X9jCP zRS8Y1?BnD#K5(N(M`jaJ_<^Vn)jrSBC~07>l60$wH_jfL#<^@2+UPBZxVHCtx*L-! z{N7As9I(T?cpiBzP!EA4fN@sqK(2(IqMEx5{J&09~K5^PHlx$;i zYhyY$eflmE#;_$Uk84hf!BLS`m%<$R#WI}Gip$1MX!klb+RLDGjU$a4ls0;i5|-hH zlNF_!HVjwIGAK>FxFTg-H8aya#sRkBE&?~F$dr`uJk3lv5uyWiOdC)1Bq)y-R#%Fz zOKInwkNfs`+-Q+uE2N7E-g#Qvg+5A&CpH#j=7#`WXHWK667! zRhqAgOX#oaOzBHi9sE2_R_P>3nlhw32zKumRY#k1#I7#F%;@p7qUPu&uMxFzefBPX zNp0t_5=~6c_Bt?gXGCQx%kw#2R>FZJ@I?a09gtUB$jVmO1$6na@TQp}U%1&!bb4ly(g$4d5MM%DYGv2!zD}WP zCI7m1rVKK;4U9$J2(Z~~-{DM~Vf!S@3sIrw7d4p_wb&u)Q(w3Z9;VU~zO5(kXHyHX zLxc#56R;JkC7K8>LyBe|fNyHc9gP?Wj9iGS0YM|Mw0rxk6`UbX1qVqvnD&||aY)r; zoe8c|*vu;o;O0iFGkCi4`)qCAe1X*!(kEhFT*yxFV?^SO@`bb>-BvO&W!IjP8+Z$t z+9fBk^t2rZLEgocRrynVlqQDLnO8F`8ox*DB{m!Yc0h}0BGm~!VQ$)H<2{74Y(N0e zMS(I?V5h*z&g;<~-Y#qyv4Z4`*adMp^=wA2d}^R)f=XUbNWyGOdmvL0iei8Zqk+U< z3;ece4Y=V1uB@+GAW=&dIKRj$VAg7dDy60oKC7u)vNcXh>L662j1QePPfl zDCIEgxWD^m9;2W-siEMS3{;T=IzZFN{n$fNV}f$eI=OCT*65D(t3($%{hi^5D%J;I z(wU0Gzjo?IozjMB%%!0EKqW2Lv;?0pQU^!1w}_5&@QLb++B9gl!-t*mDL%sa`oPmP z%P0yD`5*_~kvIoq$3Y7M;Pyr0uUGF)j^)0+kI{dsz9BzsD@V%l=WM^+?%_OCwT9}+ zC1uxU+hsF@$B9ms|02wbn6aomxCIXI#gQC9gI@(R*|I4+!(RGc7TkdQV*TyKeo=%t zM~J@^INO=twON*9%%C2E+64K0z}9&PthkXYU$7L~T}=auj9Y^jAiRNQMJa%$W<1t6 z?rGLTQPZ7MK+0$Jxk)`yRAZplWl1+5<&t`lcy5Q z5tzdmx@Y@U-zfg$K0w)R)7!8f6vWSE_mz$w!KJm|p45j^&xn=5=7R z;r&w3fQgI7GLeRM0TRyrX$18A`IfWYs$&qs65HFOuEsuj6FS-Zk>OqQ1e8`|CK8*r*Y?35)r8i!Y-HHq1JXZ(XB`2fyMKp_;Kc@Y+QT)gdOCz?|+i2|ENQcrK8L4rYI zKh8G(%<{t_jOOw4RP0guw_Sal$t@#>*HE+E`#LwB6O7;9?RQm7uZST-Uzsih}p8@Q-tSz8h>{22Iu&7GnAY(8i~@;StDksYm@ZkX``zE!e$WpFVK= zI#ok{E!M3A9Z~s6yHLl#l7z~^(O|i;e3oAg&8DgNjhtwdX(HLmrx4Nut=kxz^p$dL z+*IG7JhOl!2==l)%qD68UHbIPeuutm59oxjQA}?6yir`Uy^c{oMmaLTOb53%U0g79 z^LHP)?XBv$U0^wG=*(aMSRO!5=P}|O>)L3wjR&jC($z;g3RoTirjCK(QpGJ}n*u*G ze##dVX_*S({8xDPLIW1SbL9mwg{-KXC5;!HMwEGbL`~-%B4(U`Ge`$n;g`xs5>3kd z34%G`1gn8eRdBmI^crmJizlDe&l>cy|2za_5X-8XTjD@BYCh^Dm0j4ZiwTP+#2lIs zk_y7F*4YyAMk~eiN%>eORMUGEHe()$dY$g4<1wgqTgCR4F<~w{9?tS%Expt7HO&@c zu6*(#h3^tTuVmQ@&w^DF7I$wgi0nBKE}&b+1qcHW{9##ZK#e`a^6B@HWn#9tp(cSF zyb5QZJBU((PX3xXSv`=p7$KQ%L6;z)rV@Gk90< zC!^{aAAx=%T`2xcWH>*^6`%R3$-9|Eyz?lTi7ox2{*}FgDl0jufws4$C=`V@7#ufb z{Jty>&C-(pMd{ddI_Jr@ZD7~kmZ>-{_z_>iC3;otXUXm#V%~9i%eJ9DdV$nIaQ;6*EmL#gd8=ywMr=HSz$Y@EH@iR|6B%d>?D({GLzPiZ5c~ z8MbLS*{14j@}O_Qazz}rt0rZqFHv)HKu+lyMxV62%aS3q2s8vhVN1()XOCRz7JmEt zmWR01i%L`lq((P}=DHPdV}RL_(x#_!XK)hD+@yuK@3NH-+3rXLULI$sjjCE&*HpbSL;m%VMtZ0q2W+eQwj1ls)WK z=@xruBca7`3(LT)cd!gt{ZUf!oxS0?u846ZuR0(CpezcC>5SI1M_^OW>tv_Rhj@9> zX`CMy-mJ?*0>YEZ=v`S)aeC^S?y;x1u#IoLNRhDq;#QaY8zb(<*2!_1RMfRAGelHr zq9?nk9w6he;pv46l+gw2+=j={ossgGF^tK5?xu6S(}HVn^OlPmJ1aRN-mCLSOe0r~ z`N&SoLXW#Fx|ccmW%(3doh$GJ?Y56)i_eSu{b`bqUkgY>ej3c=}` zcP#K2fxTQQj`RBVWzMvJ@%A z_T8xotW8@dGtNPQe&`37G`0`aKWsY_Xkg<_N5$bv)h62EU6o*o2%YK$f|l(2a6Wci zv8Vj&-qBwl?J)oZKm?5Ru4TNqG#vwq=T4q|xkNK6#buXipo!qjczW(PwU!fpx2)sJ zaTK$x`?lb?-@I@~s!|MfFj;7BIA!mIj<9X2=%pMGzk40dt4;yu_;6$>CNsGp<8sx9 zqloTU+Vai84mWEfL+|kX?U9Gz)qMo>&9{!3Y}>@y8d(GP=i4=JNDz>UiS@yT7$wGx zmS#ouAfoLn?BdN@4z$LvmD4&&$){xFiVA5O%hp#Fe`y1&P;u*{kaLm)kqJ|zPM;f< zweskHb_{%_)ScRyv?{(H&Q+Ry>_j${5~Fs{@Kou=Uij;xP_crjqKzJmrszXICk*W` zQ}d$Cq}Iv&A__|p2}8(p`c*r!&pGdIo$A9w5!Kjr+X@Ph3FZRbz%*UP_dS~2kL0mf zxA79`_=kR&lma?#^dLym-NEv1$EhbAmjLsveb)fTKIfFDXd*)Feh{Or8PUuf7t%OV zD#F+~@%ypiF%pdyEMj4X9!Q@}`Is|Lr6j9PV^mG9nsWjit7)G&&b6Dg%i^-YQ z7LT1L&mwQXhz{5>{kzk*CpE4No3x#rX<}9Fy(u-Uf6gRXnJ@dZOWo^SwiIX%0>X+( zw0cwHFYtRIX7TzV0;CC4E?7X%jJGXd*0~0b+Z^ z?eMA)6Q(w~0LL}^IS)^K6gRYweI*Od(Y;|MKV~E6knG+1u*b1@2{ujdHW_GSW6jzV z76r5B#yj0j_;opsV{Men4cT}E;qPi6)#>*fkK-h`L2kwHjlvAZAZTf>#Ne;db zcbS2p6Rm!<&O%n0Z<`iZ6&O1z$fUI5kw~nOA`RvT?NJX1ccWrcLA`GueHv~7&GS+T zazehn?xuW`9?N;`3faEajAeUiJp%7lhaqBPNHqIMS|b|F{E+kGHn^Ik z;WYAJis0G#Jj}ap-t)}D!%MghyMF7}E{bP`Fl2soc8g-qACa4F4%#_3;`W@_=)Kj- z71?xoUH0%56`f%ni<>qf{ZN<*Jm3XODAm{I*|pS?q~z!<#6favJAAFC@%{X!w;r)r zI4(<7-WYo^hTRB=UVs*Hf1qL~ zM9S3FkktVw#=cLvo!s<~d3q_7;BoI*3aO)yFY1v&G*dc#z~+H_m9OT!6de&ScSX>I z`NIhB+l{9vXwI-7Imjr%H!{<)UhQ+R3rqCj;2lx=2stVHV zND-w0?*fIiO@*=75mTn<5|1&12NbeXOg>rJmPqyILiI$#E&xvng`9CA@iC>S9+CVf z7nQs(sg5G2075#6aU@ecy>Ryz)qlWJt*TeLMJ!o0q`M|8&!2ZpX)i35TDp<-V6aMl zapLsyZRc;*USb9?lwp0}+!-((#}o_z>tb$p0TiLAt0_XX2gKus!2&rsTn>TBJe7!I zCCA*|w!!ZYFbc$$=?V*6uBvLHKhw$FhzmL36h&d=A>PDthFCF(W@X^%a6nuH^gg0V z9o)9f=3|*t)C`~I&+N*E4)G0Mm}Z=4IhzM4zD&In+%_~2DhW3xHTaJs-N{q%^&Q3_ zj4f^@qnD>s&W-%>nY?ImSrtHbg`5PiwFWZASW$=ATOu+RWHUZy_qcPQwpkVgxDhNa z2kxs5Dq;cA0?)EWpRjSt`U^S;-&#t2K@sB(`1R+Kp=x*Ue7_$8p@Oc!i!4qIv8+z~MJwgjF0aeaPcY7H)6Bmbb=Ocx6Xm(|MRQbt^}WUq6@fN2pT zW+oZ#X=o~TkNP~S4O=y}P^$E(QC?CD71%I)MVlVdpMVJihIxY6iX{%ezOICxWm3r4|bM}h~*Eg5HA z;XT5cFuhrUb1~=a3(CcNFQbfaCyunU$O(i2RNrlU!Cl@Nn_Y&a<`PlAB*?m+CtU<= zO7M|nW5%@|vWGIy3rD=^3(G-*gbG4xT9#$)z}p3B2bUth1i{%Ld`_1tmBsRi>n5Z- zWD#^m5=iHRpWfiV+qawVY0JLRitq-h<|X2xM0oD!Ub1EsIw6RNb-;lCg(%i(udfv$!eb5{*8{vw-z9DmWx&FL~ES?T3szV^- zI;+YJS7eY&WGPH!psk~)RdzrqyV-1R#3=3{4q3}VuwkHF_y=i4Mh*^xRPtVzj)nf^g>o7@x5)x@gC#0rn}L}bYGdVB@jn2h%=WoKEsg4>`^9NIK13j z7Lp>`P981zQl4n2!{dDRi4{wTRmcXl6n8F2==Zw#4AS=Oz`Ag-Qi9$M0?h7#iI1}@ zA2cJ6@xeAu`@E?qh!!+q{1S zj)Guy=s@ro&O#+QfSL`E=;H9Tj+vG4DT_?;i-`>w6+hiSRTQ;3qSh`7psJGJA#K zuA%>4F;_3ePAIpDGtO>!Wn-01aira4ScNzc*I^%(#J)UJn%=HkG@YexY-a_7Cap-3 zKMp@O5uLi@Ih;%q%u4w2a}X=EkyH;XQ&y#|))fQ+TuDD5V!Dre_L(M~+%_(T;ERK# zVAmc`*cph!N1$IypD$4R)lc4b0rclk5<*Pipv($lDDr7^i}w`^X$ss(a;v(^qFJ(U zsbZdT<=*>{`w;R-YKTuBU62Wr=Z>bsSs8FH2#F~%6;P=3{1k`r#DUCX!TEO7jbCO& zfMfR*6zD5?*p-&cqg|uD=_}Ia>7TbK&0w%JG8Vfu-3m`pPu{7@s>v$?S0~^sR*wwP z_=~$~=bN$PY#x#vQNT(|vNyu3Wmmp(F~$e&37p;Z z{y8TWKE1Azan$FgXm8u)v9rp?fJ;bkD;L_ja5}YD{^hjSvc%pXu*d?N*OTax;Ug zfxAyOUkz}o5#kOiE<5s}k?ZaQUL7W8`Q2R*t5$gv@NKqd&hSe*m3?L2LoT~|F>zvB zdtt#(5HB$n?NfiNE4ij*w9^)neeG>VFo35Mr@X=>Bk13IOvesQjC) zn@HI@UEd3*wja3ueo9qcK!jSea>vPT!2G6ARE7}J$$&-R&Plu%BvwSCH9!n;@=A;~ zqUG#p(lrQp+q!2IjZhE;C53-=5Fq*0t3K&sjK z+67I09*|$!#I5;$n3g&v|S}jz33AI z?Z=1vT2j2KBqOqPC2?q0WpezDL5R(FTSnIT!i~a2C~}hZHJK*u%8h7eW$g9c2(RfP ze~d?FRnO<=VB?F2F=$I3T*^GAj3GEj9Fhk`Koq;Afnj{ENgjf2t~|w>fLvOn@`VGZ zwxV(n#(2v5y`5NeQQ)*Vm?i@uIH)~etoFH49Pat?o-r&d=sFs|xLU$-!ZYPe7H{M* zHPdh0r%&Co+{4o9o1Ldr(%P!YjeSi!2B*pg-0GtbX*9YFlm{_egHMOKT9}^huVsqsL%9lIA?5r$@wW2SeU) zhGt%n__BdSk_KP(D>>bxAhdU|Ci%aoRXuby~;W+3%|Z7%p1Vc6Ht+fKz%5I?7R4TNmlaJCL+T zT^2RwX+oYmt+y-qPAv#UfmE=eUkJh$uPwFomjhyim#l3X?y|2Bu&QrrZy(zTG!*KT zsAb-j#v*1Cmx*DLTkX597D05Nlt;S89_xM3Czuopnihf=6EPnqQc}}nkeu1yNN7M* zE_{-J8@?gC<2kvLhxRH(K(<2U;==t2(DC$_M5r!+YAq13B&M?s&^9SGmZ?1t5n_(@ ztp$xy*x2eB&j~!CFX=sV^fb26*vw$tQ_z+zi;I-}5r3Tu(;JdF(esc1Qgi_#ua!KV z2Xc3*-RC-F-&W0Sst}sw^CyqOA^4X|^S&lzciCxM0nahRhcHg5zg-`?h0HBlGcrN# zA+D|dnC5ezeF9O3Y?XIc#?~ElXCZUwtJ7wg0P%Jvx+w|2ZogoabF4`L1Au5X56bU= zR4(ADoHizepi?HuHwt_(hE|$=^m_SqgshG5-htoaDFDzg_8RxB`X`2eAR-rHNQeix zPe&wvz7zSzHK9Y&afTF}lm)Rm*A}q&#*GU`y>pI!*Xs>WKxU;f@ zhH-r?d;o!sC+=30etf%&;Q!+x2ch+Ah%V}x#jx$*1AgmE`H{q3k0B)5sGJwMRYH;` zZYB1!PSbsH1z^e9eJ~OBS>JaFWletnWSjon9|OPAN`uq~P(^PO^Tm~;{uZdXllST| z)@ML(j$!JZazM(xwFWulN8b8NKDU*3`A{`T1F3p8;{8nZ4e}uO*N=u^sTd-@0Z1Z) z`F!rN(dmoS8Ug0r(Zn#WX9ublL~)QpL}RN4*Sh$#b0|M|(f3EM;HSiRkl}jE49GqF z`s@$;P@WzA@|TA3eK}7cqsFwu!acjL`_yQ5SRf>@PqpVbf4Il~7Y+j%y01SobpN9F zA1$c!upQ85=optmg4~s7y=t|{7fWl;0O(uFY@jGfXlZI%&ob~%(NMn{EW>=rj80O< z@S6K(LnSz{j-zk9_PRlULnPn~j=0+6`FK;A!~+q|UdB8i9HufFGGr`6d=D(GF5-q+ zMMa{pgrKbnu-WaE8U z4!XlDSd7?YJpQ`Y=28vIO7x_sZshgrM++nw@=<2iK%8R7x%>C2@x)d3fOOC_0CH~O{_bz_0TK7h8!6+4c?eGN#y6BU zE2MV~!s)?NjF$Awk|Ctll-~?#6(MgMK7~)nK?bjUZ8z@2;m3I2RUPuA!{~~QeTKv{ zfj3T-EiKO0;MqZseK@k~Ca}uL_U-%V06TdO_aF$T-l~sohPi>LJ32V&Msj>nKPo$7 z9q~12u)P9MUy41+v#JYhUoyRyAm*8+V33#Y`a8po?Q$GG+VZ zk{o@XpSJ-beZ%yiiJEgSPlyO^=4pqZiq-|jiD5a<322=`?x5k=hEJi5*XpImAhcX)l!7%2A3N&F^w40|rH_&eh z{)LvSzCM^w&X1{AFw;Eq3s8dOr*@LP7Q~**+V0U(J0=WNFio?4Fr4B#T zJ35EkJpZXJHBKg*Lk~zME#sZNH=O}P5$>|5KA{W)J|)}^*LnZEv7kU(eO%w)fsXY( znA!V%+>`pM>luCd&~sW?+K2+aJc2I*?|6%8L8xQDUiU{PKMKgn*ws!Q?(=-wKQG9x zbtn9`8U&H8a98lq)-Gn`t-x{ybc8mHe$MGCSRoI`O8w};#^ zkn)l6Ra>cGh4e~VqX_z^cv(IcSz^Tpf8q_Ba~pRJZRYw$I+a<{eNy!U^90`uA>Uzg zrQ`yRYjzYLG#*jmHkvt}h!a|u^CyF-28juI)myi{a?$!h_$|EJ=(d!ua={}|A}`=l z?-v#mg?4j=*@8qsHXyqG;~E!$cxX10Fu+n-;=DKfq%qtyRNczE{z3>czd7oxTk!2fTvM}R1N(UwO2mPkS|5&$YKskUv+W_0Lph4R7NNc z_qWI)&F#8F(()KNTzE&LIYn!g3qC~ub9m5Pde@}MLH1ROwC(X$A{Zzv3_XT*v`V~wv`Jx~wGcOj}kOvK3&do@zvK!CLM)m7E;!LDXQ%JvFklv7S z=Ga1IX&6XhOiwMurOi`g)AX<#=4YJr;NE)FQ6QZwv6j)*Ht=4qpDLc_kC|8QVy%2IjD zM1$-yq`GbGJf3G9nh6sz(QB%U+m(zDcWw9QcV6);l)+FaS7x;dUu!5eK7`q zCblZ@eh~06orSY?I7u)Gu6FMfpUU6*O^)+`fX=0_4}Zrlgp*7ZB(Ff5A{{ewd`Sr~ z(63S{6W}1#*Wu|zSuxIhc$`@4j0Dy8=1b-%PZk869dqMf6b<2h@wsfby5U~0CVR7@3hbB-k7H*o@S?e|;&|2Z z(}FOZ?g9fOQd}jet0>y-GTaFW{RrzI!)KO-7jJ+wXSp(~9+5?qb4km89xQ8`8#s_r z;K!*oCex)Omp{peUg@&0K{g9v2k=rM)N!=7Ht;dlYpSdayhoCZ54>f>%ogg5WLPbS zm>do?sdV&HcOxyHdZPEsNN2VKxMhW$aUPpjjd!P<1Xf}kqHE%+zp9KzofY7YcLBUo zgu3+D1u;OMYj zOQ1f?l8My`$WI{V3hlU&1)S^$$RtF9%n*3(FXsqT8U>@-6#_+bq#H@F(gF~^P#d7D zaF=R)_%aja89C*<9m3^IenM9AvDgLb?(;P|^ShEL@>;#6#pcgsV%)47QC+d1E8&GA340kNq}S8w zMyu6G`dDGw>e)W`!n9XsuOme@MoifjPb+tQTrV?mr5!P+2?&Ze)x(xGUH6 zMwkJ3_TxRC?$T;eGacs>tKRJLj9F2W<}|=p&>>Fg+xAWp05{|Pz=0>!3YJ`{9KUV% zk9*{uQaoGTScK3Bl(`JD+YR0h!#<-LB3QKZbG!JH&=}yQPq|3fJx)c7yD9MQt*t{- zA_WoFy(@rUJ93`35~(W2tZL@@{lxTXh9n}Wc4m;t$InlLQK%B~$`%TO`cq??P9hCg zfWoEGs&7)wnfaUL8v%k#&Ul2&Hkc<6pAYmXEJxaTq@sbP5H<@~&VrT|Q@N4Ey}{IS zMNBi;2tb=pwDJvXgDMgKJoX|zaBek>5L3ayd8 zIyK&ehNZNKi+2L~vLM~xA_#ba52@}**BjG}u`n?%LX(k9wGI&_aRRS9;MYxv&3}#a zgV^L{Am9FJfmcb@j?Hq|=eqd8NNyA)U!L;m40qX}^++-|vM*K}!-9B#jgve={y^5N zAYb@}KKEk8>n80XxzuS)csi9Za)Cdi6-t$(&K!<`Yf3q#%XgRYTU>#q<9JE68YC8$ zBkU!?&Eyu=MIveg^7>kdIJmGfp@Yi7M#MI;HBx4p-wy~WofAyi1a zMMC&_6dirVJ}0A8sit_e5EdT=_0%*F?h4o82qEdE6J2;E2WxE22~zGkYuMus-bci! z=Suv)*m|=rRh4dQ_b*Wwmm(r6m52)5NvTvKHT?S1BiFm$z1z3XTG{5DnW?A{M2r}t zkEfrjIx4RMnWayh@iY?I!!o5Broe2;5PzwHtmNa;EH# z80)Et-f|mBNb#hzBAMqwiwCc#m<-RI`b`FP^dLpGe zZcM6cnn&4Ox`_8Q@6kB8@zHIi{6hIr4~Jn6(YdEFZGHN#T$+zusCmKpaBj-D)~Gy?=5h>y?a&@%6Yg_D;vtO6J~U)4oWTaX88BOb0?Gd$F*c zLVxHpa+G%}9mK8dJ4hlRW*)?8;N-sX)Lr^XM2|5@;H<>;TnUe_XP;OMCCJJY!y{|Q zrY>dRm60*3Bp||U%)iurMOVdnrh+(+I1w|9vP%$h{N2>Nta|Z7SDq(8bEHF0S^+is zd76iDS2VgU9o{0~2gc%iOxMUbXNvXEX?Y@O9?ij)7(a>1a`vZf+Qx2-66pv~1SD+! zVw~mXmK8Heu`43(Ql+B4^1Rggl1n#aX(_v#pbg;L^(IhiO=1>&F`U_|S-51}NUpkx z{q2{sy}Y~8_nf|_n~-?lG`sP0mQDwj5dki6j@+Lx9ginMf1@)p?y7%2xY#S#V5dlq z#IHi)n6xJ7IYM;&p#1CXz+UxG6f_FGV|vw-eQz6*YN7-MMf^gkV{YHk3xKt(ex54P zKsvu@xx4cGNz?)20_08I+ba20_G{|?2Cb{IR`;vjnDHz1!s?QV&x}uwO{@EIN57@4whe-L2?W2Z~W=W+^x&`)wrC;e0<64a@$Pv z_Z;F4tCrF^>*`3tbbO7h&}rz>59p^Me@`CvhJqm^6=(uSYco&EU56<6^|c2>ee^e} zUxCzs;DCi%f~|LFGkHxh8G{&md4K$r#U!idIY;EUrL=@ePs4fM#{F<)g!8itw)>yB zOcO`|%QM#1NZvjq3d8avS3EkdSC>dhPM7+*X{Q$8-C1iu5n-74xTreuUfv+9zh-(8Ml}CX<98SxQPc*;J$9}qZLLuM^~GNveK;bCVd7W zPtCuDI(h+985#%-tD{OH-44N8yde>IM8B>aZtL2dO67Is`pa(Cu4L`0srM}~ta|tc zo~l~j?ipS0$b$^pjb~OW5tkiHagKIjaXY8fey(mi&OJn#hB#;q+BZXYZuP@>FxK`z+pTBzbIE0Os zi-Yi5mJuDR*{=<8RIgOaDOQVz%^wbhcI0IAqe*+fB&>!cjJCAsmy7jzK1q~u8BxmM zGxy`GDV8OONl4>{R!>spAMXM~<)A{xBFj)S35_fXH{FI@IEcR}{p=BU9#CH?2oBGEz zBTwt^8b2@4o#qh!rJf_U(^U(FwQ*wEANJMocns zHWEo#fhWLZRYu00#%_5J~==j1q#gxA}YM-unvg>h+8;cWY*quD}Vo68)5iZd7DtJNK-{gw%%ju8oPd%Xb^qp0C=s z^dAqbE?QNDfjL11 zoTY#hd`eaa;fHkmwb)zS?0oanAw>!+$~3*R$qdgc*Ajd(%-`oNR;sUIL5s2`w0G$|%NF#A6t)KvgHN5F$g!VcTpa;13v zB&{2_klk94OuVKSMQOaLSCi#MyV+m zW+WfrJ)h-+|CJa+24WFE2v(oQAzefM$R%cEZKToau-BxC*LCe##d3be&8Udxk{NZg zBhL|YyBUezN4`Czba;O!#_Mj+q6=yFm`-FM|NM9RrYDyXgwlk z(=x|hWp()!WgiJ`A|adh4$+T*ebZy_xLS4F{ceAK7l@Uh-5+iR6-A-vo0ap>YS?^6qnk2tJjkk7dDFhg}9! ziH0Uy^SkmX4j+lkd^O^+3%7+MKag20I|}2DuNZYnffzhsJZL&qybG2K4^t<8oEv^J zPHFjyBeI5jp!&U_eIgNr9=ijxe}agkJkz(T$cK->jHv?p*$a3IgAt=f+8Ye8Mc~de zWNuTtNS3KeKG8>nqR-d0fNYB&NJxjYPJtAE*jWQ=wejRUyOBh{^;Xu0cF%yP)_TSNAx4LKFa#%8~s zgj#}>m)>qieP{bq43w`kjsA@GetIx#3#1s?zINdmMWF?^4Qgxcwm_9t^q#Iu-z5Ma0 zX}ZY|axgFe8!&%rnqNeG`}xCRN6C-r*%J%F=X#m9(;oB@G9`P%Cq!YsMtkNW?r#DP zCg(GiMbf>Z$$8s>&P0#47jx+gJ#3`~j$tG#7A*|BryH3Fy=jaW4cv+UDjoK22dI>} zk!1+SP$JL&JxoO0P=Y@2{p|~ANo@{@H}IW17w6P{dA6j}EiH(-C7Uhv{+F|`o(|r= z^-sqKK#-P`+z;8|@w?E)YEeQPp|`AH>oYcU)g2t|T2}O{1bGp5e*zaIHXCtI?jh0B zgPe?Nw$xj*&fG{OC zH%c6~DdjF)DRr{SpxIj1DzztE56#TFtUKXB8c-DB!YS?Xbsur=wY(h(Jk7eS2}NgLo*elM%n$gGlxloaht1J>?bOF`8)&hQqOOqhNTm&o zhMtm9b32V#GlBJM*9N`p0VO{1VFvCxkj3PbJvw|#_p*(u@LrVOb$G3w%=z8cXd`9Q z&k=MD=`JZ>n=WG%h(xn$hiV)-QJ&)^V&>RnDxQ;zT}&OxEY+{HET<3u+^E*qaOL9r z2IGg&gEeW)_DthnY2k5F^!>4=E` z;??mR0xb z0K6wvFs08(?;TDRAR)*rw&+BgJdk+W_JzE`#6+Gm=e$X_yu{E+!vjaO7sK-e-K6+F z@Xl)#NlU;d@*l3AT+#M)`G=ZR+^sNd04|3WOV1#=E8oIg=T1I*e7#luYZ!ZQ=i&VeRT=M>P2p z9~1NP)Jo~NBN|#oH94!Qp42&HqKbasQ?e6*gc<5X%x!4X*^}`Xm{m!a>sUUG`>x(a z;+;30JYeJx+V4k53`#Nt*|r$3=(^)A`2x3-Znqhl@nXble)v%M{mD)?=}%EeQWE!) z{)Z%VEiYd*_WdUCwdw?VQVJwpUi&rZPE{Z1<1t0FEe;-uqwm~Q#Tm1_klVA+B67pK z#qxJAEXH`T=;x^m=+utTfQ~M6P>fUVNg2WrtyKB)o3B%gqPuU)2;*~K^mUd~*2eZH zk-5gQ85H-(0-Mk0R|_~}%O4kh{OIjiWj4he*b$7{FgrAb5PVi8%lPnWS0Zz)Q_j&} z_6Z{UyGS*3ymRcQd0PfvyiCgoU1vAo(PTE?pF`QwG=QSu}I$?PpAF_~V?N2~ax57=*E>#%c$Z`&`kgSAqJhgiPmQS{vd zsh_VGzsN=()L2^yYlsx&ZH_rXbPMUOx@Yvfq)91io^SiLA9D1k`e4xDC1RjS(c+)# zllFSsSDrwC@MCrvS+@_RNFBm=NFKOx@a-sY4dZ+PuQTqY_fmiWa2$H6xeZC~>j_zM z$xM+Y=5RRt$pY|9*+j*{WSbcOHWuc}kx_;JkM6_T2gLtpcH>&;!&x&xCcMEgY60aquDv*N`RVl0NS(GL114J-E*@_x2*e@oK;Lug4k) zemAO=MCEtvkdE^u__FRxL>C74gM`vJ{)eIDy8CkbM+@oQmi8QVWtws4Pk|1!rnD!r z61(P>5tdpdFgMR&;DW^NtnPqk7wi5O#9ok2)H$sH&kZY3k1ze@_r&&Jrorl`^3#g#;0`*&*6VO3l5-4#!NdjCyiMMcc9Pj!qF2?B}Wvhj>i^LcxD>rA8tj_jSMiJG;Q5D*L_fP)Y7~!x7-7N-E@(MGq(* zci{iloPwldkv^*y(?|w&S+TyuaEg6sxGm)Fv`%uZvh6Z0QB}4TYzq&x1j764M5t$F z&4HTrbP1mK`RUis5t30TT+Lihpbq_Ak@j{8><4}gU$}nMf_aR~1}wzCc~I{>bM^L$ zPvxdMe##5qg+~!B&+`=P$^F>j1_w)pJ&Yrbq$1wwfIhAfqf`<0^fcpdL}p5YV1?%n zCh^t*`D2JucCw#EW}i zik-i&|Eg%+|8NEGrTovexs~6@rya87d<5@^mJn!HG}w^e%;m!?l0I4=Zy`|Ww8kpR4(!lT^0m3Tz>;pe?l47xB|av}+20yDvES9}V?an*D{r>E z-f?iDfB9%2&==0x6oIHn$)~}DdMSK`Jq=gc%5&5c>`>kEj)5o9rxnzbliJtRBf}=~ zp_r2c#1kO+ewcr+WvJgV5dLU($Ewr4mX$_dO}43gL=&0*=V#FxTo!#$HNaus0qZVC58jFFA> zK34k<8++%Ah7gz84n(q}NCkwv)zb+dr>?=4MOltNVN+0iz4)L4Tsn;m#iEGiRNHCh z8h0n~HB}ctU2#4kJ;2?`8h*Q8LTZ*j>tE42sOBbs4*nq1&%Ya)OyT&yb#zXAKUfZn zsF+ta64C)z$Tu+av?9ym&$S_Y)bC(X5j4(mK=M(VVGoxUbS_i;f^-7fOa1wI#u=$2 zGKK<(l|`$!oUG$6OB5B;fT=j<3tI%8Y{lre^{x5&~wGE9d(1V=)? zQ|*0$KCah}F2@#%R=cnskvT!5%oG6AXlxN}Er9X!^WY>2ELQwjOcT3^KfeT{T&ui5 zVLsUh|q&^t33|+y+Vm zAmkI@geta2S_H}({_@WuStrRlh!#_H7NAGq{SKh=d_46+e8YXmTA-LXA(24dR-BI; zWu;A#CHEjQOG2DGUmbpbVI}s2syFx&k1>2_OMW{0%Em5vHbO^@<1e~l1YIcg5ImCBeuj5Kw-|L1~UEbNbexQ)OZyX@bRkEV*=k@K-A zrpNLYc_qM2y1+YcWha4C=%;A1=T5+Ze-N|bc_0|$&&48(>NJQ56*Xw@TE13`sG()N z(7l77-K^|F<3=C2ldIla`@D+ti(cxWz*|+${M(OGigkXz?XpJcxbGv0O1yND`8$`0 zBi)^@UovUlMk$Nw*ArM6{&JpCxc^PMKY~ClEK8@3cE_Mswytmc;o+ei5BsxTn%<3e zM~CIyoxU}6`h=b*{L8EL^Yh8^!jrM>}7n;p{VxnG0iHZ$zLi?j`F#L#riH7RHdgg>m;hHKXF#IBnjolm`GpnziV#0E@sXg!^NbHe@$iC{Wb%h= zQD;IuU`RhJaAx*HdtEjM)Lku|5M~{v{_%JBoq5TeaJdu>pDN zJ$ru+Lc{$A`=8My;6U)_NBA}8o@bl;STEG&r-1cVJ{Ng;dEzCQ~h1h0Wue zJ9ob)>oz9Sz<^_GmFG*g$gJ5F_#-4St~=siGVEL9JK?!#JO0t6y>xP%#Gc6T`_gxD z*Qe2b_iOCr7-V0P@Hh!4sY(V!K?gT{%*&QbTzz5V2MhB{9|X+#qc+nye4BfoZjdT- zSTfplzBftcW0njYIDtdYFPPF-z z9HFdT2mSDUu`zS$pa$>%D)@kX_fb-u^caL_GQiLbEWhV&%7EARgO?_7Y7()UoSt{g zX8x`1)${e?40c8Db4O<3{*6SLuAe8$?Rex77>f*Ne8uWteTB6ewNx^Z?;EDs#WL`H zYrm^%birA%JX}Au(Wgf-##E`GkYVwL{OXd&1nR~IqJ6+bZb0dQrSiF^828uDLfz4K zbh-?iQiQ{0M;&|)ggPE8S6jWwTiSYN*O|2_o$b($%icZ1Fm>2pszZIF>1a=GV^u%H zw>*c~dwssIq7v+$YA@M~5s~dj>L1rAM0EALwrRd6YsX8$(-a879u0ERTDloOTxdmC zmdl6fzL_<@*bmp4^U)k;IE)(be$?{X-+gas=vh}UT0TeTH>9(Eja1;nb+jNcUZ#9d zI95BQ&!3dC;{il94o|(!V-XUEIkdZ6dyM1r-R%2bDn_Sz$bdff+y&hfj$@FMeRslx z3;HvNXz@OioyVj8BfxJU_TbbhXZ-_- zF-Ir^Eo4&7J(HR`k`Dsh+8s5^T|b23;q4w2u6qRO*(UFPz~kXCdiGz)E?v@Qd)M}rhM|@9cF^DxgzT$3Z$EUG>aoL4 z^!#O$akr`EM~m>(v2>}~*F!c?22rpeT*nW8*W{s`j12o|d}sP(NWzAqn4X-zGJ)R1 zt}WE&^`+G}efJZp8!(FfpV%Qp`RFkt?|(Tatz3F{09wf!QC4}NjB+-tpmq)~HlL5M z@TJ}l_^cOu`wV1D&1at*z=CWj-lZsPkb!La;&A@0TN_%TG5oUbb_t{V9jYT*sCP>4 zoppun{jQIy;mz!LKK>2T!Wzv?Dv0b9rfm73S7AM)b@aNiq~AP(N)Nx> zWOJ#CX&u>i7sVAVBK~!u>L4uulrBUxyAPWt#+Y4X@VsnSaLYHTn z{hW91YVVyP-qQZO=hWz!P?p;mdG;t`dwh^^jqgL{y%Bxv5*V8sYJr%64=dHMLdcg02FH3UvjRQkopgf=KvtakB zB%xbbxZL-&u&?KVoBI8)6}Mquiwr&O;-WueaZ0$Tk6aPtARSZYvKVA5p(qk&f4Ecy zN7!L|=ohm(F^6LL7rdcvy~@GP$5x2AUn;G|YBU$_FP%O5f%2H{=`sKO`~p}j@Ne(_ z)?wALvp+oEpJT%hm;qC_{oyO4^|fJaiR|nQThF%Rx4iS)-Q%r!Vkhc=SS=I8fA=h> z&xV511KU;Z(pAt)&LW&y0sy;ZS2*<55(WJ3EWt~!zo(3gDhif*-B$sL67%FA$5~)~ z^mE;_7>SepoO!bX9r9ufXiIOcTHHdRu}-IrmRV)@H@1l%K zr^sW!K$olyp*z5cDuYB}0JJCu9MIGgBpSL0Q>_`I&O273(ce807Atqje4CX;A)C3i z^mnG2t;vi{i}QMB4ff%l?h$sjp@|?;<59yyJ(>Kgn1*xv-IOVGqxFUZ1)qc}Nu0F- zv+j^v1v_3NXB-meplDSB?S&^cCN^@;>3(T=s{Jx%GvL;f0Gxc-{-@@_;y1kol z22#dUyw_GVkaefx@!5S1IewgH(Yk-($t05lCOevEqr8@uG6w9rW#buj<-*o-x1L~S z8TK@9H{9hELA2O`V;5idDhuO_iC~bmcB^-Yu-C`a4AB>@>f`HfCeD7_?;OEy?*;(( zVuPZRs$#6l&86(W6BGh3SFR;PxwzlZ1d`)5wTgzJ5KYWHkf!SL7uqvo(fUn<04 z1r(+fo_5$L!banqK;?JQb@ToP*pHJmr^x>%g?A=adQ0EuH5Izy=d3vI3gx1+yPEB> zbgH7#^$BKxqXa!PT0YN^fa}@&^PIAJzyCdT7_U;(9JBs=ls4af^QT)T%yEZCVMLi~ ze1}Ikj+xrKq`S1M`r{u@WoLp0JESHm8nUIA5Q^G$Dps8N*yn~Ukv+IrTI-k{Eu}i{%O4fP;j>}yEP9)4I4c+FC5O`K zg<~S6LsrzQtg<-?wsFKWx09~qSN0y|k<;Yx@~g1zwVP0z%lzKKTcXL#^C&u}2`u)} zlUTq|SI>F&_Zz;m-4DB8^l6zGDtuFS- zGoH+wGf*nQqqfxB{GD}x>RN3ZE`oawTE%T#It2_~9zf5lV^+rx;u6)a>fZJ|OuaJ_ zp~8@(zwUf%ao#jd9Kd(p&x8>V1w+V6^g|!s3rE7**=uxw?@}52qs;86pLdXcgLW}; zkoKPsTF~cRHC!-uF3}CX)BL2!ejV6HXt_SYyxBu>utFTjZ~zuvxvP4KKKl$D|0$pu z_#5Ii#b16f_P~t)of5Bb@WRU9P(0a)6i}pUmqb{|NzV`>$g@v#;<@OcsfkGaRWaj) z?%f}Hho!?cH1+r1J*x}9FTdRI>CZzRId8FdZ{~4F29^Y0xZ^Xta6NX_%1r4FE|5a@ z;0oS7NbUCbHnb! zq)-Lce+v_*=5=>~!|;!a{=Rc-7@_yVcgRJxm%uuo0#fsV=uqV7>KGi<83($pxwuOJ z3>?wG0bMq=llQyS`yLR`X#OMCf2z6e{9NTA+IyW+#*p}5`@wEsxk$&Xm^AEV{{Fv} z_*t|MM{_yAdT$6-3z9mNsGxxuJ`gk7)+31ZCt3XAUT2ZpKLAiO-*jmi+hciRHumLA z0eVTVQJ$mqcQbFm7atGD`aolre(k)@P4-V!gz)lt&P>47;Qv5R1u~U*adv_w?&R4WOLbOYKJ@cjfs!4}?6HYSZ80x}ZMUpW+q=O3slf z@Sp+({e@<^@*E}2X8{iP*i7lZ6ntT}Vb1m1y!xff&ie(x*KhQD_#V7^G+!^#HrpQS z2|W5OZ^q+Ky9V9HD=<(;*H6MqbQW4@{dM8OFA*gZxGcX>rSAlGbV$8YVG(7{(`fUGs2h*uTI0)9(KvPyb#UeC|HW%wML3EHZ)aPH+@NU- z1&Hn2WP_9DIU1S{q3;gC5BjE;$`K!j>uk<#-BLmKp|`d&OUt|HCi`r8o|oJsc(XNB zmyH`}^44r>mdK_CS^^Y;_G=#YVU%_LISIsT*A921KdRk5%&(@8q(b(sy&XI4UUCwU zVYIaM4ucpNPS-wm-KAa`s7s1pO_s;4*XXe6k4X%H!7N;4j9YK;{QqVM)oaFjdu-!} zyQ8Bwt&<)fyVF+Ows?9H_GrsL+&ZtfdPM{e-!L;rhEO)-{C?I=N$Y8nRLlmepP=#` zfRp5&@W$)CRKyuoI3YUkeyK;6Wt0$LX1OD|?Y}PtEZW^Ole&j8J`qc+Pikq=Ka(C9 z+L!N$fFw<3-9yTrcw%PxKf1%0OOric^(h%-Oaw9j$Up}Fwe%P?ZtXr1Bvl={{8A%1 z(q!|7EXTLIk|=%U84A|mFhwH9$qMT%^7)GF3|A*KY$rdDh~RqEBR&rokdY>kLtQmO^VhXP_ z?2rCYFag>E?kPX+%jWd6!krXXI)d^0T|Pqc3Q#gc4FoQDLmYtx8LOdBOsil_J_47C zPx)rs4WCFWpon)Oe>+lls1$*{uBYfEYb_0bj|f1RIU9^Fhu}1(gfCo}+;ZPm!Uda-wbB9ZOVcPYlg*a=S9(h=^S1HuArzh9%F z2?bNmGeCt!h=In*tz@v%zRCofB7?l;z_KPF&;<2*6~O-O@I?BY+tEBc0w2wkU#JQ{ zLsUoz3;`?bv$yq*l_lZ%Q_sl_vA#Y6Ht$5{^?k*$7Z|ggKIfYygKo~H)^UTW02q58uMNeHw28k@m&WgT z&|@N>8l!H7Q+$XIi6j@shcFdBH&L8otfuGbLNB|QnGfPsB9#xHwg;EAW5YNZff(fy_BUSmM6fg(%%U(^&69{Z; z@!0MksNW1~$!S~hkzDI@Xc>CiNc9Tr?As4~r9S)|#@T)q=NWJq@{wmaKe!??VbJ&M zKz?B|EW@a;a&kS^Wq&;#^U8v{if&K#j zShVA%vVWj(kTh1{Aei7)hI#4t?2a5tWisMAj>--XM)6tIV031WNd}&a%_RH$u>rR~ zb*g+!cId#tT9DLHfEgVN>C#h&{BN6x7mCLme$b~_Hy6{t>>25Uw#)ifzB-(1<@PWv z^s(=U>zGyE?WI<+_K+JU2m4CaW&=j4(o~b7x%4#M(Lc$gt!~(HItMs($UghJcz>q< zs>hzy(F2Zfz&eXYjq&%c`7(6Ql!YeJA{+(o)!%Wjt+`3v{i52e>}pK_=WxAOU*xv< z(V>1WR_JBQG^nhw2B*wubG~LDK>u_teJlC01MS+pfi70wLkm6q2%_PVYPCW`C9mQ5 ze)Gj&z|f%(qhSa64ZM@7#O17*8+ns`dtE4bd^VCHs#?#zJ>vN=$?y))V0?;5)gmQ; ze)rV%;xbvw!m@42wUe1vyFZp`6mB>WEHGL;zBr_?tS>zeCH0sy{#(p`eou8 zEvS`v)_+_cw|l&YGv5${frFVv{Ko9XW?fd`6j$4QMP8%z=)_bg`WY z<*Yv{lc&v#be*vf2r)f>Z>LSpFyR*?et?={(E4MF$ANv z9X7r=e*^TzijiN9CgM|;+-etPS`SyYrUKOtY?i(p?f?Pd(4G&FB<0Es8@u1Gdr^%NU##&=H(0~3I-C~SnW1^4DLsS+l$Ksl#C_p zR!V54vleRq)-G~lRL}hw9{ZGmJ*EB=mOs&|y`c#h?LzZ)-+{uwoRnyH{WXuDdR261 zE7SXt+F#at4Cg~o-$%y%oD@|T@4?5=QQMom{Z4o(9Gf8h>iRQx+h>dpC-+YAFX_Nf z@9>){S>*(!)+4i8^j>X$C{unrz>vET&7YK3RX6z%gK>2hAtK6zpdAHK17pCjx-bh24U?d_Bb`fmUOy<-W+MY-N=XHktbW(9Y0y^u^my6~q# zMl~K|NfG29v)=vyqU9?x)ubhxjV~R$jU^JAee7J8XgN*#g+hH$_>OIv^QD4^mCr_7l|JX8Tu>-uCZ&Wq% zeL->^>iKc^m}8vwjhp?53)$)%N6uRiCO)gDA$m?CT@2?o{k#fX^%EN7afFOA*j#@m z_~+5v<+L~nw68j}IOy6>gySb1VUFn{^7M9*3P$|t|8XFSFPrWNXz&Zl`#T~NQt&O9 z@O7%a@JqdtOL+_JnkLf#)AMM5`)6HvS@UE2(m(9KB{`SLY;&(%*<2CpL4mILP_aD&^!V6?C+k`?tPw;>QYNDb3O$3;xmiTGomq4 zn3=^Lc;*ZTh1&u42vBeVxF=kC;GZqjx%wx&hv*I_aYm#cKyIX~+dLT0&(+&~xes=w zA7(u1wXpv&3?N5l++yC*Bj1Skp_2|*kd;=2d5;ZDPVg~*8(B!!zk1X4v@!huITtKr z;!ITX@{bteS>e+|0crifRdz<28l0COe7_GEZtnyBE6k73ZUNyoK;)vgA^g(E#WD7< z?G+KBEZ9T^LoY^&G!+LwynD zTEL)8hpA-aO2AUaysRS}-wu_x-6GZmOlNkkXd>`Ho0Yx6u-v^rrTy`ndBC?xgSHZaV&{gTk_^ zm5F92mC{}A(v#&LnV1L!#3=8_1^D01TusirERSTmp@#|&;0^zm!s6seSV|AH$HQo_ zEsW=cb5j53{L~lcP7=CF1Dda&q~y+V&%Y^r1DbjrB#~^_kG+#^DkQ9U;5{RMd^R&} z8Qr^^HNIURf+S;>7Cz=fZ3oQ`hd3sE0!saKwB_-khqK9B6U|#8X+gP;WzphMp4 zA9=Ot$V{rmE`^5f;}Q+*wuQSTzCUgod@6Jyx}n|wuhW}ZM*`HIs?mVS_q%q~UcW&p z7fSU0c-7?l9*7$p%hO>dgC2hLd3)4LcmLbxT`^;bbfw0sy=~!UwP1@QK0e*--=N#P zE!xq3I^U&pSKCvcB;1GT&e?;#tsd3VJ=@jS526zkN-8txv}O<*N#OTdD5Z z1AC~jBT$|H@t3_Xio_e_;{Xt@1zE zm&F$o=UF>$H5oa_o1dQ(sK3clzeexJLG**$=NUM&+?2HX;+P6-Cx*R~v5$SN^kVnr zTvHCspz#t_<<4zy1*F$t3uIb7Z;|g8MrCZR*3n4x*Q8 z{&i`PgZ=%logXJ=MGabuyJjR&Ure^iNxDfMni=kIZ;fZz@4Z;_R*bCVy}Ew+zpV41 z9=zPfEGW3INp_G7(na-K5!pr(3GFO@95mdQao6(pT^ucf&16n z_Jns~=T8zAGjL!1f#oY>zWqA|K_V=Y8FFx#^ICZQQ%bht(BIl0i)-leh$*i$4Ak42Mi*RP|yX&-_e@5W* z&tTWj-}QWkg>Z=3{TlxMOn5={cD<^Ht2c;~md5a^#mO;K-G%qL~u( zAfsQWYUpIg31NW@-4K`Q(BUE_EAhpQDX@00z_pDD{|t``t^zBXyD_HnMqy!eGT zID!1$?Qrc>5TrhMMfjr7-7>qFxXFV2HJTnU*TpSD5K{yrdcjK0J3x&Z{wxCtSmUsXKSt8z+sk$qKVv?eIcY#L#Ork;mv4_FRaP+%X6*m<{dg1)kHo8-T{ zA3|thtT1VJK!(_tZAqr`(W1M=5d9f=eSG^fieYW%<&eVe=X*qtOiwc^4bym}6ro=k zrjrY{8Xzq0Qmzmr&nd7Sk|x@|RwCXl9@hW9o$>GT8B|ae#*a71+~b}5q5}{xqv--C zjK54Dqc>M3Yuby-EU~2^jkj3AgHCS9%|sxs_^>TBHjxgJSc*kQ_aE-P>v>g~Q$0w^ zB%f}T=j`D-EzEm~+K#WA>Y3=gfoKH@@?TFY^I<^s3*JLnCf#dZzmCQF5y@>vH|RFH zdAsdk;QAq?48wd<_&`YWw;j)@`S}%OM&FK-b-*> zmv&6}C5B<_myfhM1>VN~;ec1`in0Ph>uB5whNu~sQdhW_sBvyIVa%N&BBr+DC{0fu z=>ZyEi&)dN-7x5wO3L9ktd|IG%7q+RqajTma{v-xFOJ$v?+N_q&%eEbJIw{iJGp^T zZQUiG(D)cI2V7;+gr%6IW_lNtOIVjPu`yN2{9L5b~pWi)!tq z_2H@pWH*-j9NypeYCjojBXhRvpKc$oh~rYK^gFsu{&J=rc0=}aGSDmlCk30t)YNY{-PY;ldv05G;cOs8gh?&x)jQtS zp+#x5W8ug78l!DsFu9Pr!r3`fh;mpNUq!pWijiI&!58bUnsn%xDitrvcRNl-0%zFJ zaU{pw_R_wsW}&Ao^m#r{{EbX}Gv@uAqKsMxBaUo*uUk{U`Tviq>)KLP+qSV z-ajsI>UI|Y)d)=<|Noxsy@D%vna{0-8EgLysAMDbae%os;;z^ob1|zN*gDH|YYaz{ z!=It<2|;kU<&wru;)V8`vA-&ljac?tMG7dm?Q~2xT0>wa3hfpL~gmK4*H%Almo=8 z&gK4oSEVFYL0`e^f>PZw(kYvz7aHmcTq8uN^D1{+&V!4;z&)b`cj;-rbkKxJF%T3nOCH=(rW1*aQfGN%wH1gLY(Mivhz6G$4 zFHtB83prC87XG0m?s*)eBOKKKvDBg{RWc_v~tdb1F@(a7!c+p&4l0p_63+ z(mT-(q8~7+hCjocaW^`bXQPqX z5mS%y0{@-&n#aff-r&Utl{{55qQ4crtDoI(25AU6}!IsMv=)DW4b?P?iI0R1; zR#?d5UF^pO4%zQR=B5WsACiW=WjrB0iY5(MM|+fdHxbMKA9AaZ_`KX6j_2O75`B$# z5=BdnGebqk?e>R-qm04lCaAvhs>i&5s2$aGYB5L{p`OvWOt=uq1+pWoS4MTmb1 ztqHLI%oU6^J8(<5W^oNwk&_ssTAh^Ba^m^TUgtO$yv;-SI&0pxaFJ^{6d40yqeWji zK6qizU0YS%bx`jXxGWuUShl=JgkZXrDh=PuU z`1j`UKjABx)~wvK=f?|iw{p5~Ue%KFSneZKD4zq+st76->``36B=%!WLC~{EoYS+A zR__dL5t?WDTgp2MC1F(+*7mugub(#*4 zzL#na#wna9K`g6&b`|cGMvH@LlSy|XD>20^gb-C;ENL2Z{|1P$TbC3}sd3Px(zTc! z2&V&-1|m&>L!cypjo3rFZf1i*Sx5BK`qzqNPz^SvnM_NyQdxMGp=K9(FV;c$WJ#1wgh`=x{Jbvl$i z^rjyWCLTl*dot0kK+Y$Kax2Z-bbY8}NM^=DVhobwI{9qYIBKzk)b3yin`4!#bcVa0 zXd#Kl0UH2%0|c|6N=S3|g2G?;mR`sV^MRi#Yj_FEL!=UzkvVfYS~&Ioy_4wW8++mK z%aK953LlO07(}wKhgyKvea{ErAbk{A9+VYQ7WmHTs2E${0AcxIe~RigJo61F?H-%q@!?_1@&5$QC~kw#(WhkkXB@XzQ!;3f0It_f5fAy$1h-~ zt_HBgEkDEQtltFt?Do@g(*Swo-zk0KI1dN8Qm0WJw%zd&s%u0pU^bv6gguooaW^+) z+V30VI;<$hITEj^Kn(G-MP@+&AeX$ zg$RCiuN>~I2ZbKo4znslW-#$IU@0to0@+-l!)AN3`)M)YN-*yGe?M2v`0Ag+ph_ag zk(ppj+@Cc_N+`nw2Y2TW(Vf~=2(u=J1&5f z*^GA~UB1E3^Y4GY^7*){Fd1xnc{utLM@hq*m-F9*8`BUT$98v0F zgYr1CWw41{x<8$g|MuHZ-QLDN<6AL0s{NUapYX=aiHenSNIsWv7`B#L0Y}=aDLLqL z1Htz59SR5JJdMxghpPGS{t&0CpA&yOaZNAKqej)+x3`P}IHA6wvI4K%z%e)O8h_()r< z#|Q0-VUvwyWI8M|Y`{yKG>KCfa{R1KG`BsSjM#qQam%?YDF2q-xIp2-t=5cdihyer zhO+HP06dfMtq_!G%@WE^$~bOM&rdjly(;Llb;Ylh;O!R|n&GAcd4p0WA4jfMota%< z&LFSIq${##9K!;Z7sq1p?3y_=dUXXv?fw)6Fxv3s?`u)b!2mC+&1S8_qb%hi6 zB^RIMtcAhhV$zD>ahurJ%SD(M^Zh*){l0N$^1{je;(a8Iq^ywHryjiY-dvBJ7ad=G zGq?#^WDu5z>XDd2pgb4n3a|YtW0?$muOZ6I90LIedML-!ry$qd; zR5FG*2L`wTZI6FGn zurg!we7WGy{r9`&_nM!^w`4;m=U=TFUH^0$^b5fE$ZfcJ4!N#J%H+ax4L$>0)2|Do z!KP&o#8Cn5YMZpBaj!Y-S$WFUj7Q(SEO#ezuV8x7Z8l%}HkmdOLWT88jbAlk)Pex`w_&l^~!gd4}WxYY=ST*IhaX;E+pSH>K&~6dKac z@b6D8#VX0&^gsDsjBmcrmEC|91zsla_}%X6^>&j|Fjxa@DNYnjkbP^sA_e4Ntzc+3 z9E-o0UCNC8D1ZW(KHx6>wR&=W@W#K*x!uTFE5C_a+=7_b{}4gH_b6=L$~s(H%@PFiaaVb_(?KXio|p^bR&)%xQR2x=YtmXw$SFEIdxm9$N~a?O zP%BvkV1tuj3v&u}TeEeOMS1qAIvX+YQ%b+Ol*3-&bj~WI}bSGC#D*O zY5X)vpnub7mdWa2)!iG9UfT>lWF~~Ma18g?ueOJNLYkm{fuK@=Ps$zjmL6Q13DJ{5 z_M8li=j#Zd$&&;CXp(W$)fq`BE+ki2#97E7+syz+Q6~l@shf@#fzq9b$;H z2~Um7(<6vbW1O468T$6>!-33;|E{4jy*CU4V*wZpw!9@4@JHa}<8k9&R=&{%sfbD2 zmBwp`z}{~J2bEf^y6`PLg%z0;YTmTM=6;^S_rcLtK3;!Xb7+AF$VwHb0G6FS$j1y1 z?y-T-jYwW=T2VRNXhp)zKY2RM?iUJXx5hk$BEK?*3{(9BZ3Dw#zDo5(-if2 z{FUN=e4R*Uo0T!DHH15fEyA6a@g(Sa4&)q3yTL~nzyajj?Cpa!G5-2iPJ-&&yNICC zNfa;I=%liajN76VA7{JK#Lbx^YfUQ)b!VH1Hv}fF?YKiqm76V80tB6Q$r#i`*MYwc zSBz@X9zi?srO<3f?N~pCCuavAjbx`@Z&fX8P+7gGaD=M&w@3xOSTVRSybADxU=G6tZog&bhOCejyxNE+>E%DI zko|^?OTzlpiO&tW)SV-!Cq!e12L#5M@hfK6jlIbD1Qr;*!p6{-D5v}hU-!3kVbg9S z!}fCqw($Yl$1vQjR$+s_aRHmWKx?+Yq-|r}vzAwYu7!P3jeDuYx0@+wK#O&(!rtLq zfNu`pC+n$+kpm|)E1{s6X1jr!Xi@z7K-Yfx9o&YB$TIAX2UrpV9J}bb%U`$EnRLhG zIGe!;_rZ@tGO>?Ws>$hHYHVE%+pDPUJLu-JTzVUf1w$fs@>nRtuvV;mJ35(U&3e+& z%#o2sf_dFQgJ5v`i<(t3rM7nm6tDV5zU+Ws02yc+H^Gy6^Du-|aPA1%K(n?MsCR#T zT~Nnz9DtPke@f%uuL~Bp18o*Fc#JYMRmyu+yY1SNL;jvy$pY^ZaW;!Oq*pbjV!lbp6th813J zw5Z7AHcjAM(3xIxs3p9JL@XI2zgl!tuH_rqd8|Sp=0U=RxDr8{!J0;(bwRdj>OoSX zQuV>FVI=&eltw>MDu@7Oo749oJ><;9Jv08!q8vaP1hFD#*q`}|LSqS<_YeitO z!`i{zC2b&`P=PUdPps*3+(g;tU^BHGGs6O{=JGQ+Q^B}M6E1|@Tgr_d$AOv3wus<}}VcBC-RrQspQ3J=MU7opPt zWh1CdXA>}tco`H3ZA_g9Z%ypYfZMjl+=@xaxkGv3KG5bb<^XS#e@X%Rma<(+IZ)u6 zs2u;s0Xt$4B_IiDEHoC+?&hS(BuOISOkh9p95$5q^Pk2;u}z>nJx)zc=6fYSa#LHg#=$Y2Mx<^4gyM zRv=WgICnM<-=I}KbsN3ADM{ZZ8Rh}rKzEM8oF@HzuiDCTlP?~fp!yFF>++we<>-E~Y(>wj&rRdx-?m+df#P^&$q zJGc^hcTQw&%?BN0lCp47sSXEz@F&Qq&qx8nG)(-@DvH{;591;s*wF@a8jDM1+77eX z2+a0wpZwWC{85sj5t}%sNARyH>|tW3U3i7X_#8zg$9;O2$|6{J3p`)utFMj8ycb_X zz=;9o3ng~5n;JT=${-C_cCHU+7M6mX64Qlq249bvG?nK*KW{cuMqYS61d>HcWmdk~ zi$8Q6dB&a)UABP(Yau+PmgF5iU zf7~1Rz(I2o)|YS{Bs~R|PfVR@B%>tpBb6@7-fRk!NUZyApS{rCMN^-XZRurhTSO^*w3UL?~qHy=jB9J4H>z`10F!0*J;)DOom=Y(-0$F zE?vi<@rL-cA%@T}|4)_l>QK5<@u6W8GgGJ?bfs?J)eX`#Kwm>2QJ0mdI--gY=kRC_ ztJE+>5C`wVft`zu5g$Vr1iZ0H0)|&Hic72x5P(p2dx#pD?MuEb8IUWl=Jnpr&{C;@ zHn+8-SG|%3Idm%@vo0#3TKe4`6Gv`7<{Zk|L|Pgk13Gg_z^Pe8WcQia#`;^{AyO=! zhp}5AD_nU6JcE7R~}w61QZ?4=q0*k$vsKN5-KTyr{2Mu$T>L4JA*EOx@Y(_j9Bo&K-Pn^ zW_nigK;7C+y(J-EOcswfI*NulnNeSlvChDwowy!Qy(u}S_AFW+F!zEbHR`IQk(1r7 z?#U6@m?W;wjkuTxafX*763}b$5GoM!y!$aCv-VzNphY269jq0K_RfZo1fb>x2zsFY zAG||G3z}4#y5#6HWGWH3s|cW-MLrzAM;DHs^ie$(+1IV_R_J-JJsCrmB6(ilx9h__ zL9XT;-^N_sOnF64=Ted(%XH;~u@%At%G*sbtmzZj?Qdj}-inR)IY;V|H1irKz8DU~ zmHgdq0^jf$2Zk-p$&rJsnj1|M1i*k^K1;QHL(CaeJ-b5FW|hK~7DCf(I6wxTX=uea zpuNnSBR{a%sa7$itr*{=H`yRd;99~~YXLWFfi2b|<~GCe@VX*J9OV$gnaoO~M+|O2 zx-Az#96=c0j+W5(AFP_8Se`JLd<^&_D`FPQhl_K-nMef)O9>ODuQcA0SOHR23|V=} zf!2fFJv6&&c|r4XiufXpzulI)l%L|dZr#fJG|W@@WCAgZ?-J;>ITQ0Lg`y+(xSciT z0qmAYVmQ+BNR8pbRhXY7FG_bwpT@1pp#}py!F|h`C@txz^!c-3z|iq0cPuBT$n)@d z0jatNJF;qhB}32*B)P4Q-=G~)P_o104bMu5(s@xkI`u>4dWg%g04yL`X;?AS_Xm}P zbM-cWmQpf!chC^;AK;7Mp$Ei~17|2=}4P zaj9X^o;`QEYhe-WAlVh{yK{f){H00ZRmK>f*51!7o#gjgN;+kkp3K%beRlIC5B0bN z^OD{TOjQDRLV6T^kp^k{Y?X6^Or#*pJBhO=bZ(1g)0_@p;du!(Y7;*Zymj(nO1kW2 zOsrveR|ql^2#FG0>My*pPz%9Q36J3eyCbtn06n@$93`85k9eqL*%9^W#yW7Fde2BZ zAzGaeiS*~QYO2F+(W5)q8{bdAHIimMne_=_JA_^OCodSd>x3C z6bgU)#YTeiJU-*qm!h7IdmuacZ!qh(Ox=`|u6209{4tnNZ zU9IJ}#1Zqd_?4W0=UezIwDu+;fZngmC~ zd-jJKPswP=Ug2QljUWX1X@HchX&5chH&oR9VHbt$F0Kx6;WCX<4dx1x2aRuFHdl;5 z#3C|+ICaWj_$9t)YG7aF!~04LWUS;?zJCzmUZv&N<(gXuwuJ452f)(ABv#LW|751UPvxo)6boNjZA3^lHE>83Emmqf?+=`$W4 zbJn_mqIBZnc55YA#4i0!eHYGM)IQMtcqq(c5W*5_kdzN!2t$u;RtCGK@3j2gmI`5i)}R7~!c#S*#^h+fdaa+`a)b}5qIL0<{L zG@Kvpd#3%ZnAJ@qd`%m?+k`7>T9c9?b~eo5?0P~;ML{}it+G8Zk$G)AND zuW6sx`lv$>^kLpXqA^Pvh~=Z?dERhpF>aVuBYJ5PcazRF7W3r- z65#FyoDH6Qx|W(GRM&rPLyZDjC6^aMl%mRfox@gG8Pn;@*YMt#+eUo|NIvwGc|C_C z^Nhb4vmym*K$@{+GSiu!@4V#?qYo+TzIT+Sj(xjGi!FB) zPVW(xSE;0V&U`7x%|&8_ZW>kXa{Ge~f8h2~OFdA3vp_>YL^<5e&3`e5M^&853?f<9 z>3WC^+P;7dmeXov@W$!YI^t0b-mnsU)p=vbo0Ez@V=e9#4BztIb#PLz3=VSq?DHiZ z!r(;Nw-L2)_xM&Xud{nSs4+yU$23q(P67H$ddb877G*4=m*MjmFrZ5ZH#DrJ&>ztC z*jyiPm3MB>xBKu-EU}V47VVix)l2*~yw28!G=8Rb4H#^}Wa`y77UN@Phi~7TPZzT0 zyOrFcBK_xa4_*I0e^o6bbo3LKh>zQ4GZehbpzx}(uHnvIt&;*gy{ z3*_UvK2i0;-AFrC$VmOSu}0Xe%7m<RhPRTKfZh}toJZ$%;{H&6UcK2iVyxWNcXP&uJi!s{Y z%=G`+lyUQ^1G&vo_tUHhoWx}W`~;9HAQA(Aw{{qf6-?AKli<6hnOulcel;b;9GS&w zAJPbn9;7J%zw;sH)M~~M1l@Ul)4AY*A7rMRCt3YC37iU4ou)kBhHU5E>12&#p(-X` zjf?LWVGD<0fF=W5=7eS~m^-O;@FT( z)!g=V@zfR{wAqUr|RlRZ09ZVkAy+I}zyBj|B3$6gOnFnE|T~`>%*0Ye& zD4A5js-h_uWr$?q`-Y_bMpjGn!q!nWhwuipSEyt`-=Nwh`vy_1xQK}FWd z(c68jw?zKPI^KHAAS6|WTsa5g#$+ngKlHqupWo{y(Aql=e4Nv>1AIYSE=}tPUinsw z+qVXu(~7nU%sv;XF;u&1;JSRFkA1ylw{`Vk#27Zkn0xS*dNd^&Q_~M~OCo7Fm+1yN zbKaaBR?-f-0-A(@6Us`^)Y~S$I;vrRg7UeK8NrM)2{5oObn{Yrt&ftT9~&oEI8P*3 zI;P1qgDDsji@=Vr?YJ|9>hgl|$)UsIi#;NZ7u`Y#cw0zk`Kz$(+OuGeW?&pj={S>S z-x!cZf^tPiVrMPst!ke4662r4+xGM3$NEEgp8c7TH}z-dKutCvj#hOzq$}{MBjSB< z_}Hah0A~6oEHL?H5Xg9TGC?lcEa28Xv;p=YZ6ynwY4Fs{+~2=Er3Wv`mD^lX;ur*0dd= zwo)yEGu9E8cGC{ZG2kgeNBvagihDvv`a_-B*p@F{S$zdpYGU$**qFldF&U)^$)(Z3 zbduV(Pe}NV#|=qabeCE1Z>91CN0UdNvN&E!=3zn%t$3DrsTCC{$J-@>66o8wz0v~y zlySl`ExG_7Q|N)PG{TUQKfb+^7N(PRL8O=$OmEQe-F!i8tgu#}Yt4e*L#l(e z;^TY(6NCGr2!!dKf&dz+en4Wh=!3P-ZtMmsKEtHhju;Cc)T>U#&6M3zOCE=%biMT- z-c~YDvmce_@XQ?L9eKMx|0WlXMuI$c`yU%V52&i(7l<%tv$r8xa;YA<$pV< zXX&XD4Z+%RDqIXNn{iYA+8>Sv@!fUH=4lBeg-F+R6Fe8xjxg3rssEkEJ!7P0e84xf zvLwBWD`Ccwg-!z}KyY!P7Xb}C>mXFc)3rBH0GG+ZKQ!%({Ydk7eBq(@gbz$O?i!(k zM%V(VGlN~+0->vf)w?~+pzj$>0?N~p$y8?xm#c91Km7XyZwq8Pi+?y*; zOSgv#HIL-@JIW0rdjDX9s5cjCN!Fir1TZ*sCP;q9dP5M{EKU}`|kq_0dmIk;HoR21S zm{U!B#suHe!Q)H@6lq5;(aDd;dAeIr2ok8>Q-o{DIWgguX8YUj>U^@irl_;eMdz}+ z*H0`lX~X;MyVc~bc}G|78S{KqBzW0nWs+ z0WRHVbvEd_l9`RiynYAuPShHhv<5KReaz5cd^M|E6z%Iuzk_ZVvK-Z7z%jjam!A)- zxaq_4yT@L-FE7?M#x zuTFjqMYGEVlJ%P^nM4nDCDed{Se!*<3+wIfl|g|(*qrx<7*rLt>`ejTlQ69v%*Q?= zon3EKVy<`2Eucw%e^TP?S*om&ueZznn3H_AvQSt=ExL|^b$}K3Yuhp%T^3FdgUhf$ z;SuU%9LKNO<$Hi^B1Kss=92|>-CpxyNT+&dsb35=%)^*s&EJ9kAN+6Q? z`9`AeUCag+>+<;`M<_RL9cnqvr^A?zkG0`mDb^_p8IY0`xg3Eaiz!~4F0^3|g--)& zeN4&OV~&y{q~I65s-6^ID~;tG9-TJ-2fUgeSJyR=3=<;}0V|nhIV%MQ6~YRy>%(HH z4`Xz;U>DzqeMYi!j&kS&PI%>5xbYf zuz+?D{t$ZOc<1LCip>U!?VU5v_-2&~l zXUgGncaH$39XLVhl7zf__H*T!#F>`FXHj_I(%S8*M`QDT0?Z znEZD#2+xT{1>;p+6ywMf{V2$-JVFxYO`xn4&iuvUlFPC-4&@KljW1_bV8pGa&hx)T zAp(ch-4hJIb)yjkhPuAv72$~x%66Y5S?L%K)@q#O>E69O!lijsR++2qz8izIu56+E zbl+(id6IS95Co_MefFoi%LTzaXc>vfPoL=|?|=$qKM4h0F?cB=HNEVp)XAq+pSTTV z;jZQeUQ67S+t1t*!?=Zn8D`s%;SyW&w061}2H9Gpo$HiRo1{7Dg-g=C)=|t7YbzgSt z65e$>-NVta-h->dW3OP}lfzOYRU91tKg0g%vPE9(#FiPzN#k6yOIdRd#^POT*B2dG#`5bWTf^H7`_p_q6 z@#^eq14Yj$F^M8_f z@sokeR{yvaB1ewT)>+ue7@54mvUEm{Uj-v|A)iJInMp%1QOFnJ-X(5psJx-1QIs{L zK`|&Ph3LuZa}OjuP=8`#Ix}je|K-rUXyd1+^3ll|?+}U(+oe=78RU$a%99!OpiUqk zr5<5Egl?1Adubo}&b5xBM9(hIrzA;S#Yw0$(f9PJ>OED&&-!?LOQ$nYzL#z{#(b8h zdH!ii>tD;gIY}`sH(EX=va=&i8yKyy1a9XfXbsdfhR^9zhs|f5)O!_r^(q1j$jka- z0%CO=TG&M$7Vntl=p53K)r$~Ee>@!871DU7+eJtI-kka0fEH11T)pJT8Kcwwb4sAj zOFh1zQn~Yk3>P1W;C!p<1B%ieo{ER4R&D>&e#xwVU$tNzXjlm0S6mqVQgKdl#i|1x>&HHtC}+@ke&ujcFPtlr4#&fSF`B-P2c;m~_liHmb(6)WOGBr4Ch}q==?N=^$q~LgX#+)rJ|JWXi zC7YiGT7cVuCnG=dUqGGru|m2(*CTRiTBwOb`I1acJc38^u92(8$8OFB%=)Cqj1eqJ5^hECw+_2nHUvO{)!$#u?2O4z zVm&fwZ(y^?5=M!Db0D2jVf>Sbvd|U*PIgX6AiSNwcqc}oKQ@Qu96^mfnK0`*y+0g9 zdvEI%{j87665gq*JoW2#qE1=#G2#$uPHX6~8-r>AkjzJuI&mWpbqK8lSXGs4HI>n{ z;NlwwDHIZi?`KM;5q9RDaqnxchaZ=~`0&n-9+|Zx^Pw-x@7vsUZyITExEG`j>Q3%fD z#*CMajZa`{_WLslUpnLw8EzztIzH+w|6p=0P)7Y|Vkl|=4Y9ntC*y! zaO;k`y%xnHzy>Cm$Zg!CKF6;WfFXtiGF3^A{IMsa9X9*mtQTNl5)T*{7;62Um2eQ| zEbt=GIr+_THPbzEiB3|#Uc%%rrzV5H-)X17eoJa;+qKpkdxxk1lwM1dU$pIKJ?$LQ zMlWqEwO=28VethtFJQFf!vksWD4bH&#eJ5*V}yp@_nwUY$X!=t%usek?JPpRjv~8A zJpYct0xB1~<7sEz+J6lhHcDY=+`&VN%2mWQl`P;Z^AvdZB54^f>Moh#Z*h*o0bW6j zI&VF^iRHC)Cqe?e>0UyxJ-&S?&f!hn?!teIw>w}~A~6|CXes2`qVi7G8nAua);jrS zaMCy8tJS3XgnV(#MHXsHg8zKa!&sMxltmh<<2H|7zQChVoJi0~pKf`Zn-m3T0%@8P z<#5APy1`Tf;PFD3e%KCgU1~c8y5Z#Km0p`)|1n*~*vMR%WZ(xbdlDe7nFKxKi&H5q zXCWI`Q>neSEy|{-2u}s3Bgs}~QfGu#x9DqF!xCgOx!d4LkzQR=5b;FQkcPTh!!($+ z9}pUE0GA)Xec#7klxk0Z3A|EabeG`@x-0wI_WXT^>N{VpAFgW5<2`LZ;xr-QKqn_u z|Jv`VH&Om}%POgeGjaG7G2E?n^OI2Dn;ThTPe<$Fz&1CXhhO`s&*x1FI}!EHqwJT5 zPE!Xg%fY21jwc#a$@(fFpBhXT-dH7MAyt;HPrH0~cp?Ff6Tz&=kokDi6JjJe$HZ_t zwyY=chR~uuSyfu;m7H_E4Pi58M`a($ThXrN0;`LAQ$uX=*I42pdI27&gpsAez@G3P)w*iGKqA-3`NRG^ky8$rKurplX z{OtHf`|by{$TU4-+`FA=a!aWqrOvnNc&&Q>m@sQRXbQAE9mtf1Ji*B_^qicw&GvN@ zpKN+hI`0I*p0usRV3dULkYBB7qLwEITerXv#pLAQ|63Yqw4q+^Bm z7(e*haXj-EJpG?=57vVEPYKRFKpZL0R{gc=^hze*QzNh+Q~GR7+rD0d7V9A(8Ntdc zP2s(uCaa%lC+}CI*zyoM$LJ%=+td5I!)QZp2dZ*{i97*U?$pdeBpGxV=@`ty5WkK) z4~kB<>Q5PYFPZp<%1MQzD2j{xhwxQgt695C`rDoI@i{wf>ILuq+pgY6ov&Xx*&;nO zb)Nl&78!hd@hZ53;&vkU1zKbuh)8*xZzgVHGIRqYDF_r)aq(Y2(KOA}abugjq>LtO zz(38DS~hyK4=A3A;1N}sfZ;$IRgp`voJdHp9#Q@CnLH-_BU`&=BCj7U5iB~cc;Wz+ z!E^ZiBtpH~iyX5=>GK!e{!T=CuGPZDXaf>kg)2gQ2uF}ea3a|E+KnRoosv;GRKOuq zt71tF!ntU8KnQWM6tHvs-co%ChGOyc3|VJ|#$R%0k(K>$#zViW@OBvMRQKT4gB`iN zPHkr-E>Ge{plR+?20%Yjm0meyf7sX=hK?c{2yzt-DTzp^=%;yzQ7-32g@nj>?&IT3 zl{(0t;#NqmFNXv3_YwCOL2O@~ea!}=3^W~gFlZ!!Z`D*7*$D7b18;x<@#0e>%}g%6 z7X`8u(opSW?1DzACUfFV#$E)2KiyHDe!~1!yCBE3<;i>|Xg_imcnBX7QUnG+*B?&A zE{3K?M!{FarG@OHm_iV&zHU-7B8)K45tx}QR7R|E5C77|@Ccb*6Y|=Z-+GP}Zm4X- zEjm};Ccx5x8JmYQK10^;q@`{7iRUKnl2WMtg?cUTCs|!@4ptF{cnDF!mduK$ z2KLB_n^WbI3uRUC7adK$)Uy46$488$)3!NerVs(5bCGQ*g+ZRj^gU-yx!lzJ%lmb& zYw9|A?syPr)LHHo)5!UcyPQ{GNn=0Q$nLOxTgEPLip(6r@^f|%GIF2l8OYO;PWie| z;yQSlz)W4=Pd`sT=oWni_!uolb9Vc}>Tj;+2H?tkAW0iQQ;pD~mz8nxXe7a!E-v&g z+pS-r6rl(s#OViC;sExixU{U_tT0M`sfjq5vs%XH&>X}K3AI9azf(Ln{&aJLS32?x zc8S8W$@r$SHx)A65sJ0?$58?2{glzO~BnQgDt&Jhzow zXxevPBgczE^xUD_9mIDZWgnKze}Cfxxj5RX{F0fo+w^$!%|3O!tC4I_nn86Ma;bt< zgk2O_vGx6hf`C;5sr$aQUY4V!CuQ4SjML9jL!+KBm>~ygR?XqRoX7dk%>V-F$r;dz zkLahD&#YJP&t=aPhwMC3>#Gt2LTn_%((ROT9_nVvb&Cqfu&QmL2+|OKo97Qcj<*Oo zN*#R+oG7}`tHv1h`Q8?8yMQ-7q22`;rGBp=zj7P1`|eo|npodl{kS?DIM007`Bf}^ zo>v-oP!jZRJ+Z68Y0{YWc4~_L5~HRY9lJbHW<+WA)iZ>i+#0;SPx0@n_uWz9HDXi_ z>L0mYDQt;dZX3tS1D;#+zUf9}#Rr-Hu{PD<`gP;|-^xTHx2q1&=g1uZdA0_~6r<>i zT_>md@--QbPX34&=L!nqmnW(rkvLDGZXbiWBkIF9}sAR6t8VpeiNHEs+JcEUTeeCs%05=vCkA=4JSkC{!^1b9Cki!frOw7 z1|^LAcz5ogw|DLLke+OL$+S`*v95`r@%NCK{rq(5@_dxd@gFd=D1U<8Ak~FgDqN$klyMv{G# zq_NedS;n&{2FmcFg zHCmeeSFJyc3WTnUr8pJHeUSP@^-c;JHqkrmo4TL8#}MGDL|OFy%#&FBaETZV58F$kTKKNj2s3yutXqxzCX1Tjxb5I=`}MQpiNa} z#R#C|`{$EDu7G|Wxla|=eAdd?xm46iGOMF4T0FEFu@97nx91?`y*dIH#L=hY`B)ww z4`x%>LG}E=LSDiB zIHArnKdPMajI&LI$9V|3vk}H322H&V3$@w|^KEvGq%R44+Ca@+4)hI1)Dj)%fduJEW zX0Q}DSkK>cYMqzErTd;ZJ)WCZh<8BX!%lB$KNA#z9-jB`In?9V>ec})f47Ebm%jn@ zD9ZHo(q2c?1Z!~B+vjqg3|KO)`j%}JX5iQ78Hy1Ao4+{!yEpmfbVK?=a{KN?x*A}= zT68jY>0=s64}td1@xhVFDdJ;+%vBj87>cgG+IxqmrC9s$o#Bj)8J*9N+}v_3)T3lp zfbrGy@xnW%RX#CI;xg|?y04_M7Do> zeA}5%;oXtT-WmJ$itN>(a=Yu00YLpux@$}(_5*)T?x$n_5c_vuT$pOiTKch-9J`p8 zt|_g=cX#Jz5CI)=M39`%h*|l`5H+xJktGg^`^p1GI|!2$YU68AaCo8-{~M{`c6aJA z@*NIZ)4q?Xc)5D93289oHkdcj5F&lUgMwFzf4Q>y4~PEn*PiOAL57JmajKpVZ#!Qc z=>4eY)?B(CfgdZ}9oL%K1v7XYIPju%RA|93<6g*A7Z8d%ax|fM?RO>W)F}mhC0Ks= zDj7?;rg>)Z_gN?9$C#h5aH|$T-yxG|EU&2EESA_bS!3qmE#u4XT$>EcFKqf#(9a}V zgX|7od&~rbL&kAgmt#n+`2KIBdb3Jq7{LrAq|lZ74pB4<05@?51wh>ObNT!!_lC*JL7HX zE*-bq&-Y;18Q{t$Yu)D+Hz;MBjfpaJeJ7Q{s_ zO12Jn&8#iDm2?&y$oLFz#FfZpJszJ+(0N;EQppUzyfB0-S=)}o)Df)gigk78^dbcq z0#Nj%m_)h=nNqNkj=Y8)qdguEB*Ga47rzelZXGh@V)b53!BGjT5oKgu(O@ja^MV)K zz5@ZF6{<|IbbW0iK`g!E{R$-kdBW$ZghG6_lRLdf*RLEX(AxBGE^JtQD# z$F^7_Y7*4CdGoji%3U_&MZAp5pHfEXsEUK}7rRle)lNgLfP3`&jr~!f$-UYx z9PQBTCnx1@z89`{#gkWgwLcjQpo*rmKS>e8&)`KV?X_6Y*pe#{4Sz0tsY~-cWW{(M zBGAGfGAG~A)#r{sAx}&p>DM7uz5};<1CJeYd4HSos~6e7l>ploZ2iG8YDH#YRve%# z23>^YOlAT8o(!&Yl)L|+u%LjHhu4GeKmE!+U09-4u#5Rksvb>7nkTP(g{@C%aME!) z;}LSAW5e(y-`_!DmBzWOtjo@W$=P}kfXGd&{dJv$PTGubbC4qoav=2kbg`c|4dwoY zWdb)Yg35Hc@4N7Pta8E$YKs#>spFD9j9A%y04xTkhF=>kG-k}9Nr#KYaPX-PzfU!| zbzoJq={BIVJkJujEhfKAkt&6hD6d_}(uZ7_)DF1R>cu=aX;mTBb2m`>bszb%%JA*J zGtHZP__;9tzP}&TSw5H#T?qC;aev|B!ZrB*+)LW+^UbA~xO)2W3>TI2i3j!jt0!A; z*o$N9#8sz1yp}(HT)%%+?V`heAfaNU-sIcyc)V2Hc~jP$J|Dq9C@Q*9PZD=QvUBlR zsQo7Jng#&`=D)%=G?*V=))$jNV1U^GG#7IIO<(;K&T+gP>5|xfU=vrQNgozHN}2B9 ziYoRXfx0h}_kkGEiB6u@ap-uHCEW z3MhJ`&o9rzlIkrSIuQJ1dY2j^`4Evu>oW65lX-yS@D%MEMhmmWUJG&Hf0o@-0Z2j| zNn!7n%^n@6lyR1DF|)8*smOp{XS|^LI56y?zWr9pWR{H)#$@Z2Zb+<-n+9rnWF;q4 zPaaSRJUBuB>+qRJ2&jK*i~GXX>ReBWZKh+`$FX^SSgsA23qJy;*FW<}AGJdqpqZi@TQp_$E8`R-_CPR-;a(%ikbkQI2 zb_fX0H62Mg0NLkgPo|mi4s((&(`}f8>pZLviZ75xP?oei#?sTACi!dBYw(9NE65HR z6=Z8J!RbMkxHpx(hh4_nT6>6pd?yxidbPoOH^29TTINydUpZhRm!c^8_kOmFxUScH z{__F;d|yf|zb}Ht?!t6tA)u&8bb)#6!IT^)i*@KkOUccrn3oI3!B)&)(!4DKNW`Mrt!{LY0`$L{Ul@yEnx1 zm7IEftowu95gN?KJX&783>s^1Oza*U$MAf5%E~5a?e=x>Gfd2?psH7J-$` zg${$!ld#F0+u>ht^gZ_{0r73)HlkZ>UxBl(4oJ#O3f;1wVnoS{{Z9U{+35#{`-ZyQ z5-bWIH^CQ)I9JD8Ue-5RS!qbpXY=ZKM7Fc||2v2RAU)c&S}yUV=XzC&dhF zzqK#92QK^5CNIVFA;&iB0zijOa0rqQr*APknth&?YMj8dA)ilTD>$^9rjxYN{Uf=` z^`ZQInjX3fzma%qbFGr3PpQ*Db87wSx1OsbQ_8DBBSaHbdM-H z`TTS3ZW?`{uV2Zven)Y!MR;77-D`@hWRsMUj^&vT8!GUx8@RUbtvvBO=3SW!FQ>~R zU9?{TvKRY}$?op#cxs5ww%n32n~*{renNl^dCuP_V(UYpQ9>xs4Lucm!LUX8HpuA9 zw5Bjmg13YL4aZ>Ut47i1=bAG0-r&Xsbc@VjIsZ(>t6-(W?0zRg@z|3_eLnbcwpWq< zeB|2}j^Nwde|IZyXV+n?aHJ_WAm=S7Q!04ifdAnbt#$cwW*DWX`I6K93fb2z#S4bG z4$WI0J?B#&GI5w20{i;Jz0i=U!1M`iQV#f$=31^}^8QH!Fi6(LBUEQG=}Fh$l%Rov zAJ#jXKL{E-A1wj2{Qw#^s9=H$GtZNm&noE@e$CbYAfx{05^Z3ybB~tFp>l01Tx6<~5d#F-|x7ha#Ir{4O*|4DH;Hc*PiH~m47jmK`cC%o@>J!Yf z>7e=wF>RCdodHJiUq>Ak?%`LtI8#|-ES~{8TTfmU(A-OCfuE*M6}bk@oQ$_CN{?vV zc4v}2yAU5u(PQURJ=Lf3O0zRP@8`#VuO;~@e{PA>UFjd@4D8Kbfb#j32sg;Pkz7&S z_2}!r1V_6;l?Ri#WMpD=?Km@%&ZW@NOFWkpQ+0>O&vqL}(!IWefuaWzD{9?>MSy+pPU)`qGurDWTJ#VLiFV2qpaJt&@8|m|eG$ znhIxH9y`&n5_tYie(klh$IUTd;m#!dfQkjMf|X<5im=i<^cNm;@97-B=63>Bkz3KU zFYn0@_7lq3!8LaK(HYyqVJeuE2jBsRZtN5}!=~({a%O&6E7QqpH22>v8Ibr=^x}I6 zQPNjNuiB?g@D0ml`qm~H2V}D5LhUV9>8JiYlWEF|xitvCyy=(0@8_V|UwB9_jhwFIRKrG;tUknqgh zjx4}&cm%gk&=bP<&_l2H(m*PsvBQexT%KG>KV~)i+Mc1*oGY(rUP5zV3Mfk^XzX#! zc0Bu+ix}){wnBgHKmT^ytf{RKZx=L3ooFBUQX=en?$d2f*X zGj0!>pj>GK?0_7DqqjS2?RZ;QZ5u{48=cxlLxS?x^L-D-K2@`JefXbueg&3qS^c-M zMC5`qQQ14tApS`v2All!!P4V{+fV7?zY;Pb6sqXF<^xl>`i%W9qZKJUC3@@UTJN(> z&9-p5nALP5TPqyz+&r-(Z^o!!VfeOzVRyA+OEe0@+at+e&KhJg7B)AQuS30*ICa2p zW_)Jy7+$QawD$2Lr$2lS(54ziptGxY)Yb>q;Sp-Dz)3MnThzh{=>PtwV>)?=8xDZT zS784ZLoPFJ0Dhr{IIlKkmM&#IwP3!KepHzlcZO0G8_*}Ow9cJOur7mm0|g>UsJ*iM zD;YcOyfdOAJ{fz#7*USwT&B|$hq1GM86WCWKw7c0%5BNST=5<`^cnnCl?5>;(0@q@ z0SUZk#ZDYjyYC9ets@D$KLjeFRm7a@Dh@TBoQ; zqpa-e@Fbp-gD_$HK*Wc82(u(sSVtJcO8f)e-E(Jn9M9By6q*TYUs@Z7fN74>{l0AB z2z4rt9%y071XDZrK!yGJdEWz=xmFPrb`}VUS~>21*|{K-)>dW<>72t|y@+%4%?FL? zJjt%T^U0NBNT#h%;}HCSP*~0C=cFySZ^N69=U(Gjm3Q{hj>R=1nIhK7$M7??dw-KF zqrvo=Q16Au?(d!_kWT0s%b3zKyoU(FK5 zyJC@#IGRET110RD>5l>Xc&*x)LT6pYGuqAr?#m1SK%%290*LHifGV?dn|?E2{Myrt z1-iUHdsjB`=dH@=U2%>&*b>lQ)Q;DYWF{;t;U1FrZ3Q4uW<0#_x(MaAhoK@|m59i! z-@5}dp6-WM^JZ_K>5PZVCeu}d^i0mdG>Wyo%u%;Szn|iQuB7Gj8uaJG#!_cyLkP^p z!|{-Lc(n&tzVTjFIU+=5apqUMZ6V!SjoUIlc2?WqbU>8oztNujgh|;w&!Wj9iN-}l zCAl@a2(c?TyJ%OPO>+29ehl`8Fg8+5$Nu}wYkt4myq#|EBN;om9qklj<%_tsj$i8b zOKf=E;pyWp$-L>@4!nzL(wf+CSbYv`-B^N^I1Set{bJQ$U4R4AgDSL_a3547NYSy2 z1f?@yw*p+r_7z>KDw^ui!|3$H`2b8zT1S+qvKQTAQ_9Pmh>pmz1vns*Jo^wu{)(p1 z>#XbI_c!Y&6WAT^0GfDlv0iLPzR~iR8J(bC7;!E+_R_&3_McOu>qH!SQq?1vTe4zV|PUgoSm-UA&*B93+^@R`q5LfIv zd1HC%G?Rt-GJhSgKJx3(m-1T&?n>*{@Z{jncg&~q49G2ZJdW#icW4b(va|I#vW5ob zMF4Mso~YrP3vc(${qQ-act_3bpb|H)VzEU*2TyF4RNC;K2E|ipSy!H%;)&nJ*WzEHYfbqV2L zX1fO?U6(WkY@I80h2uATM@y0mXBp%$?1V!~8@SktSPXX~Ec>3|I5 z=^nS7au6GH=7@@XSyL%xxRH>)ybtOTa$#X*qUZhYRzx-3igph)Ulk<6K|2TG{QCFzCpnX${f-intFi6wvS)vL{$=F5=C zTm88N-wSehKLp;GWm(rEXLs)nz3Ff5#a*rlUZA@TWWtoVm7T;HGpxc>ryPcycm)0O zkCctK7=FezN;V}LDha&w@)|WdnaG9(9eV72{j(x;ckiZJk7QV+DB<8oPq48AO!}yU zPGSna7#1i)@Fk3@kwM`6&R^PYO^-Qz(hW0A8NW{^DuqKc!hqb-aDhDU*sbhCtmr|* zDdG|U^GNDO*!-Wb2|s?cagp1RY5^#hUm?en8OM^4`QA*>Ipq9r6Tx}brZ0&J<5lCb zF#P6_sVi+{{r5IcnBe@{y<-r|CK@wc7C@vg1$34Sy+2=JD;@xF>9w$bf1*G~*XnXg zOqJ$+`ZI2M$8&q$6UCV4`z#a`VHeTH55|&1%oN+eVaWi&6wuSi%R5kNc&_&Nv-tKZ z^)6P#X-K(j*hP%`{y|2-oR!R!^P`874bP|jm)?Y!X-1HYHvzI)`5GSZo~Qu3c~V-c zWk`(+>orE;G9*;Mudkms+JW3f%+sRh{SEYJbv_;~#45#}V(4*z8Z=A{k+&otlsm=c ze$$|T^;TC(vaP(z0V9q032#Odq;*l!F9A2|ldji2AN zEkV%%M$~x`0mi){OBn}QppwG+QZ#Ad%LjGiJ)!8dQq31$caI0`UNzJfj0N4B(QXDZ z-brrUpfz+q@@7r?Ht9)SFAwc@ku>zH5R0z>LKy2U_C&=`LZdmE0!ZECUq;ePHr9*Z@*tn2 zREQfb5H4#Zz_@takUI`v(2a`M15>vy!+;w2IRRnc<`XCk{h)o8y*QG1x4v*g?@pBJ zbmUx5cXnPX_{Vg;gzDaLCL@2<0mEcId`1E9L($V+MliEZhBhvdYH(_0sb)L>Er9*;``fy4+D&H`3(722z=bn2DK-}R0 zn{PxU$MVGmA-sgBDn6$IbL3{OpIlc7Z=E5x{`!IoGb9jrX%!&F1i0$O7sOO6eXor!o{Ma_vw``3wcb3vr7X>J+Q>IPU z7a(!r+cnRFw?xgF#@#pBdwoN1zn-9@yKcyb#24l*MeKBpse6WMkmXT5Vuc)$C6e@v zM+fDQpDtfDn3FAb@Dxh#Ohz4h^rnrI@2PB#*AGYYVbWmPBo4p?z{7q=YL7|=;uam{3M1422XRPW;fuI{N9 zSXW^qU1||jvnN)=B#lVE9 zAaG~U$)cwvZw8%_G#umj!)(3+BOQ&Aon=VbKvEXCk0wvw6=YCJjMw%=#}^y(W+%f% zQ{Wd}Op_cqn=Td`2}(zQ_H;*QJlXK%J!0rhV$Hldq*bt4*ShJ>2L;ciV_n*)6uMfI zU%KaDDHNy!414!siEhzBNzv9eLdJ3iLu`madaUppbH_YoFq3@eB7i1CMu4pw$KBbWa7q8z| zK%K<82P!@l6%+__$gf`wJyTt5{8cv@fKzyvt>3<0-T<*Hr{^jO^y~e5XWMS|0eI!kVr!-5e60pUs=$dEAYF zCbmo+X&MvqH&D!~FRk{p#Sezf7JIsJ8MetxitC;dKfN$tD9yyp)FIomj|Fc*1ZW4|vM zDqe8jO=F2tYfmEgAcT4M^nsa~CF7ffn`nUu_$s%jbxHfG_7n3B^4g|1aK51p%;##) zXO%@peD^lRuC@_a<&PdS{yZk?fn_$s5l#PUq|nP=l>nbaE*Bnig3Q+{tNvf zC*X3;({qQ;yRdZ6FHO#zZNAJdXYAQ?Li)&(+hMH9ah5Q)2?h8oOw*Lyg_O0)4g4mS z7jl1NS90ri!u2-Rv|7)H8EBgXflUcfC7CmD`Zr&9V*vHDm)y7^t2tXPM*M)B!GiZf z)|zbZf|+78*G6*R>&+ASAd&(+Pu2mk4FM|rq)HpA15r8;Pnr(8s(f9_3bMXj*dv=C zMpvC>uP1BcBzbjhA>`lMk$fSWwYvGx*E{~g(y|qLVVloWSXX2;9CN=r?$l=d;^TwJbbU3NNKyT<8!|e`iZ3au=D0R;1SX%|fAB~dWtzJ^%FsgH zUkfV!vGio|@`h}-$Kl>HU2S#FIuJ=8FU-*7vvXsoA-WYz|ans&QBR@F!j}-rNMe%fd(cOPj5hVqJiNGC@GdVb z4yh5Ml|e9)BuXEYHc$f^h5asf+$SHx~pKtJz2|z3Bdsv?f zC4=|k@H%p#rWb}Aq>7E5W$C;pW?J=Xd zc^sM+h(EK`n%T|MUoQ)WzfC~epEBs(i)9>B1qy=r73EvnqWK*OStm|lKSO_{NDwIh zH*>rWJT#eC+CK+mKzK}|8znwv3HTpI5Q&@J56J?T%STXkm$^u$O}C%C{DLjX%f@0i zJ(L*{IpDp6x|Th>q{v;dK}Z(sk2|xsF$!gn%%nL4r1`D~Q<>-Y*YwoD8^&^fsq(wwV=rOo1bW%s zXZ~d1B8GcTGSvH9Jz5^(gI8o~>1X&lr=92vj{% zL1|s9hBBka0s#1VV)Vz!*n)o1{6=-JxWb?Xd$S8u~+#TB8VuqAcjs6}fM@BQ^_9mHnID z;#ZN6J>GBT|5n_%b2#RJ?9t}T4icP;_2f&>0ZDLr5**f1;~;PM63G;AN}IK|XU4tz3RE$d`7B@r$vCS^&Obqqi#+`@qNo%ag#qOWbE{!TC42^ab@ z3el@QdNxhhzuDRh=m_Z9zHQ7hPeQDB*og!IYc!tlwa24S9Bq1$Jw6Unp*G0~i@Rio z`&X`ECIUe{!-{6)sSK!R2?dFE4x>$<3aqw{9ttQ`&+Yqe`dSL@L@Pxs4rGo6ubjIh zm67S}*hIoEyAhDC9EGJL)ttNJx(ii{idUQ4nGrkF;i5>~jL>XhrzbCI(!5&!NHT`} zS2kc*OQgh+j1QA6zpm>Of(J*T#Vhb-c6%zf1G7<8%?GWPErT;Bei!jQp3X_?{2~`# zXEje}U;F5P^P5%DzmQf`vGTR=A)Qko7AU=C)G@Z7g!o1;yw=eB%y%_zp6`w|wwW;M zB$q%hcp0}(omEQP78ciKuYA(44Lf#t^e(V@Pmw$RK~yYfP2K=k!Qbi~kS~G{cLs13 zJl3Y2=KYZh4Y>t%t@W{ZG#XQtDC^eanr1>obw$FA%?Dc1gP0Ba0<>a_REqO1qIEyte2I1m|hed?i0U2HF(q6 zqUsEtd?#{oG$2wSs)x=qt$p#z_yvCy)c?pZKF6B5YH4qc&7NCkpGHlJTFI%b{VH4` zqPN08aAencIDF4fW+my6wWQ?;SjALdIM!q4f?2Om)laqiJhL79M2e`QgbB*CZ7l40 zeuwib3i!~sgo!hQQ&-uaq_H{7wej)&(T$)$2dX;R`KNv}z>1+_fT0uhsBa|{> zBJPK!3xGsztsCUP{9b8vKNvq3=UN|mCsa8BsJlB#=QK%Z!?6p@z2l8c{Z04~)m}*N zNW5$AUKj)cA#_4W0nLn(OFzsEY=GkxbLVF5G7Rm5hMxE23tJPnsv$lKh zn#a}XT_xOF;2bqz@det6>@JzHK&e8B$S_w zl$Zt_UGSLSQw8HkN6jR^lo1!G!k*f)#=X;)zMMA~S2qR{<>>Mr+Mhcw=X?DrQJ_-I z{1z%@Gca1ej;E)UxGUh4n@Z&xka?s%f^3JkX4zTj#Eb+cd~v=#TAW>7gqF;&8xwXI zQbA3$^zrIer}sZ`UG|CPAG92>IFT&~`QnX31a?hkb`F<934<(jXBY%2S2DcV`_~EI z{s`4GE-CG$r{mk`31-8;`x_6y{x9rP=3zc3f^;%o39WqwD}f8r{4l3?&d;zcUDk*4-U}3y%=Nn`h4Ha45Apvi0$LOJ^a@xCXRGp=2wgKg2haAj3FMh;%5_3ntd z4w|jMDT4DP9S5qX6FIy{UUiZGx{4ZnkKKf^p$N-yN+SP`VJ5S@u4haiQfV8+9fPI| zk6JO6S%#~CnYbNyYkl=#2e&RLlD>p}jfM!M zXXoUO*O90Xs<>dLlsd1^76l59TdIW|iNmrm!{fs)_F$(xaR?YaSAChTQ6?qL=&^`jm>peORi*xg9iXPg6m z=utUhU1q$@sy-l#$s)p{yZm!_r6;n=2-O!2U_2w-sif>Ew_DMZUd8K zOUv;ARgewa9g{0$`u6SXwnhyx`%!jf=5TxPtgBj;lJ7D3sKF~O(H(eYjtJl&BJ4vf zTGZj062g$!8eeGph_%rX8|{6OnLYcxIr@WjMjim#uU(qKwBu+k-Y@0oGTAHeE(vsO z*wVqfPs?$Q4Rz41iC?R7eZ!AMEnZPf-?V6m)5zwfF-y6OLjC^AAv2ZVr~n=-7zgun zs4v;23Sm!$p#x;q7f@C+za30i;mR!h&yScoOuHmkLFXxXD$L30SkLba?NapbfR?z9sK>f>yfna`q7D2jB8gbO{0-@A`b@Y8AvW}9MZ5Kg`liEa`o^h z*H1IXL|u(u$F%FK@mqE*1sAnjb_WFf5nJGf##c51x#u1Qa{C$eYoCYwC1bwS-0e~E zUc}C};0Ot!w6gSi#^m>xQQitH>N5KqnDYXq=U>Cf_PbXT-=U|%BevDr$sY%ZSiVR@ z8$(9^*3=$-%Fok6j{J5rXeFFKB0XPPnq75rv}|9N;li_B!>8v18ynsYNXYbgicSlmY}?AiYsYE;B$L8$Tv( zdx@bO-yTa63}Gvq^&)(l8(CYpqa{tGu|fWH(hus<6q%CbP(h2i zoZ2Ma3YdSdp)sIGk@?)W5O%?zwM_Gy%hNyKB$)4XV!4Jo$l|rLt8rB16;yV>Hc8HH z1p~B|BU)&TD;30P>(0yLY*ak$UU56(wY4i59X#zjEQm>dijXKgrd!x9blhO6j*Z;O zjBjhlH#PHvKd~$qwgD8LA`*%=dfc~%P0!H){8~GxGKCOUNHMxAFyO>Fqg}#BA)8j3 zF`pXvobk>pRXWejyC)B$9X$}~ItcS>3WQrf6Lhg$x{@%m{1ogEVYW;NNLu(cg0}y(aT~{cYT3Na6M!e z4KE_XBd=c+XUbS`j?A(NrQZ<-dgTA-Ue?o#mx&OTISW<8KOQk!grZ+fH@&+nA&LK+ zZOBcOwfEP4@5Zr%=VS@mg{NTGuQq%)$+~VMk8GLjCx>3Hy>x}iA?wl1(l~Cx@1J$` z*-rB|MvY*4M{qgnRQE;B^ZL2j3EW5hoevg~nGE#cd{RJ6#-Mx$2dN&C+XH-ep4W=$ zo>FsJVQnI@qt-+aw-xI}DP1Nhs8V65KG;l*^Nwiy3=+O9ofgsF>2;Py%$egx6%B6g z#acrF1+ikE%*E2(*d307)^3=x<$KnBwIP;<1PcPBc`8M3-4i>gxTrD&y=Av&{K`}0gui2D*#&OwVP^^WuPmT&D94p zi6Ro10@6igZupFanl%w+{>wmeRB&ki~nui~*G34&Kb;!FmfoS=ssn66b zxqE6aF0eGGOJjt78MxPwXkDHb=fyJvuNS}sa>MXjdQLN+io2Y|hf_ntmy8ceFV~ZY zaP-hv(J3|vLvZLEJ6UuzY zd18$AY0tSLX+?spmS%v$E&+Nh)B#a@_MTM16IV7E-Xby9WhLNm*dy0uLmk;Ia)j~UVSR_)!1Ps1+qXq1PfXxKgq>AAE1`Q#_NE`3U%(yWQxCmY&zo2KkFb7C1;I zZ+A&wDWrQ;A3@HsTDmKR90bdH>ztwEZCz-TYMiHi{1GI&AtyKIwLDIHi6QE&GKY2K zkrOgXvyVlDwx{l5jcGnUTV;mlEM9R{{n$+)CWm)Ukk^qun=Tg`3%{OyzU}TFK zKxB;Bczs7o#R`AA*gF$0m^aDf$UA=o1@TpTc#Mtm>iX&6fL`Mhm%FoMV z18D)WtcJ1#bMG$(@8YA&I+eS}7e~=}+?Erm?Q8~q!eS&4piw*=4H&k~7jgJcg<%0VK!#8f6wrT~CH$dpU_3p=Tv&7=_Upf%9*8k63cC-7>(;-`5m)PPHRm3sBzxz(?cu6g=# zk;=dpCnQMn$A@cEGB*iX^{Wv2#fG*N*)HY*WdkQF_)eEpowWGXNzeJnWmrSVQ66Y# ztm46)ocQ(p^^+k-fsCDl{jKoX!TFYL^0jV`qyFf+@bsHcy zrq&?WdF(zvFzJ38l zjT+w6EFG&vBlmtvh#h2_a5SmZewE|Q3lEq8BuKN1HqNkoH-*1P}+@fB%Q7@4lfZcC1YVD7sjB%;-C9E(du<@1dVNx(o~SOi5=5HCOb zzs6rxR(FE@Ow`{$rI=3#X6j<-CoRN}a&_k|#DWJd?5aNh@&# z*s4tzr*%pSp8jSDm~#p~7Kqk*k%^vtC*yVarc*<5!}$VzP8tl!7mCTe?G#TwEea=x ztqvLccm>5lbyA0eL~cVm%8zU1v4GZ|-f4PY%*QB&o*Y@Q3ASM6_EFw^_E729Y;$FM z)#lJpev#d`kYh{E?|a!)(_tE@drZztPOa;y*2{$w%;!cbpKP_M%IE|<-p#5@sS-|jb%#E2drgOllcJ_bONV506C|AvnQG3hEJDeqa3W7f%8awB)E1s#4uqp|kda}oQoUAQqq>eFT zM>tfaxrH4%A>O5N`_>SwbUOv?6(j*I^}r7`3);Vw?Hfu3H(4qqU}^KNdP@he$wi?1 zF%1k(S}`m(OLF)Pv@vFQhov;xcr=&~6uVYn{u`j_c&$&6Y~W@18nY4K{hirD0?b$2 ztCXSJO8%g!lqNcn0>jk%-NPUd#>ha(l_XzsBVu@ zN+kJY$nwnPaRo5^#hu9oqCY9DHBo!rTe?5TJ4}X%E+`Z9dtu_=`?$WYhwnX#tLGV} zTelczbwB~CdH!q!w5Z~ywUYu8Y1$iBJS7CYd&LWxrnLAKRW7Q{t1gcmk}aK@uIke- z$fdA|*-H-$9L4@zJGQ50eFwGgDfmVI9??fO?>5~O)Q&eRbZR;-Up6ERFx75u`5rpu zdz%Y9yby*DWLArtl=U`c16v(N4JIX$Hcux-PmOs4Ow&_jn<_~^_s6zi_GaXhZ0H&#=-=`gKkyQu;NG*=8n6Texa>4hg7iQcgI=EKNS`4i!p&(}NOGYHzK{7phU8?r z`Hu6vCn>R6GHg%IBLSV+3Ph{V*&Y`XU{_Yr+b2zgU+xHyB z-4NXN*l*tKcfcv}f=%)jCU7M$4t)5hcCW5RE?{vIC`KS%rl2y&GA+P1De?{^39>j6 zihp85`!YnVRX7Wi01}HI;Ue+Qg~$_6QF$ZIc+%2lj+`iS4(jd}k~)x5kQr7uA5Jrf zaRLXYKs?Fq>pFK_A`PT~g~*xnK{7|oiF5JWkl3S$tCK@;KTMb?CR5t8OJB$MR82FF zEY2&r=d*^stT;Q+cPX{Q4T87sF}4oEB_$a!w@q?*3}O#(zPJthJ;K9*+0&ov3k3T8 zlKZ9Oq88||_3!E$i9|Zqiq2-I=d~QA{0^0!YtTZW0v!cg`99eOp<AIqyhTOv{AxgG0z0~N!NnjSiw23(Vcu2PYM1zo)%IMTVZ&Ynmx-9!Xv zP4pX-iv&;kUn?9- zDo59>Ne3bX&uiTjLJ{`LR13KYCOATTs{jm{x87gRTj(Q^XJr5)Drig4{xtej4<-17 z=jpblGTz2UAlXqT*B@hW_qaa0hCbkpMe{0T%*GD3pi)&n?WU6{Rye=PD4KE7fyV7) zmHbQt%NAGgqwTPHmsiyvw-4E$dPtC7zK08owVEpe z9N<4y>4uYnY6uPfVuL-Bg}Q9^R-Zr!y5g_9A2sMl{=y&LOe0O^h*FEMd)tu4xlrJ= z7&kQo8Nv8J9~Lh}8RDr3J_KrHT;-M4#EBx)Mvo9F|FD`kNix3?dP@XyrsnjqA~g>= z$?|VU!G~iDa3u7X;FC++{>FgNFvvDl3CXsI24pR2li<>x$TC9!R*-Crj(L|Fz4$UO zJbi{Mdxp+;0J<7y4(sp6GA}|On>3JlM6czZst`w(H>@G;dtfcA7&$jKRIc&y_K{X^ z&O;osDAfVHV&4byN99EB7W|ZIb&aJfeZ9*0HYyGuSZa+?D`DE1=d+x;g4k16-t*s zEeb`@k4<60eEL5##@cGR6bhII1`g=;q(4H^$&GWS(NO!r5oWg!Z^d07fCw9|UUz_LY@A<4^q#`#njpaz)bEvrj*Ui3o0mso55BBo^LwB? zN+ci>dSB1aaRl|(dil`asaNamzPDjE3i-(*_u%7wE-mkls@j@KH?F^K405G|XOZYP zvo3Do`lOq>MI{9~LP_f4I{n4FZWQjN+fOnjbcGt4`NZ1CSrZ3P$|8+=7RvwA z=D~~JCSF$B%wZIaNBNZ}TK;QiuQdYaglo~g;=z#%< z!KQan>Y=k7L7C=XvBPxjj)A~YtzYumDXO#6ZQiLA@>0RoXPE{LVxs}V>RWEa=H0Xt z+Nfo$yJyC5(+tjV)3_sT93;aA4q3)swc=Z24-6;?-L2H{P>tCZtBQ>61?>yQ?3)?Jl@t>5Fvyfr`Cm3(H zkFyU=H2xt4XOg$!Yc3Q&YP19YaVpEE#@S|aY1Oqy5MyCJHgWTSwv~}W6(kD%UsCki zMNJoT%y?X_K{M(}ZwtxQ0d~0p>;hN<8LXFbVIT6MK*JLCVt0SipuHOvVU*D?Xmm0_ zVojSwGuAf`t1T|#lnR!%(qP2gQ!; zKh%qW4w+R&IYr_R!m4uM&@D^G42n#rwYQ1eqx^6@ru_6NWDeo56FSxU5~S+J^n9Z6 zACd#UhmfcQIXXLv=Ly2qCR05w+x74B=e?HQbUzvk$Ti7e4jQTMvrznGY6>>799m2SuofbX3Nv=p4RcW?xo zgmy=w@IF%83oL$hDA@Y-45_g@p0)a~yh&3?>9FTU2fUsIl&%YdII@|3Kbg&Xmd+pD znNu_^jKMi2bm=WFd;ls1rtN>LL!f$jxbE{?8EA?D=){Q8aDVnN-{r$tgaXR9nuv;{ zyd5YyYT7oW+m0lkS#$#Z!MIJb54AyHN~Yl5fbS$u9F&L|a&G#XR0Wt!WvOWN%z#Zk@DFB$)H$^3w@LVZ<@s*6Nw5HuhqfK} zqvnI30pF_0w*QXG7l>)9*S(2uD8j6Aw7P1pz|-;%>S6ax`zxqNSE3{J4LlEi5a+9)8m9F)eFgbtLB``)kh*{^*)y>S|l zYF-T=;_W(76BSTDcgmc4Y~kOF*^w%Qdv>h74vG;MXASFQJl~4_*up|ja}6(kGe9VX zW9HvT;<`Cw$tr)C``60wCC$5kjeJw1hT`@Tp<`l>?}(II zY(^45Z6`PCX|Lpsq?mY!COybTde!YUc(5`K1e=ZOqFnm$KqL840*&k7@AVUkg3M;Y zL+!R`lh?Kvw8!U87XVi?+)MtLLb{P47*DiuUZAry=36+J!MkS`FTW2YcF}06P*d%c z>-X{bD{tMqPJR1~8x@_}mylJj$JKU2lw$zqn+bnbk;pB@t2%UdZyn@nq6s*1i?zdT zxQ<)A0Ltbbs@V#!ejA}V2^~O0f2|Mp^zALPa(alGgONHFoHft4D+KssRt6Dyf;zgQ z3HPnp4A|Jn*M5`@>FM_GIosP^C*V)91>7Vh7M~`jzd+py(9-sSvsp0&D zYPNqX;o#Mmt^DsJ|846)_WSq0|LeAPl6IC6ZhyAAVhq8&pHiE1cv-l<%DE3=)rmjH z8pjv&^=G~v9)p^PI#{Vx8*rNBegy(x zL@^DZq-Kp_Uh^MS4uw0X-26PuEsGWUMnKI38niCwkrK@tlB7Kq5(UWC7Y_mOSuxQ)F_P@b;b!jV0n^>q^0GdTMV+MX$T@p_GB2T za#{DS&iq9xbLdYA;*Pv5C zaWnCfEq2D8QoQ7-i2z{RC{JyUNA-Z&PKfRz4?+$aXIL$(Zv zJcKPGj57`oa4=NGA?9uY_^sU9Mn!XGi>+t zT6PLjFx8!Pg6iV5j_F>QPC2jy#yY69DKcG~i^$Ohqnwh0PLL7&oUg)PLZFmE%+Mwq zU`??7wC9itSl?3^0#TGi(v^ufYgzLMq| zGeWw_kGyc6fvXxv#-NB%wE++g(3)^+gyd=|sWgJZ z(R?g%G#vs~ssk}HE8(LlYa?!y6;xnx&9acrrh%#=y#_EN34UCzjJk53_oXawoY6kN znE5Og;=r5LZ!;)7#&wHWtFn}0&^}n@>;_%bh|nZy7@4vjZ_*ZY-=%&vJB%nnmX_ce zCD#dC@suFv%4`++_GlNmRy{IFin2N+h-T9&wpbdb4pAPHpcB@m7G{Z1r4CQAI&YR6 z9hLQ~U6P!pouu4~l-2%( zgpxf-t)l|3&eawXARB}W)Ur|r2U#Hv?|?9y%YF7d_7;`stE&jok=lGEypuEKW*AvobO6(gUt2 z7ebKg>dj({R;*Nf1jzsiTt7k5Y2s9fLPs+Ln!ilojEduA*)4>CIa9$c55jTyio;A0 zROJL@*Ggnym38e5E2X8lfde{ps2+T+czkGBg*0PF7CJd45>Ms{lp+=Ep2c$czEo<6p%05o=W0M)?JBz)KWS#skcq$3rn>FWB!LLt8wWKg^vI9;-X)mml}E^6rUsjYCzu#pIj{l+{QGBee2 zoq(&GjyBR5@6$;vp|QBywA9H=N+U8Pfu-AUzNO;UmeW%E9arv>HPXa9}zdct&LsH=!^N3#vatpR2V@2pAy(*|NTB+Kb}j zR@(c&WwW)1fbVC zf)G|wm>$Zgn1MQ8PHMZMwzLmwyGg6iQvI3<0fE`!$X#W z=I?NQIxpFpS9660xLzB$vVL3OT2RJC{yvgq5s3&!VzOgsJQ<;D3c}b-BqDK9w*bpM zK8%<7+Q@W48W)5@5M@q-s?|bPo*IpcMh(>NYkfmJpBCS!P@l}0VM>h4LTea@Lr`Xi z@gyp?D=3S_=Bcl1om@UvGB=bI$JT~;jyg@%t_R@_`*F9$vl%ouavDBRvu3~5yt#}yk|cNFxE+|+g|ChLh! zCy!!*c5Ff#M#L@(`e+abH{9H39T2ctR8eb?M(LxI$NB}snrR{*6XPWEXkhXc^Hdjh za?mg?j4L^0gKo{mmUxE=PsTc3EC*LC&ZBIh)brbcp0}Rs>2CGmt8ip0<$pCm?1P#00xke%`AMfvC~MOhlAof&Ztc z*A+`tc=UKAK>NKKb_Ba8fpW6|1&>OooD$Vg&(6i6^CjS9GJGRM7qZn@aMFO!r>I%z zwkY$*-@(7p!Sv$+!^I|vayt>L?B}FA(6K4%j4xnl-DsmZLj`SM@>-GTg z#95Ib3;4~_pmNZONg-(3IRdmS-#6Hf)$1kW@sO42xkQMP#Ec<#tkxLz=)$n6V&_q{ zTh8WVJ#2Cl*{B7Sl$}D6OWk1r?#B-8eg~Gg5Fcf2*OFTRQHN;M(l<#%f`|sB7VSxi zbFqAj(?*~`$f9P2CLlHIDwm1^af7>8Jw=7$VKnI$P-^675(FbvGjumIP6U0Q5|IB; zP@t*y!Dz`zy<#UwCWBiwxz;rn&udmHwRG6z6|RLOW+&gSLfj!z=!S{DBQ*-No`T;74;E*RUtHMTafIXRBtU^l{Djkqn(xMvABcPFX5MSx=M46A3RnAJ9A=`i^ z4eL5h$|Ml2md!3!#`r+uDj2tED?WAF>1GnedXn4$JFpcN2Nj{p^V4i93#I`Jye`4D zW8dtc-<$G_X5yHTu%PLcO121tmJ8U6Wf=;DPzAa}vB8YSBFRo>$`wUwqWU69F$)xq zflWboz(S&VFgZ#{a1gLB2(6JE*ovzUhh7vTNU?`@B`ek992~k}j-m5}NXmv1*nMO$ zxyL&bu@%xxmZmUk(mtV3Op*z%HcGY0X);8O!qH3ybUITr+D}&~Ng_KnJEO80Z3sbk z%;sq>1wb^8z(-V&xT4@2VmxNH_+pqC75X61b~8x=ON109!SToNwF#`|kK+`%c*d$CP{~96L1+RlAEf!?YuV988d&-5q&^+C$N7>k=<|UMf*-K3MCJ=gJ>L7o z_>WcHx`)t`4`L&l;nQZ0Fu{yEB*13GlAhIU#8_|$A>$t0cbv~36g*@aBiIFTfXD(eS0&Ie0&$s`6zcu-yg*uB6>3vl)p0}9lusqc(>b4903H>>vO@9` z%NxUPCY7<1VnXu*@UqDD_{}lsEJ(qNutO-7(0vT!;3tb(kEiFbJCo3`NG;HXyQ-d_ z1L6cvPDEg3IM$ld0Ht&@*;j{|n6vgalZ4ftNKium?+^=Bqwbm&kP{jZ7f_nT>?H1R z{w&gG#{5KxM#>>M@b}c*tfZyJ#3YvWsp6E$OO>( z6b52PDZm5(-P#-^a6)4MXrfdcWg8Y2<0heNVvNd1Yw0|LIt^BKCkU&89J&$&Rl7(S zKo*P>3jilgV@g*+9BMj*w;`EA9D3HWF)fFv3@t;_zB?QGwdKM=!t0dHPHO1R;O`eI6b(;B*-Xu z5sTKzWKOa}0BpxcBxAq_OyV7^cpFr%4%sa57|TqJg#}O(oh>U z2eB=%TV^F@h;Vu}5zbIP*|)50$=#CZM$uRxOt!;_VPv}zVM-LdPCZ5I3!aqG&LZR9t{?|f0<%z_wgT5D?e}Sq6dJ`2 z0aXcvulr#4x7cI{RBu8IwAINxSB$OoRGV1~c2wDh3IZe-6}ObCs2YtF9@J934w)P@ z=vXbH_|0g^@<46Q2sRPu8|91hOoV{#Hm{n=2Bh0fB}ep;c&PXFgl#e7e49mMHPHIO zVyYySKqm>Gmle5N6{b)uv-aLZgNgJaHRNYOBI?t1yyybMrB8k-4V&27$fCs zq$5|^{5)LnO;AWS5f~)3ZnEz+6SI%wyA7h)S4+mQ9jvN(UGmko8_JNCT4RVDEQ!ck z9SD3ls5N=QcH2T9G@B(!Km}USh<6)$1C@s|(7N6v!#k0pn$UzMNe8|GTz?XUvmsq5 zG%BN*+2}YvsuI*fngvsvGX^7rJ_mc6$3`_#)|we_hD(4nnkof%-z;Y6g4!Q`LJt(2 zU1<4FawM3o?hK?IwL#n(%x%NQm}%AB``GZ)dEoU3F82B>6^QXYykEIM(kC`2u)i)1h?(6iBj4#A~4_iC>7DX^H~lIYK<0DKgnfw^^R1 zDqJj_WfN&hYpQv`e0|5@#e&Gx#{)y3w&!_TizgJbS^?c|s$QuCaga{2O9vid+?SY$ zrMbNpH%~!^h-`G+WO7RLwhfq7SRV;6_u_13To2IwZUOgb0^YTC{_#)%Y=dO z^Q=DXsF4ymOp4V}I^^5)ypm#6r(1;BWrL#gnwJz&l-JDL0>nvbJw%&lysMR4X|2Lw zU{_{VjveVlZDh-N@JL!?==AsulB`kWl$@e9GPpIGc(~}!h#i4N8XS1Fo*s~prQMp? z(RO&U&W$8`Prs7`}0u3`sYi-|s2Dwl{k4rVk0blD83Qo88&>13NNdLdM*jw@m{ zBPSEo6o`yztPA`Dm~uY$T4FJtQ~7oy2@Uc=#h0xrO)*FZd!iz@ORerWQzApQAAu>W z&aU5>uwL%i0c5VeIW!BInFeWAke0DUP z3xYNfAjw0dYiv%OP?b)bPO^Yzc7$ZIm23_~Qk7?j@^WD|Q);BNY_i-;TDYGqS)Enl zTANp9xnb5G8LBSjN zEpT0W1M!AViR>+wA&phbBqE(jrvRv$Yqd9N^xofYrrV#wK64WL$>X( zp%4N2yAh}bfBc%HnMsLK)KEPkNv)0`P|%zLYi*P-bfC~1SjnBa(l1ib_ zhCn9P&}1kC9LL8einVf{7+}ofz`m|UU_-0YNNdH#xsYJ61sXPsUtA)#5QAE@tr{y~ z(q0?64!%mZ2k`J0?eu^7TwH{&7Xq6s4-qlkR1#4!OV5X3OQy;#e#n`ogUnV-?zJZ! z*0(@(6fowc^FaccC1Nv7km|>}-D~d;)@+_=@yQC+vGu4q>J{gP<0SP63uxW&gkF2LWw56F$@sCZX9b;%_2Q6Tz- z5xC3>d8%2GN=5|H2Pid>y9mWEcR*J0UIchmx25CvIfN+t%{&?-{{cxT{m4~^PG zTVm$~BnY8K-*H>E(G?MaU=##zIM4FRZD%5djm5pCHJP@AWQn3mde-$O#Y~jRcPW-J znfZ7=5j=v$WA{th6kDv3ojTl-iO_VA;(`*kAWue^b<#bq4ysiRM6x-ClDZ4w21+*C zLIX_uYSJ7a)s`1k4)QZKFhkp8)R{`GG|U*NQTCvhnkFI(Dm?jWvFubB#WBk>Z$>HF zT(pZ3GDPM4veb;UK^)N;)!AB(;Nwnr1PTJJ5E+HQxrqo8z-^pD2OW$W1(@N5t`;3( zdGknCWL=?_ro&20Wk&;Ab!yZs8_5!*2|1b2(~1@)sAi?!wc@=J0d<}Z5HV?W7DT_= zaF0>^;2QaHac#>bjZO{qjR{Is!F}%~Q*ZCW1II=bcMQ42sE#O20XD$|@L0G2cD#SF)<90o7i$)K~5EMFFMG*PwIAJp1M9v#% z9|s4>#88{2%48X7eohz2Vb0fxDPkMo9khdY(ilCbzEfKKwEngU#IE>v!JGChd|Ov!CdeP>n)DcQPbjB13O0ycaK zwSXeTN5}bKP1S5VEjBGaWZOg&8o9H!-=QJ6j0FocjWo0a`Vfa|e*zP%_R*-w&u4ir z0!dt&6SP9sLq0#1!WVUkf&y;>C|HXtM+JTw;5U4Z&!^{F4b)4uIp0JXa3az$*%Tge zTp5-ERz4*cLJL%qwQ9B=BXv+WBx}iX&6uDD9|1YgF@sz@7R~odwC2|7Nugv~d=mCs zx@cx-w+tK_Q6Tmk={x0?`$}n7~c26ranM3;;x3#S6=vC(NrBRa4}Q&>%h0Cxt9oUmzOhK%Qgs zSoBTHVn$ic)Ox*EGQtVE=|^y8uWnkQVJRFu!E)0P;tkm@O^q68b-|K53$i7PJg6AF z#(me!>u~^|K|X7y2fg?#sx-<)Nk=8^ z#6$mtTJlhmsCL-n=CFNwMm23fP)Q&hAnqGMIxaqF5>-3WM}U*lB_m3X8oom$F+UX( z9d1gMrWSZMiXcI^Rn;<(zADN91zLOp2oNbd(ddbh)C|F^ngT(BpsdI1zQ?EHDB8eH z1?GE7F=pjPX^5&gL%?8X2YTKex0s0qKeL9h%C8-f06Na3IF*VE-av4jl)!67)&R+Q zLu!?AK2obYS}TXR2T>VO{Iy)Nj=yi7pA~I7iSZ zrjq8atAg&o86W42f(Bhea#WgAv}=U3uwT->!jPD2RJUA0^om!Ft_Iq}WQvcPbjBXJ}6b3B_nJ9t%W*VD3##pt#%XauQ2MWCW1rv9aGOj0wvTBRw05 zs(MQ!%e~SliTZowx0~ZeO!oCD<%b+3vXqoxlc_Eyc)PCwSeBYfrEtXxq;z^^J*kcc zi*3cs6!Sm_eP4@@+ey&^c3%m?^+g!ST}jN-)l9X*@s3bzFSbq-eW5?nOb~ZwA?c87 zgTrkOq?VD_BDpCs>y?Kscvp3{NF_sR7KL~?Wo2lkKB1tQ1{*$vHz%>lLgwtF9#Soa z(D(URVd!VuneY&-T6BDoOR@`T{84b|8yJ=vx2QcKGP{tb&$)+YGBq3l)3;)f`&Pvd;%v7_u8L`ON;RY>b8f>-0_KSLkoN# zNV`#46_ACN?=(~;q%>HwY9R?Vaj-HeeqGkz2{|b0J=Mp+%ngALZcBkiHYKq$vJj-CM4L*0g#U6XC z7>kA{?9hxak z1Zg_P>fQl4ztj{Yt!w8Prqdn5JFisjM#;w6Iys)A#ZI1+qZ1IW>y+8-@~9LOsxhLA z0EIZl*e6CvGISvGZPZzl4jcz68_qCkoB&`tHE{JoMmKgMB|kF<)|~2Mtv??(&_Y=e=@^({5zViW zjpj5X^xSMCRbPbJLNam|=n4Y?qX4LigAiX$B=fvmXC~w@Mfj^k8nAuKt>VQ^e zSn5+z%@wQyTlENsz&hW`m&|;HiV6X6O`cKtwj+&I2ARHM4NQg>)rmvp20_QJH3X;LzX!?oSCEkW?s0J0Op--_>m+dQZ$kzo-r*iW!zhAfXf>fm4})ziYv^=qVW!IU4|A3AGPwNQ;gVZ5UNX z$xb-}+t<6OE<^o6xsemJA$Ur`h1(VU^x`-}ysy@Qxkf7v3XYPK?dU)(5%ta><5zP9 zv4?WlEO={yy@_Y3m;-D^tL2!XsOJ&EG-ruzrtMB8pl|K$n5kJMEy__{CW0fe3|h|ap1L0SRck1g>LmQ!l{d1sL0C%6?s8StQZZLZ{m6Q zYD~fFp+Yj6tqp;O4|fc3b8(?jrs~^Dbs?obU>Iv$0U1&$6!F2w6`f8d6x$qud{AUU zY@tDgLB!|TX)>Zg(*frtVUNW%fv_FKtMPM!5gK<14QdN;G14fdXvnBa83Habu}gEe zF;``+>R#4Fhl)76pO5muC(A}EU z5CSxlX1JkH7Cc^zAqLj|9Q=YQat>ayZg4#c`a&GctnM(OW_pzj2qaogAUTY9{6>+qB^PC16RZb$m7?YYt(vI~1<1q5 zYLnsSb)@{+Rxh8n0CK?PS5ApE3^231n9I#^xO>^R3#;Af8EbAgg5rJs+5A-$N6{AS7{}cV+mY4(R0W3s-xw6B7PL=)A zsFC#HG=-X}ULg~TgK=Kx<}Jqx<2iU_N?vx@tCu^8tO1&tnX7(8mtbb&g5atV zZ9%D$>d$P{+MzU#$h&0B;W*CnGyGU4tWl2)wZbzyn98ep=R>=5UL9nySfuSXa;;;5 z?WU|bJDdfkN;;g0Mx7YsxhbLIVTDX9B3~|hc7+OZr4uOCaZnk-M;7*}Z-TBH`{3;Z ziY5t4&+K`FimlEddMfKGrH@5HPx_d+Nt>&9!8t0uW`G&erwGEt+BkGFghqvW6hd&8 zJ1)*_egNuCoH#Tyo2XI>4OqHtq2ALC8lRk}BT?k18Ky}WUB5?#)R?aaLo4fW6*dAA zfO=y#rbbFehO;jVe;{fs-m~b##D}s(9FtG4e zib%#tx;gZf-hyJ40+BiFlNO+vF0|!A7~0X`Q7l9R0lXKzHP2_r_^$7uuE_%BTx*1} z9k=H!i2RBrwmecwU67?U^981?jwW&$yw3g_3vAq=G_p~cHN3jIAbX&rz2kDW*%_D1 zDLL5>n1ADtrNRvmqilhf(=<U~yQI0@L3ek%)|kT^n619h_hD1zIQ7od zjf^uRsIPiR{tE0w?)OCkxVH*L_Lx8^X%O}GsOLyHu`{0+c%$xg>+=yvL8I0z<<;8W z0G8>j9_B(u3*;A#cB4}9%tGJ78d1$m8^DwqVCZXPy*VnB44kJU#K=DA)R-BhE?LLG$=(5;#+u6Tlgu<#{~vWtCvPvJubx6 zoaj`9a-VNlkx+XoH0*i~GNF8CLXT%mCu1roYWEX-pc0o3^4$z{;fbai>#E-1!wQB} zBALq%iv?#Wpb%J0Q(9vT&@&ruO0mkQ9m_Q{oRA~PR4$QDb>XaZO~s8O1`6n%8jOGz z50wio(hROUUQUy!0Cp?MITDwl;7+j4Oht5Th@G%@y38#kVcL*8J;YIK&G z&k7JW2b49&MJ&HK2s%NVDw9+-14wWrH?ugi+Z4e;Fi{+kXJnGf%!H|oSVsgout7E^ zVuy62G^3|I&ZI)fS97!$QPmV1Z_#O8K;mFp06hWgMzoo{pmHtxNDErUG0-3U#HL!K zLcB6#OqHnVV*(=1VuI>~RJcim9;`($yLENa>`cWrEkOmxnJw`91qsaviY?;>ffjPJ z)<7kFD0k}+ER*D5u`AhK9m6VZ4$JO5Hvt5Im%HYOl{~J|qJtR$Cr1@95iup-YsryR zWHKuw%H7J?$zTjwGuxVBH_>T>s@1gB>7cF2vv9-@BMfSC^+pB2>)-=w6^;1~Jqdwl?9Ds$TpI_*)C{D2y>Y9FF@uU;?8WBhrSdoxm`$~G zQR*2JP7Fy(DkVU3FedgQR9z!Mf)lalJufn6Lz+@3b71Nx$f)n-W<+Bcp$e6>73Se1 zwYvNqQ9zo|Td<&9XY8ejp3M*S{LGg~*O^VFK~PmVP&h=bY&Wf;jD^B;^lMzvQa}J6 zGy`u&6l9(N4y%RzjFxeD1C2W387)}p)3~C!R>t%pH=$` zvc(DTG7&8kfqRH4ena|ZGblVU!fIH#)RC+?9 zN%D!JO6Fawor@qb(}`dr)}SRh$yPOUJX0DHLU{1%0_NMatY;)}In+p)IdRqMx-&(P zB7ti#)&h#ZG{x4<5}EASgy}#jULeN2I~4N%C?hi=xi3UHDM#6I!>Y|biex4AL=@4l zQp{s9KcQw!(tOKBHH@h@M)~vtm{W+*R>>0qzcUR!U^-{>BS-g%UJOX1hMjWjFnSR) z2L%W?Tu*_Q#xdQi(=od^ieR)tD2()B_VXnJZL2EJ(+ zwS|fzA_~NK0LRC(z}`bgHs79?6^e|}?xctEEux^fWL^UKg)+`jW~3<=3XCzzb&F7D zlllY73&xQQ-AAzGAYXu|0Z@fv&OBun;q1`ZC5=qM7ps0eLT7A{9`%tzX@Y5KG>m1& z6=g=- z=co#D!>k|fvpAoQLiuhBAEu5qP&$baGf3*aa(yThO=H#$K?N}>1>Q!0p@S-9a|FW# zmu(YvmXMNTsONyUxy{T8#TVSDW3^Q#L{8BBxYc+B5-to@jSPsp0#7io5o|Rd7)~Wu zMX`Hw&^6*Ix&(wH8i(r)Y{bcn91F%L0`Vi32y(NHZZ%y=Ib&DH4+(i_AXC{O6X!G4 zj-X<3(;}n5?~EHwD;ga}iX6=Ov1<(SVXH7l6$xLU$7x|6#MUf2xQ=EH(ttgG)RZZ@ z*$Q<=deRoKz3$}kPdeOyYX^@cE<}QLOJFs0LUQa?+De6^b)zYC6;pTT%>`;PmsdSh zdPQ0;UD9cA!}TPmj1d$Md(F@U%&a|p1|xgbXpv;_3>y$FP(V`Fk!v`6r=4ZN^f(hh zS~LfUif)ip8+)M`FO$!5Gpm)z1Y_9G7eq&a&Q1obz6%_&_2h&v!MTD?(uc?l1dyr! z#DAN`XJG}J;$07zl+HwH_Q&QlHmX5Gy*eAJRY`KNV0Bx1tT-#1M0yYuO{Rgaqk(^C z_0or#T1B_=iyEuT9Jg6tg+3H}s*Oe4Qn4g*ii@(}!FL~C#iHG~ zMB@KHSI{2+o3>XwCD4HhnvUdUr0FpK#!I6x%M>Xn1xC$z;OgSdV8o_nB|R_x2kx4f z={v>YWT2E7g|fk!luz_jcj2Hw2L`g|EkS^(U9^#T#lpBiAsLU7)i7db!HD?ym59L? z3VsF>=5An&poo&f)RZ2Eh5wl0F=N3{jMf7CHW$oKl#C0F3uYu^HtP7hC$lUYHBq_I zoYw*Sut>9(FHJQ-*zEDR!QZL#rgu4{y z3u=-IZW!+mTa4iFAufs{<5O!krI}z$bYXjG;mX0t3!oc64Qh8(7d6LqDcB{#vGZA< z@}aPV^HFn5Y!MMOec1&4A2DfsHX~|Nb0Kh#eM1d~LLL!yR=f>Ok3n09@q~+tD=3K$ zu8$Dvb+JK>Kn^Y_D5(~j(8^+R+yo9<$Cn#p4kU;m=V>WT$Sq`w401$nNl4^_gI(Ci zwIC%Et)c2)P>2x==eAsusIilrL*@vY&fzX%MxV?LC5J^2>no$yDB!rm#h`hEhUyKY z5dN!&9g1NUT?bm0(UL(AnATw|E^sUZQq^BnryX>#7GlsvsPrx{*5-pk*Wmu-1%?=W z&Ia%nFYXG%8rG{aY9473)nkk_f)2INGDkKLTD5xSlgzT2c&iL()wmd}pKK7WqeMp) z;fZ=ia4l>=Dw}qxbe^R$W^93{02`t~@KPP|Y;?jXQ2`vqk=EP{c)C)fsE@QA$j5O) zd(4MX{9Omzy|3o;nQ(Oy?t&Vl^pRB?CGWoe!PjEO8cjWrq6(kR*!rVeUW z*H)}Aw8SKY3j0BVatk~%0$}1L)cL6D{I4yB60@GW@cbzuYR`Q?s<+8}ze6&Eg%t_> zSH8C>%R5QuLe^~22K<~iM}lmY=_f3Q_yikLreB%@VF}TnbU!h%=7=l?SGVRBZ)dfE zmifdA7ZX$e4`zPj2mOKYxR&Yo1Xinqr$C_WSURyHhwKIH&jF=>plP z;P2T`wg(?>V*?qSVBe*bTm!nc@`N1~&N5DLD94yf;+U#6+E#_*9*TWa)IR*;!vpY4@En5Ev7dRp`KeEB`>9+q)|emk&$HJ5>6h+( z@S1JDzu7gv6EhF4``~Py?KVorDyu`s9=q=DEjCdS>4{4tc@4 zF80FVkJK;a{&shH>-}2m?VCMv-L>!E{^++WPu}_Yi{3kY&(Hts{_IJMzgoKgCAAB- z-1FJ}-g)ory>p9>%I|bk?V_{X&OZ)*I=|DuE&JKxgMM)2={H>PKc6(d_UVncUGqNb z&GpyaX!)0}d-+wR{L!{gZ+u&1ol}-Sc+GhSY`FdjpZf5UHja@#!yp{|`T3 ze3#@YpHlSi>l^%GyS2A+?hcQhe(Ggs-}R?IrHs! z-M%Y-`9Wu0aH=<2+cmb$t$Y3xue|>JUyr}?j#pl~{m$2}pE0?wO~1Of5w|^RgB?#e zVb$&j|8i^Y`ggy!8pOV_MAtqyWK`VY)I{c zE^A))m0cSb|Mtq;_fD^EwG(z&r{=!(=N4|*@%%OCvr6Ej;MbzN=S&QkS^ogebw`sVs865Hxa&NyPU z$vrnbv2XXzO}>};pO=oAL*CzKyy@ew-g@~lJ8%8^+V1)3jdzjO(U)A-f9CcV%lo}& zZ@=5=vnRgta@z1ey3wP4@wII~c=SL)_~GZbhZ!!4snX0|!(OOG7>j`qOj=ijx}Z1qw7v%OnhbuLf!^V?h=ee9Uh zeY<>c5Gk!#FY(>W_PgHs^X}Te?tlEmM>jj-$gh68w*HD8t@0&zfA(Jg{gq#MVny}D z<$v4isKZ`*rx5f0Laa{oCx3KmG8FPbU6RKH}|7b}Iesl&gRGuYFejF!lDjUwit=J=B9c;wr6to+wAcN6;R-~6V>{qdb$m+k)x?v=AwU!!gD{`+s- zyfeAMJ12c={ZsZ|=fwOsc3ZOB8&AFxTh!T3*n1swvh3ZxzIXPC&)s?F1*=M1Pkx+S z`2LGaKBesO#miS6zti`>cf%exK7Q6kJDmCVOX?SWw$pp@;T!+$*9Ct2WA^G4V-HImv4B+8TIogw_JSF$`iOHyBwQ5^Nr{Ky6FdR-n!qGkGz}v%p3Ae&)oR_w-30g zSL)n!&KK`k&OP%*wTJoVFDPa%ynUs7!{zoKuROTZhHv;!-gxcc&*xse^lMAr z+`4rCW{>TS-h0eOFP*&nS?{egFI-hRjyUAxkLI%zjy&VYla{}7!*$f@CK7DiQTsP#)TW^e!S|&r_Vm*rQiMgHpx|6 zmo8e>eDIn-NA^WK=QRWaZ=%> zm;SI}|A5G{749EC&+Py34ZCjNxX*a*m)Ab_y-g3wdN;gq)w4UVIPa{t8aJLjd^y?a zlMnN6zj?~?OTO9M@^p0f&5x4rSbgT1TW+vr^ou)lXa4rhmmfc`bl3fuRPx&%_0*rv zc>KEOmL1*5EuqJ)*2e#M_{P2b*Pi{}{Rbbh)o!g{+;%%{Ru>xV9JJInAGXvEr=yoB zx>;@EoJ-_h$Lzue1 zaGrh8*4$TKxb?K3Z1cw}j^69|`}aKbp|4x}ZGBp2$z?xEUb_ksOD~w8JL!VW?Y-Vz z_m}^=f4>LhJ1@Wa{fB;2=1y&&rvCZs^$Q<;_Oi>b8Lv7-+3eqsPyPC2_T2R+;=R8T z6X*Tt_K{uKd7t;OLOg~E=GV%v_9~b!KlaDy^H<;f&*O%FeDjtqCiW@zsfV5TvzKmp z>(93|tPkF}`GY^QPoLRcz5Mi5-)QW)e4FRI6Y1w(;a@-K{lBOF_L(m}^Nkf({vh_` z(!(!&?XcsNJ#N0{gXu2c5{wum;U|tpWAZ<+V#)prargVO;|@Z@8A900hj*eaq_;0Z#<-Wy{kR`i|3Z^_`=P% zy?Nv18y|Q?Wyu!D{9xCs{`v53$NcH?EB8OwxN5)kPuTzEolht(*=;-ironxeHg|jX z>HR+V9rMVc^>;sQd)c~D+4&)3wR8W07q@=dx#xkCe*L#omap7yrIFqCko7B1VN{z+ zFr8Pn#9tS3PaWI+`&r9>_wbivEBYrye%C9McH8HsdH483`#Lwg=NWd(Q@{24uYfhY zwfE0=U*GDV?Z{`M-tP~8|2r3*`N%ike`3QwZE}#aL-m=RpI&ViSDd`wALP|P**yH$ z)?v444_^7luUQxT>%|{$wbyaNN$p;HhZ3fNefHey{y$!L_OGv-{yqNAod+zx_<*0} zPVet}(5Y|jHs0jyyY_wO8>^QrfBP=|txJCL^?y(7!EMU!^y=;Vopak=$E5aqvKVJ0R3s(5gUUJbxFMejn-#vLl;Sy=beNH{}-p5b1 zE`DVD-MjZ*#^3e6boAjnU%g`64OgCj--|0wyZ-o-yiJ`iF4^MvAM9bhcH`|UuD{{D z8xMZ-n|NMtub0Hk(RuIf*Z%F)_Jy~V9y#0CY2(|zv`+rg_y2WwIeqG8-fgGvkorgZ z_TQAQU3KcNQRmrve)qr?-Q)Ls|ANP3OV0Sh?Pngn?y=0LPh5^>u}%?sOP+k}#*2U&lmV33EdyZslFhktgsiF(aFzpl+bNME11f6wpSMqbZ)*hg0w?=0W?gX!(7mmHD*@haz$C6`_K(!27qy>_FPY?`_L z#jiA%_*;F`UT>3IuG{w2lg?Xt%JM7M-!(FO{hV)ono%h(RpUa%Q+*dEz<(Ms> zfA74jrc1Y7EI2t@nZ+qem`jY4F=bpOz;FFi`xW%>Yt9rNm^pyveTm7G&e=lWSApPjj z$nw-O`Put^`K|lE+Fg0lj^95HsDg*CUis6+*{5et-L-k#2l+z|+v=4wv)_8_kiM=j z+kUqtKar#d~jTGyUgp-N%=| zx)jf^{9^IPt6tmfYg^`?y6(x$mHC_BUO#;K(|7M~-FwSzH@wn2nOwQuX*)bl@3-G0 z#>2_`j``s|ijKwg_jjJZYx${JdAh@r=YBmoXuI~x18&}6#r%<7uKVqmH@bfC=k4Cv zw{z{P*Y?_TyXDIBRBzS(_b)r}_#;lJeNejZz3UIh*gO4;_x#`@`Ls(jzvy=m#5 zei09E)der!`0g)WPp(|O?cO)Y`jwB&UcTwz2Y-Tv>DBdi*wy;FNlnU|ZM6RRCm$)_ z7|~Zpe{tv)*MI5CJ(wN$b^0&de(G+=lYhEYzViCBZhLgko8J8W#b4O|@?%z z|7hQY=Vq>cZ?_MYUa;bd+rItqk~8i+`L^ZRbKczOoK?FYe#k9942_vb1PUY78eK#M% zd_nJg_l2MAIoo@`=kD5lJc^cbsznMc<_Ef9}v{NoJP~Z(eo4dq4WZ6=xrO&CYP-4qE4!+Yi|2E8Fb{ zd;W{-)lPUP{BNIM5g7HGCHCK;_mi#n*>cGx*FA8`UvBZg^5R|leV`U9Ctm75^^1qO zgT@bCeaY^vd%tt^>Lr(v-#PWW&BJcY?|sK3Z#+R9^1AwiGf#cmetEb3p1bm`8(zKh zstbN~!-f5Im%0xPPg%a172j;V_2r!~kF8q0X*v}QjvY_k|C`D(zSar9;Gg=Jf%fEU zgJZG>U7mUFab|M$73VK~L4WM5oo~DDM~9rT?YWWc8RtIs=$F5>_sege*52dbt2VpT z-s(FyK62cx@4t5Nr*|%IKHleoDs#_GkM42nb=Tf`$okq5ub%Mu^1EKxWAi0v+yo_qVFuU&Ul>zB$if4SiM zH*Dbdm%X#~!Ec3V4EHL%)rGSFh^Vdk8O>&fP0n;gh2=2|x9qNWr#7L}vG!)@o5yy%!ZJ3Xc#`?NED z&vD{jEpB9-1lV}ECevL4K%wB`?<6tsMAt(}V zPsaXJ6u%3+m?hJP$+IF0u^9tLvP8utQ!olg4g(S^r(!Ki+2{YPMvIkUxApRQ73%p$ znKw_qh-UW6`Bj*Tn>@W)ky7PRp3e8y*0KwulmKzQi=*9Pblx{9g8ae2se|dw;Vbcs2)@E;RTO|O%pA; z<@O?#YCWXW!8q4-1iSs6$CIFV^d1jW5V0(rqVbt~Ng|!dG+XB_xF}A0-k-Dy>E4mR z?ULEgRZA0L(Rz=&xJzrWv`i%Iy{-&q2Z@XPY)?dj3Ysv4{tNpXF zj8OyV(RTOLV79VF%d1=RgeCy0if{zu5fn?w66&(kZ<^#65<5!$Z1EPrVZ_oVQOGcy zfNHD4{34aaqYs`-q?DrN1nx%eJn&CuoAzTTOB6yi%Q@yR{LR2lH%4lo=nbmpOdNgv z0WAVEjupnpb*siE!>97D;JZ{d8t~NPs#2vkdk>qH;T$D=I*AcIJw5!i9f>Re+p+F^0*CR(;!@WoC0uH;vFi77)OOHQ zu31_uxRt}5kYuAS{&0r(sGdz&-*BuH1nd`?0_ocSMbi|CFW-uDT}sF9OifLdYHp)v zEOShkdNcM4)0_c7F^Nc}q@pnL<*9&F3(?}GJi#X?{hOpRk6`~`83Eehsld15MyX?r z%h8TQ^j1FX{D^zd4pPAHEvuB!1@y&@fzu5&XZ($Vft=5U@i7KDF83<$ z4~`PBcyVzFttiERX6PRm8$2;N4gg8xs}1_KFxE`wzf3$xYw z-~TRtYczqUh8N>4yZ!;IXvsmow+*@|kAGRqkO3gN9fYgwA9FjfE^x)-aOjo4-WChq zMrh{B^5<>Xioh~j76JO-PZdB2Jgh3nQ78#S<3DDB-vhu5dHR-%-R*xM7VROZ$>RGG z=r7#l-ybP~o4{FujTg!P09~}97jMIkm-#pEUA$9D3RrgeehJyH&jCb*2fW1S(2Rus zvFw#R?JLxDnT>k6+24;EBZZ5}rjr}wzBZDn{qbRxDI`cN=Ugz@Y&_wYX~4!eufZg6 zqA5DQ|7G#`g(<2D3xAp72JSmRR&w<(Q)DkpaT!Hg|78l8zNGfQfX6|QKm<=w!t{SW zcl#Pfwqb>xd#Mm+7wMmy`eQy+mU;k1$oUqXi@3~VE+&cTAziJCQLc6eFS33kBne^| zbTH4Y8OH?e-p)>5-)D(XVo2_~YiCx=o!@T)>l3|3J_H6Z!(b{=kAzRg^I_ml5V-$y zE}a@T^R~A3MlkaJ;$Mz-w+MKtF|E;U*bzN{jG@KBe2qxKd`0=<&rp@d0G}XsVoL%@ zRg46%;$UkwqaH_?2uu_TlT9~Y5kW!E-!(-VP$K;2X&C}8Jc-s7`_CYCNP~ehsQw5g z1fM(t{_;MW--a&WDe&nwwJ3<7hxPhjU|Hye_b1RE|MhSl;H92kpQT*z41=;@fK}fJ z(B7$#uMV~n21inN!(UnR}T zvS?j9FPtvHbG#Tm-u=+=zh<)((Kv7_R6c)RynIX`ruP7m(v#9x@t2pJ0LNLdX-~fh zhf7^hY7D}T=NDJq(xihNl$+KCG|8#Y|J)odQAbh#4jG1+R!q>e5CqvcdzF!M0*45O zA0U+fiZjcLJRzVNr2xYG?M0Y>*g%_yvx49r6Xd#!@ZJ*@`q8;pqTcn_H8n7>6B@qq zpPXc{v%-`cO<=;|5p;^xC^#&j1-+#zf)O^6gdtLpI~IM@STh0 z2W%sH>cyABN~6K#u6rvXC`9@Gz5p$_L7;{?#UIb0y_^PMw7!4R9)lDuFCrymYGgF) z!7j!YHhz9%a`gMTj!;YtOFi%r@Myl+z(Sk0zsC4x5V+M%B?p;b=}%)2#|`Nzw)qX( z+W6$r8OsmvN4kVDi&>+m7QFA`g`HyB3lA-Leg=FKy7|uK`XmDr%xETKC#5aAbc2@dQB%FN-k_L)5y0{v}d*I>6r=1 z&uyfy@w&B`Lp`==Q!5^e1&iG(f>H$yXib{CY-N%zU!q*w{WhD1X}OvB^haH$t!Xv> zTIHQ1S(958$-~le&-ihqlR%cc7Q_cqyew19YgFBBPI+jk*I1MeO<%i-V{RBHx9k^@ zXJd6=AE3^k%6T|7zroReZfehQ>TQJk1m z6MWmMfj4eiyelc_&e^lz8+l7J6OpFXKaQ8qzkQ!>t@i76XvwPar`i#VK`gzmVQpLU z)9P=p$s#DyVr#EjIq_Iuy?V8Jy|kOhrkB!Ts+w0n2iJZ$TbV?=5K8vty()WLN0`?c zoxwfke^+ak0pKReKlWkUzx_2GQzcfkny=UlCU-A4C8TMgmS>G1kOxbKXY(UWV_TMb zpW8I5NtaUt9bV#ceOf=e!1VZsvjqm^K;YB&ZxtW-x9&rIw{SB$3Iy02TBG9V>OvaFeYY?o$ax6kzKYwT zQa&80eTW_=qG!fcP^b-Cz0A?yMs?4c?dYC%{94hoR{q<0j8STbnYOdvA~U(O&%ZvA z2c8=*esEdwS+SaOo7GN0 zx?yi_RNvqh=b>irr}Wu8<5xRf$B8(7ON|xzjMQgm*=+HRCiXeWd)tzS=%bt0ac0kG zJQ~aVkoWFpra%y)nbb^1(jz7vJz2aJ?Oa+z`=p_Q&RFS!6Sz&b1wM*9QM)n7X}s7; z^Ow4PMr}tHH#n+-3S};>!D`T&E}hSP1orr@7V_%eQ6W&qiS~E|D6|-u`pqm4KNeQ1ZX z0Z+%2O5LKNTWtfRKJIcTatUmUc{b|@h_y1K_o#w~FKn&Q3W?+)mMgb?LtIFvqXf;T z7RtMz^j|#KCb%{uTOE7OlgWzJ5cb%^?1FD*ZxSHZV#+4Wmkuk#2SoFuePf`z`qNYp z61s5bD<-ZsSK6`R7e&K7Q;Ziv6pun}{WF{_Lt1%i@6`dZivDx%8hxEh`@VM#$|JWs zCzOl#!V6Xgk-Vs7lb~4S#JF9xA$ys<jnUXG{wv(Tj_I4j@czuzAyYJfdQWL=>Mf)#Sx$`B@4_z&|=~`*mWit2@Jc|&GD)0#ml*=saYye=y^kolfP-xY{Wp+4DY7!^{f=g` z>Al7FJ=y+Ser_v(rKie_Cy5HI) z<)M)Oo%pk`Ip=(-t%ios&yE3{6n<@e_BLiaMDZ3Vz>w~ZD`=qwaJ=`feR4l5cq-90 zt&TtqcXQZV#rL2_qdH9a#%~s(n^_Iye(p~=S#z9hM+V$U-dcgNy2kINk_Qb-jI`5L58$8e1Ghs5W@4Ctd7Q}&Icrn^qS zrPR#qdQErfRSQMT@j4~jr>o5%df~&b8(b7+y;_J=&=SGw)|W^~50-0$klh^KEmw?a zMMpmbRTHAx`U>Fk9OLVph(tDionwttEtvi zKK{aFf60EdkY9G^bKteevFx;y{I-NK@XCgMl3`8+cS#=ak_}@;!y%fYy+)g3 zla#(dkF-n1MH4mUdCZ0o@!W(etjD6`T&&XQ4d^^0>YtoRv zY7H( zWi->Q4rVQ1)so}WxsUb(?^J%?out|Bo%+5nPUA)3_pMa8%(74qVTCiTj$Vz^A*$Q% zgl_asVGruZ-s=*{6NR~NqYfl-5}smop8MmzxVH!KB!oNbhx)LO9EZ>kIRdCp3ka6i9{pf*EDMcUrwx*~f$RvZ;ocOXQN*zm#Q6ek4xi$b7a zc`e~n6I;Rd5Z05-AN=Y^*Oc}k3_zXuI2?l;pb!u4(5NbR3s*04aSzQ894ZslX)E}& z$w;Z=z-I5+n=0(V;q`on@rv=I?x#m$;@0Q<#&x3pjt zqoCyzd>d1TY2=Fu|udS_h(052a0f%6=Lb_Pg|K9t3r;4IM7b*;nu>WPg>@xmW3t~2A>DJ zdGeNl^yt(3uI;X^({}|Ki;)bcvgp+{4VMq@U43lF`gQM>)neOn^UK(_*SJW)By5)U z`!asekuRtfb9;xhj0XH`Rk4m$gbs?0S_jk^KUc4raPQ{t4=Lxa9y5_u9MyXz8u*@{ z9z=5ERX51K*$QNvE@;n6`pgw4$n;-@+;JUbcY~5hDCVyKlp4f#lg$u4e&ZeZ<%!|6 zRzR!8z*hZ7dBl?Uv4Fyz^`@`~1Y}ll(HU`SdeP;qCtJk%hi24gdyP-w2KXC+25d;( z*X4i;*uf`GK|zgM$jNGSct9rFukY5?rDB3biaLg5wO%j7E!*a4vkO>)m%INM=;H3% zL9{=!DKu4jIyfUo`3jIn*8_&Sr$Y7Xov8MG8rmcYiyTz4D)g)i6E{AxwNGYwSv852 z@uora8rJyX7H@kNI)oxqL)T1{`%%y;2NeTAr@t*Ru*z~K4mic9$%)8Wc~{}#hbNEQOPL6khp$==%-B;B-O zxvkk0MV_)6V1GKN5<`q$9Tf<~qM)Ae++_M>l>3c7eF#hkt2jNA+^udif5aAnTrD&r zGku^V8NlgyGD5|Atb6or9?BcxW>ZLF!+p5M)m_kc2l&r{VnLsBOZ%Cc`7fXY`(j6~ z^%rbHjhRf)wo7mzJ?AaM`y&x==9Sk};PyF;&HB`erLEvqh~4O%N#$S2pdB47YlIuS)8FhB3=ZS<&P7r;K#7zd$^ZPPt}}peL8Q~P~8~X&Eqx5 zTiDP^9#3zl8jU~Y$y-ZVDf>vX?f{ML75B(I@Q>}3q@s)kv%(h8V!8R!)OPpEcYb>=cVJe%_P)3je}CBr2R^v>-+n1FwZ z6b#pQ)9i=HnZza;1fN2Lpe>Drx>1{cw^A5u#*c56lO}o~UU%-Kp&=rLO;vEBbrZ%4 zyOL3d>PF#FictIm^pk@5bfR`OGL2^H*>Lt2YL_g=u$M>P$u)9{$lr_ zRX&qfXWT+Tcz!sqIQQ1~$OV%TE|y|t?pkGmExgdi;wNb(<5p2bEM@sgj=?SWa8_&* zN%n8o$*Xvm*zs$?@}5-{5q2A2zjW@}R%*R#mJ|}j#OqVl-RUs=PB5U}Fu05{X5-77 zF4J}fa9}LW%uZKCg$CKkoE1FD+$56gCUsL6aqWl~Zebxe24*M9_()FG?VCek*UT}k zg5d=8$<;#ry+TCnn(w`848424BwN0OK0IAhD-lziVbW+NTskLE+c%8{ffLk1UCEDno?!`6iq?Yfo3vv{(-_1k+2At>PPjm&8BZ~voc>-T=P-8$ zHa!UzibxVa?`(CwkqZwKO4fQMr;gv!OcDHON^4p(+l}nef}O+1VeC63(XBDDS|#k( z2?@x6SWPsRd}}bcRI9&~Ii!k|Bjzp~8)NRF!1M7a!r|74>tJV30k=b}k;IPre7N8B zy{%sQZ;0(J!03$bO$oFAUK!pKbtoj6Wj!%El_NdqKej#Y*tNY^Bp7Ud@4bgXUL#5-<6 z*wtnBktFn1oHkeuD?r`ovrxy3Tp0x*^fC4Am#9P)l_GB?R+z=CH62pd|@MicM z^B%t-8f*9C|0avvE`Zi+R=ps{$5enTlzG@Ai#g~nFk9<~|4*20j6dp>GyT-|X7aje zi2LOAD_WddSrV&yCzltvYN(tsH?0J2KQ0Ay9I5xe2>!b$VD;*lt0f^I(E!-|;Q#qP zSNnGW_%&2v`;dwFgXs3~!sx;#!G8N-r>!!A0(3J1U{{eBT=Mo6^mm3BOfbeJGAfGb zvsJv?Twa9jo<&hU=6|M*Hh_akqsEm!;qigOiP%zAdS1TvM?#~U5WdHe!_(^uR^}pN32V<a>3Q!^J?Nh0i9fdk^70E9%iD+un-8h`d%H029HU1asPgLrt2Q$WT2}s`WHd>%)FTaS28`f&lAS&cBVuK3f zYAfu9-=b6((x0&Xg8BpE?n_y20!3&uW?>xiHj;6H@=4+!lfE+DR6$!~3wBN6j$;Rd z_<98RmL)S_&i~nRA?0$B;P9IJ|yP3bV2=IFh39te8Bwt`uP8a z`i)ZtsRJn{Ob!6a0U||hG_`p4-KfMooCG%GAK_-0zpuj(^8izgT48gppkuPCjgPHs zN@aqh?JqkKGT=(E{THzySZ>Q;e2hgt>u~fDPrk?foyqml)sg4-@D$W;%RIsb4+13p z40JHOSfhH~wxZa}e~pbMVTXA6xYh~~a4!`;0Zia8`uOi${D$zR zrAoguTH;<4Q(WxUTjn7t-y4f49&I#iws+rHSlRlLeTql$#&7BH=k6CR3yOPk+dr=j zP&89JN9g$ZlJm-wPu4s)JfPke>TO;h6TX@@{nfz#Fkn>g&hoS?yU2;yE%k;ft`!cs zK{Xqa!%r3Ms(u?+J|#`@afJ(@3mS-t&i5hpk?}8*P#Z1_)3zlrNZY46RJB$WknfHG zl6ed_#4fcbVoC^EM)50nrEut;>pyJ-R8cz7Z&|AK6(KBAt#SevR_AeP*H%$)qaPn6k=wlF!KmeR=g zy0u#3x-@#Jh7a?X2S$527PSc9m>xcA8nKWt>!o?S@fB@ux8MKN2%4!sD@LwWHra!-DxalutXStbe%R8?$)a;Re^i*Qs&PChd+1=!k&gRXl>gH$d>=?4I zCz$ApL^jf29h*k#QDh59`21*u9PF4q{nR`YWT|hS$7YB~(Oj3e+)FI)qjmqIsk*JrGlf zf1i?z9xw4*3^F&8F(PtQH)VcQ0X-r8#j~d-0Kqi&Cf#ZPa{)Zr^&l#GN|c!OXn0LaO0;=XlVl$2^9-a#?ddM z#b0e03NP)DL^dI*t`~cMhOXzkVB0gRG?grJvA!PwEMn80VqU94W)|fY>NHXOKGlQ1 zesRy1HPR7Ynz3z0>Y6OE#B&-qI?hjvBRmF)J3~XFPGUmRKxuGJUX= zP8Ka-Xl286?TpZ$-L`AWzkPZ--^pgm?|`4Q|2@|Au1i9`H;o!hg9g;aqV?eI!c4V) zG1XWX9D1Xwnd0veHBf((P|+0M>X2sll@Wd*dyOvtk~T&9j?Q~?S&ZH@ScfR)yB$k zHe{IiRLh9uMVMMI5SOXH;lLKGfQ-__+=Z=Cwg&4l&nwDCJ?yQJOg6&V4oP}I>_~;{ z{fTIwYcdqgY2W;O)2K|$zS|XTn^F#`m1nYo=@&ivk}A3I?I3jlBXeCYYbZZ)>_gi= z-T-eUe=t2vtHqi{m;N4tCUgA(A2kdMQM75-86!qP@A z>Lc=D$}*Sq)~`Iem@Fg(?WK=<9lk>AP^COV1WXSd#lpW#Sm_J^c7C_Qc{10>t*;<@ zVZy>O(Ct1=J$3lGHnDy+XJ_Icy_QOB|OALbFAabRndy+H`DHze@$0d2?8gPa+Y6Ma8Fe5CI?;WIq zalbpD(*wuC25HIdk(*z2b|&)4L11KLYthJhe9ggYsouNJW)J3c=F6$8ZRg~RMY?=q zRIZnSGlCRs+k8TQHbU|Gq>=sS{<{bs0$6m@0_nl91zB=_GVxp%l64S z=_-|I@I-r5CVG3}gYP^h8;xX?mRh>(OCn|s^x}hrN+xmqH^thll&H?n^$)X)Yuz3@ z^mTq78O$zW6(pf>g_Q^hlH~2~6iYHU`Ml~hlud9cl|n0Zsd7h9ijwXT*S;)db-l(9 z4RVo@H>=TGb<#&ziL>kUIk{WsO)$dcy6Uz1;1Tj4t&DE25ssnC9ZQ;6gVPL(KJ&pU zq+1O;Eq$u^dBw`E2OAA~xNgMoOh2)DO6;WX;n;$LI!cJA=yxgRg%ExjDh-6 zR~sm4i1PW13me5vRh3s{-S$YHd64?Pg^)$$e~@GD8-c7)ihM1r81IGm6uwQ}!6%oNXrH{0;yk%sxXn1x}} z^y!ZvRf55ISJDMG``lezlMMD>U8|JxDAeraXM7zvWxD!*un4tUfJRVmOHLtTVlaZ2 zVb)_yZb&SM6uJ&MxfJffo@hX(B>d(|5&7rZbe(U}Hc3V6Gr?If7Orpt2>+^x5V8#I;@gci{hk4jwHAd*n|e>HSB zMK1#>)Bn(~NLf0xH-`+=7vFS@ro5lmBt0YvpO{EobA@diBOvUF>HW?H!}_Mn1Atv)bA2B*t8bU~}c_Sowv6%bbLeZ|<*t&ZZQ z{^FnsgvfxVISzg3UEp9*S6)%V+3W3#$WG~vj*Ao38|a)m92>>dKW^Zji=jE=*?vb} z!bUoqDHa=vsUv%2c5;^X`uC4!q6;f%Ndm^TuE9D*-s>*bgBp z#Op!D@MUKDFD~`QFGfk}rT2?w^vYd+HY?lOM>Gee!Evq^Ma*HK^bTrQDeGD?`VLaGWH($1ggeWJL>cYdj@zBW;?NDOm>N2Z>0{ z5vq*^dL-l`XSw*LimZvad9zHQT9@}~eLe9E1%#*ZpNG-!k4@SRQZ8UqWjdGRmoKm2cTK75jRr zLrP#Fby%m=O~&d?&lhX!YZ**dk&N9!v7)d&{!f@w`wGl5-s`J$sS0mn+kNWn{Cs_L z1cM84Tzsgj$Vx;@VZ)Ph1;aYTqDxy$Y8rGnx6@E*K}!_6=CfgYXH)do$JNH{Z#?wu zw6s?=GDmjp)+n)sC~eeC8Z5|iWKyhJBq^)KqudidB+|9&2HW35a&y?PwT<=sQ0bQzKr*6<)7W16lz(ky zmG$RZhH10X=Xu}RYB@KQ6G9RMySk zOU%?W9=d8QQr_4d|K4Ie7cc5;z((08T)T7XzK?gNOQ0d?c96>r(F+AM!_5m}OLcJx zkW2zkx^O0(yR=sE-ZWyb!U?El!<(8SO!jslR^QEDUVm+v`9c#ed?$K64k_Jnvqq+W z`zJ@l9(zH4{EtMWZl?wN@t50?#hXcc)#p0g^!d{p6I+)_ml8#Z8wsN$aSd`eXWiij zBUhA5Q5DMM6iH}ix@2SIgt$g`;!}Ct{~53D;I7=8Cr|y{%lzM<97? zwr&}sx9M%EivSnVOK2CM+xBT=hBVPHCFKxIz=k_HUjUp(5s$xZLW~= zXOv_)v3xGm_BhFiwZu$Y%Zd}0 zUUlc7$SI<|LI|)b^`>I|y&9Kd*$W&I-V4`+j$eAacvMXP+=;#abEj#P6Cp}jbeBe) zGxLV=V%H_JlIqgTg*fD<>w*MhTlPxT+KtQgpj&EEdD8Us#?@QE64=#VR6(#kmf+_p z&-aW5XeL1XccrG)5IcHT1-V>lsp%`vH#VkLhOgH)zByYl)C{O-DY>g!aCXV}b#5t7 zmJND!zF&`yjaBr{%IqWxd-gaIPPQ)Cpdjhv0~!;e2uJYod;1<2d6<=SPX+qta6i9o zkzGr@aAx(oy7V&F7bUVai_KFsABU3%F%Orvh<<6(@u=WJ|0p$acO280C9i9x`&PCt zTu8~Gci21HqUD;q2g+fpl3mZD8xbjODlyi8OF%02+&uJg#$H)Y(x8XW-2F*~idmw8 z9`kRglYNWzy_|B$Ps_`G$<%p1G|topy}pI8;*8y%_2 ziz`DXi>j6Grf^7y2z|O;+Nyx}=D;)DQyD8f)uar|c1*(?7L@oXYVT38I1VPgh8x6_ z4qjvw;xk(mdh-Kf&rruIRl0#sF9`{kD&5i>4tBfI#Nvr2&rZ0@m{1pf{rFm5qL+td zY8w+QZKtd2r~-5~j;1bUT2%9m)@-@kyc304bfNgWiPuml*P+#3C=4%C)Qf&yRTjA> zaih1^#hrQ%knDhU+MoU8TupI(U%Pc?{2=9k%^UlH0&($Lq3JGv27m4n)@|hArylo% z`6Dli?FpHpyIaArq)(2bUw?137h>zHlJF-3$OGCDakv7$lEdM-cNiizk2)3tGd2x+ zGV8OJG`wCfDm<8myw&%9mZBr)_EQxINgeNxlCt7uQ@>XB8|rVT8;@O7zbxoWe7pZ? zdp3UM7xchkACXd%^ts&g;S-z9m6GZPEex=3LSUTROK}c7mid0qpq_}O&wUbM)UYjq zEsn%(@8&N2C?=Ry6uZM?G6Qs_Yycsw(EFj!vR>REv6m7gnQrVZjB#_bmUA5YCp^xh zLaUv#6y-im;?R1P@tv_n@(W^*(8oD$Bl}l-UvFg5z+=}Zl-t)d&0(K1FrvOFMtA!} z(M8P7aJNewPa)U!!(o1mZay@LKXpw7czm5IN5)_+PyI@hPz7#E5^QM?FY}=}nncchf`pwyB)ok;Iq%Tk}8s)sob?R2v7d5+GUM&X(pOA9({_dQkZ zDH<_9K@5HhpgI?}sciH&b#ITFKGtYZQ>Ev)vlcc?5y4??P`1i#AAd+dE%JhIH9ag* z@+^UODTn@KDV7^-kl$UjK9HNi{-B2uOc(o+sbXiE!r3YU_xb8`-OVE7#H0}ZXV3IA zQo=L9RwNs2PS}mfYh7K7xtXtB1K*pgpPS$_T5yt)k4o{I$5az`!O&4lm5N+wcUj$D zkjKrT5e*Jjh<>|0ki~OeBv={J@_m9e=j*VR8ZTP)2WUuUxxWu844_ASNDt$d4X-_V zYZ4_nv5_J9>SY;yf_`PKh%!w|c0^qn29@UohK5x%6{D%3W7GSIMz;34{2t9-uH99x z@#m!M>#n_}=qRBe2;Id~4*g%df{FYCQ~e?m0gObep%jyw1Sx{%lrH&8UwuJM*4Q2bXcaynCU6 zpCqM;0EPXUXQ?ua0-I(*L&MZ*>h{|4qC|?JvO;Pm=>k_7$FaxhY=4oQK}TBkwT6^P znzhRI?E_=T!G@LX^KI3!^I1z9G{y&SoHj{MJg<=-EDB}bWYpD5ni12aW>w9Wn+9WV zrs9J6!L8Br>veQmU$n!1H>xbgT`Ca_$CHv7VUd zHMkB*WT((~Lb)|b?Fgbpt=v1QdV4lStEhBwhsz#v-rOW@#&okiK^V8spRJmTZffi& zuHI@Zk@HQNer;3`0M}WMtBP&&w|u&`HgJ6O94Td*mt;E%dDpyu*Kiiwncf)9_KcOV z>cN#=bzS5Qz4R^bZ^+m89P!l(Oc?V~u4R0yq!3*kHP$a2kiECNB44w{Z{R)1i*`K0 zaX&MtTu&fnBUx17FiUkn}kbiE{r8zrPl{Brk z{H0cbIe}Ymgt+O!>26pcaP!;V0H|*Dy@3QU^S^~`0K?5{_bn6LnX+p->Z#ab$*(4z zyWp)=R^8?gz(z^;J?=yI@Iu=$_{*2JTKcc{6{5bP=oN53Q~W65W4>m=uG4hmsu$Y2 ze+$Rp#9Do~-t;7e0lG_wD(OQUpwg{E9%qMaBtFH~wlU2(tZT{3 znc}l@`tZD*zbvg}-Q3QSCcON{v^phFRg5krAT!r3VN9SQyPDa+io(0a9PT#q?!$B& z62DU;O`kpWnJgkN@riEM%PzYRo3>>8Z_!#d2FH|l;ZAv=Do5qxrN#D3Ou}kjI;7B0 znv=JYT$lEQh_+UowO-jhnf9}O*`I_>_bE{}uF}D^W?H(`ac|uKNl^tmCf@fc8R+6* z7v?Z1kE>vZ=!*~8OXg26rtq_q)vac3e%BcF3=EV7l%(q;(6WBu{k;qWB42|=e_Ncijuzf!5zxzYX4I4Sp zkbQ`EVqrp^o~w=!W$1Bw5T z4=6nJK{u)*$n?YWk`8E<2HulZV}p8pGYVGvA2&%Xy z2O_ud;LCLI*ZXAcq$nYyMuI(d`|%lS$f$F~he4Ce{XbX6Kb2Uc?cVCythKg8N(@pV z32=|`&T3B-PTsbXwfQj`@dKGqG{3ENVVJ>@5~~%XLtPh#cjwd{djY9Zd&y%voSM^8 zyf*dp#|aT0-O$93Cx?RFREqAGDZi$*GlB7Di~!?}Gx>xI902n#l-)>6%NVgWU2!9c zT8uQYBL|#@PWMcO~#{0?Nk25PUhR`y)FViEQ$$EBe$R zp!&@(syo6bKmooK+hL6X=x8>I{3JxLH8JC3M+7ZwBSNkruF-^oFbU;;T_R+C7lje& zYg3q19jT12DHGlk^`7?pLcUW-ff5Z!qtj}Tba&_vTsL|@+GX1Y*~K>*rE0K7J1Bn; zg-ye1w@`OxPPc*RVCc>}YUS6r-3uoN_&}vvMA`UNeC>Qmfj8LHX zQgV(S%gL>MRksOtg9-TO(gD1m`szAF!WF?WL)NDv{4q&M_R2kPfIB$TCmQS%6?j<} ziuM8&V09@fyJ*TYZ}T+KeI(aln8l9+yjb!P(oOUp^`gVzR+BtdrOB8{nvN;v4lZI^`~y?>0xAD}b+8 zjFF1%o;vrYTFyTq>h*m@q1JFt^RslRw4+qLK(H9a&nLez*qobR6k*ZXfsu#$PLL~B z@Tt;?$oB&Qd;Cxls?2X73jD-(Sor3ffJL9AdTMA{=r(%1VHzCDPVp5|@UC3qV8&UZ zdEVOQ<+LaT+ZD&2NyS8OIL;4!l|wH3l5UGhZ|ed%?z>cs0_{evuvEE~Z5O|CW8qsp z&gYHrg8e?b=j~J-oMxtRU%drOO{~WalqQi}#+Q!EcTv(FiH|CKUztcuZduU9p>&pl zmd_8oYaNPBj`WovYgVCF_&#E{-YlP%R)|;V;n>7hIo+pRQ%DwNVkIgt*JONGwJ~NP z#ynn42kToKB7cU=*5qvv(+;)l6oZGfOn)O$-9DP+!$q)-CMeT`Zjc41H=d)zgZFG3Cl$F@n;T!2d{LdzG*0seruaO6i5 zQ?~YK4v3a8EI6Vd>BT-atA@c6uEF(YY-U=6%ETKxyz`->rPtLNz{xVtlk)ZLZRl-= z=aJyhxd1wFl7P{>pTfV}F{Q|{wMASoxE-g%%AzQ@QyraWhR{#ORRHEJzX}J zyqJ)F@U%N(|6w8E+I#`mnbqg_IF0%T6c(d$p=5o!xd}bkO(P!1>EfjI-c`%VBnh11 zYii} zvK}|Q1PDjKiFtfLgRpd{>>e|E_d)KpFGzA)D6yz zy>Fa4TmsrVazk^M3i2Zs6rMa;wtimqh!}ldOwvw7%k@v2Ax=bN;e~B67wV|arOpAc zVuhtk(Lway3I;hLlTrPgM+KIDlmiI)uZu2=)HAEBu8i71HZaN4_NxPuF<$EB$#a>- zw%uyCWi_#C4@Z5yTgWOwrwCO8Ur8qo>xvsUw%2oY(xnf$@yH(;4(IM`(7DAkz}Vm1 zuVR0qnL^Hza)olXf{en$h=e?;SD{CQU*rDN=1j%wy_wq_QD530qOruW9Dp7oh6`Bx zjjrbzuy#<6Ruhp@C?x#X(U_JLz)>A0H48)jTYx>?=yE|J<*W3Zq}IsSU7ix@(=fW55VMiCC zogr)kRAs-M4QNTaVZVeO3>rh2*V%N!^2$qFe3siHR~p>y#|Y2*KirbY)BgA&2_C!a zIazj1y}*Quc(Ns#e_M9CW`7r_d&+RyNov-^s>Jc^w#tbs%#!qu;aqNjxF!h&uf@sa z&&@{;>ksK*qIjQotF&7d%?K=x0>Pj49&4vbc|h8Uqxt!gEYZZUyGtB zd>meyH`^{LiCxtb`zA*gP4_QVtqQkT-{R9)A+|@b4|)paqSirArpwgYYnoN&>HW10J*3=}0H5MVs57Cnsc)9r|IGo3+;{&RzKO5C^B*;dh{|U!3 z3w5CnsJ_ZQU!#D2=L3Uip_R~X>g(h%D(WK+@;I2w7JJpDBCN;YU>I=Vha8aZRM}R; zbpJdOSfj{(xg8;k9mas=CMIrU&j#C=88!3=;Ubc^nM-=6UMA{0O`aZs^T>zTcZ_?j zKHRB+;@kwyuesyzSz_URah?>IsxS+re`}0Hu8da}Y(p_1RctjT2S#o}VkGC!?ahkw zp?BK8iEr1k8=39?;C)?6CsY8AP7A#YriC)_eoqoJgIn$FIa9D+MpWlYpafn|MS(AK z0>bXo4C}1n4?7i)1a)fAdVKsQ)=TH8V4#~L1yM*Z7Ujh{P7Lb;b3nfh`w8g;L@6nkhhw}`(wzWYzdJ6|K5A?7hA zL;)T4<(Ss{*2^zpx^2)`z^HxQ488CicnJ&wFHe+>iC{P^$l*1-JD19nV%C69n_Qb=cRjX z)52vF%R{@Nh_bcbB(bva05#H`#YECMzTiD!TsFPg`hlyAS1f9MVx9x${P_Cf z*6V=0kXk32O%HApn!(G5-mEabrMhMz2sq2qX<)slv3*uLn#$tIf(1;ASZcJ^t@UCu!A* zPu$_rxaXseZ+(wYMzL>I%20Lt+)uYL9vu}BG=)J}nyM#H_cSC5^*2>yyp}+4tE7p@ zF~DwRV5_B|94pBC{uf_w0TtC6wT}a$fQW>2OG-0Hx3nN3-6`D+CEcAW4U*E`Lrcd{ z(k(S~O6UJ@!+XE~?|$D}v*fI^mNVzPvEOI!{p|fL9opTn)m=GC<`zk5$!pNBRP7m7 zmE5^|7L~9K3~ZzaMGYp*A#m=po8787mw&Zp7+x^>0He4e)oO)AzHQoXj@z(7HHPu} zVbU$&hDS!MJ~&9$tAb0rQV8PG8Jos7F~#rICikP2QY)20dNL1%RJsbimwWRqM~Rw!Xoso(1!=rB2pa z{9au9bFr1e6Upw_3g`urG>1dkjrQhRNdz0+hNqF+mH#TT|M;FhE_>Bes9oBX*BijXO?_L!|3JN zaGM+Y+ahDw%JYbp0xVdASm~07N%sMkmF?7%yaPSIghhlWQup#cx_GHJT^Xi`1DebM zr(tQA?)EiRhlf4)j;z<)UzF^$KGOg@P@;afc3?z*@7i_Wf1)Do#Bb=gR33F4xDQ_UxKG1RWr_95dwM%--C z0$2GFD|q(dzlQXTWK~#=pv)&tZ~EqUKo;1n^SwWv*q*XX5gW2M4gkzEN8^yX@YX8Z z4`)%&%=&U#G6^iaY!_4*S8H|sih?^B)2#Q2y*hx0TRb|ehOahxiS7MAhvt|YSK z?!l(|1J#-MyhBz!l4n>_Wl$2trrb(S>g;kPXWGOr4Q&@1W`o3Kwz^Z7KFoL^?s%&F z`cEpTuR4H=x}_ube#7)nvgD*m*L}0;3QililCRWitU_zn`#%PoerQ%bXVkO$!dZF+ ziL0@co{`oIyKw5)zIQfBmnag&a_v2sGJt}AVdg`R6N*MR{Up@)=&yH$$Rh0BC&mzu zW+?pUGTNUoTu)zUL>83wL8Vn!E_O_&e(r^yb0^*cXE?L<0xxEg7A{HYElC5eM{u29 zvakA`d7V{o%Z1LA2jksTQDP0p#e11FsBBbkT%2p4b|2Kbv7RfaU1L#wxchY5G^T%cjC~MHXo=<;5WD6Cx zVw+-dhzsN)2C0cve@mB_XPIGe82glL*Q@!uCFX-w$a_tR!e2GhHfd-LrlF>=mXIA- znrXil1K*TxG{5bDwy9Wyy30$6BMAl+{2aX00~f-aRPTY-)OV^i1Mx`Dt)^w7NHQZh-pCx3}~KroYMf}(Nl zby#zdMC~tbp^F|tbb=f~(KRI$RLAT;(Q^fvP|Pj??I)RV3MhNGoqy~R)H*)7wzbG= z1_fz|xXPJwD&q^~?S#^3pS^Jo+T&h#4o>kFZF`Iu8 zQ4C`l;&|<}gv8tm&05pVRyEN;JYGjD#ys;32Zg1l1fL}@_V9h4jk7Pg;+=%s^puUg zWvcx;Luy*T60=Dx4gRY9Hy40yiVz8?`3jG8JT|@|ZLxKO#9@~1y$yJcp;5hK%2s{< zgjRiHtiRj(>Q=-`ph|S}Mq=H<^ZWAc!RQGaoyH!2)z^)7*XT{Xu)~kTW)Ua9vJS$R z+^MyMuIrf}kU;N4$wE>&YQ*1MH)&2^*AM$QT{1E5yZMi_6ZCEng28Jv>gmB)Uq=oG z(1u%ZLV4j{u%1A!>JI|J`hDKe6PU) zK)u~vniuDOcBEi@Lmt=7kTzwv6m^OY-s#fJFgIi%8aD)5RkS_@`p6olx3jgrjfF%*-j9B>uk#H_yo^`S>^SWo=ZgF_bxtM={j$5P*u7@)9^F_Yi z-RrSa6wB!SP%6`#Oo1}%S(Hm*3l4VJ2er|b@_^k`f>#ec$45_(WltY>ceA#?@Q z5FC;;vt!5FX`k+b6ycp2}&*zQj(|1OPbdgvOOEE8wDkR~0(i&q29?wA| zqlM1}N{3o<$(_SgZe4>{f_4O_&8%iS;#(}x2``YRkWJh4U=8@(XQJVI&u%>e!QlPy zy9R1Q>#ZX2$-sxH^yrhXNkmtleD1y>JDm}O@-{nyI{u7v1v~_KGyfO39(KX+GNLXy zO$(nolPOyMOI=Qzt0-Erl5| z!d2O{nX!_u^zAZ1s{ydy7CEG4!l5W&t^Z@McL&7p11l`>AsdE+RlBI2~c>gi%3X~9PG2lOk0OFep;8hSNJ293n1 zg)RXa{pu{yRwj@_te&E&VhKuh7nrnCV@~DdFtrRC{JcW92WdS|ySf_+tQnQ{qd4jb z+dh!1=T2D-pwKI!svO4M-b06`N30LJ&j4ke4paSh8dZcvMC}c))%q4Bd{nv#VrM0U z1g+j65J+b98khDHk~}y=&`0vb0D%lD-v^Cz*IMnxj{@g?q6Qm;&JkSQwqmkeQNYbkb~Dup-$gRZ=C3A>|SX30>?a#sDfYHQ!+q@|Z`qax}P0#3}R4h5gh%7pQ%+g39;VA)ej28^7_$x+YhX z$Nv0dc;{(E`H$5h7FO4V<{jGDlD*MZc1-8zHPc=Zdx9`TK?k6k=mBgAKlm@J|BgBU z{>!gB%?-*@sJ16EU85DUI%e%)dApNZ$&B)FRNT^a_2&xWq_WIVzrJ|`e53iKxhJ{$ zs^IG`NYhlUT61wO45@ zzEi_P*QyG4osdTsjtM9OwwHy)R0wZ0G7;tZ5KA6*1A0;_TxjT6S_^X-=mkz z$x!Rfdami!A?@q0`u^(q^VP_+1D3N!gu69-j%n@&i?%xhx^dMuPlX#9&QEPPM1_=K zx%=hzAM_Bm;vjP7`7+I{?>FewIX>p;rfcGroh*hBo!$q<>2o^lm9Rkp5_njIBt%c8 z!6o3 zWN`W9LW{J^+y-&V+-8};vhR!E>d9l0F$a=7qlojXH99p|r3UZeze}3C!=9RJPi8q0 zhgb91zpZHqZux@om7u6HgJD?p97S@4KB;%eJtqx8V4RCRPX-p`N%ykhu=aqrc4{M? zV=!9r52qCA3>I zht(mC#PfmeRu_o_Mkiv(LSTN&t06w{(kHf|ZRWX=1;~ALa}|79R>S1I3_0SXCnE6v z;^Ky=`C?^HO5G|H%U}5+tBV(_YF^ZJY36@foOJtEP@XU5jSXi)$VQSE&Zp+R{d`AmXJ8dt)pjqpkqsio&>82uFBr2fKm>_Su2QKr? zRp6#B9P!1}fU992l5e1PQZrpBWDJi7sa5$0tBClP$Tw5ff*671 z*P3chbL?atG~GmTPuzK^QP?RFWZytl>ZuUU`=xN+W;ipED#WJ!5Xs6qEs2xk_R}EK zYQ#l7HJc21WpO&$Im(`@wB0!m^adKNU>d9(%6Xo`^+-n$^;^nWaS{>kfT*AKoK(Lt zwQKP5qzYpvk{$`RT&z{wB3*9q@KYA;NV=+$BY%Z#l+$-rsZV-Vzi=W%(!mNhwVG>7 zRF@`L*j&EhR5YmjEqDi|3y|WL;68d3u3L^8x_w-!xD*z%fg8HLg6|buesw;SFPq&v zuOOgidSV`dVUYwgjjoZ$%ayC(r^o7+@DGX~6BG8gq&ba+3>+bpj&F|y1=tvIwiuSy zp}R^vcNe$Q@)$pFgYD~-bA95RV`7_<<*!TZc>yj7JlS0QKmiurYNIqPZ9%U)S$pEu z#{6fP`#Z7%6s7fzVgHr@?*z7KHS(SHMVW!r_x0Z{&C9(>T7SJd<@i4B8D#3*33mXKk z=0Grf#+F#TZ(Y>>$o#R{mg?9=o3nDu6BGb=F%k*z6CE@NaH~8v#dP zav;@%>PtfjGwI!;0{%rtu<=JEOcOQ=gVcOV=A;e-h-aHL-am?ws1I-Q`eK zm~umw9%zl+PE(plREktQfimf`k@jR(19h5{9!ur=D$u*TGlZox_q6sh2(8H6!qPNN zM+WZs%*Mw-SFw@$YMT*Hssp7Ku+V&lOpB`0w;*;o^ak?Pu?o= zhREY2%`Bi4Ji{V%K^|sO)cZxs{Z2-&y-bde2@Tg||4Zw91CE-fiM;pC#%HAh?d8iZRK2W6H zw$oDWeec!&5{Q}mM!Xy;H!P*BDT%L~su{9SABp@xI1-@41IHnOx2Bw|9xz51oNXU0 zA+eesYt|RTTKt1JI7PRW>(~GeW_;W z_4DY^!|JoO_Nii%(hvv*Mets&A~VuEW9t`@r&kq(GI{8oHNzDwuNpl7-_z1765v$;`l=H5JW$@kg)Jz+W5y&K4^0q# zenDPG=P5Xf8>vy&{3aF#h;5F-(F2RN_ zySYXRbGs+^7M0|_kEQWlqphFANgT`urhDF0M2gE6sp2auW(iupS5`g|Cs!1I#Cn!O z{VKntvkE*=(F||w6bA8?3rhoR2B8n|@=tuA)Bs{3{PJ+!l{VY;3LxIoK9t!$Kx5x0 zG{T@dUtciK-?3R=e1wu;$3RcC9Q_hdrk2npBA3@yLCO8uWC>_@w+i!J0J|=m5pOMA z`DXL^$myZM+*eqtBi8=?al(Y@_s;p7D%S1pH=9A$>YS#elVoPI2M=k5 zK~w3N4}BNdSrD+nDN`S3ioYe!MW9FL{@s~Y7?hy<8&-{ABd^t2hjUubBC@T2xpL!g z_40%!_Q><1jCJ^Z$Uv#e|CJ*z_+9q-OYK_k2@TWb)h2#oUdLBHi78_^k8J9nP}ASZTKm&bG~SQx@bRT8|`O>z8{4Gf5)@cTkP2 zp(sGDk0r$(0Z)iUE)3#=HzWR6CGlIVjKmZw;pe|ACd`x(_M*vpj=k@R^mv`2COwO( z#M)ZQ0RZbL(n3#3>!t`GmnD(#jV#wUf88?$miEs+S|dF;r$D`1Ix0m&8!_ zGG8!*r6V1TlS3_A0C-hw@YX|b*(52zfYE%VKmSu#3z(OY@rS3}rWLz>K*4`}ZjdAL zi#i@Py7V{}4Gnh5>NMzU6{&hDeds!0h$8J;<#Wlp=#5Rhy{lKEWi*?cJcIZqqOPS2 zA}4rVdNOK5n%}=vgjy@#Xr}_EDiE$qy8-AAElh)D7Y3=66j(TZOPdxjJ3ISsp7)=} z5JrfU$jHcmOZU2>ql&9M6#{i%E=8J<>=(_Jb0d7UE+OsQamsj~i#ZzB^^!so%=nNvxmmymNcgVmM5{5nYvuHL(P zK;cjL7bUPyF4G8@fL}PI%?OA5nA6}=+xHAcC+i-~mb|6?ce`YAcs&Hg=u)6*_65+X z(8{n>g>ve$>>yzG_sRxdKOiFsB$|a@aVPY z$PHHbFNizHG5V(nuuf3h6#8_c^W2Va9mUE;YKn1C|OaL8(&(P$gtyT+DhkySDh3@5kAN{k!=(^rfZ`g>w34leiwqN6QE)V>guU6%+EUcAZ3)SvbgZRDZm9 z#`lL;*Ya?GCWYE{4Vu$@&bJwr*e~CZz5TZzcd(krd+KHo{^~FXt0XTTI+1F!$axf5 z?;jG^_R3;%X4i(9TX??f$-?aFACD1uS!KNUsef}g=GELM={UA&f~2Ck(AlRrp{QxT z9OpEWn)*oSp3#$pzd&rzjORE{wz8bG3h|&w5}W4nf#0P9oQnqWV9GVQ$ltc-MV8{u z>xM=lwSv*B5gck`kFTb0#Xj~tyWoDjjM*cIhz)S~8Qo}wmLt`rWo=UMG{fM zENTl+!?O*m!UaqW_qpGt!@pBJ1(T$vn#b$xz7Z3yJs8F6Wb)OxoiC!d={IqSox$oM zdFG_mp2gPg2dSy0W}cgJz7mnTaF&TBp@f}T65&8kuf7WqZ{?@8LpX;_!l{EKZ&)Td zv-uwJ5dbH#WkeVWU{jJ`!q;tT&jiKU%v{-8S~kGVKdY1Z{ExB8_>NpZ@!jbu#4uta znq`n=PQQTUQILshZ<2_)KPZ6`=*f_VPk`b$2CibkAI?+gmVMN>7#O# zfb5`}N5A4X!LW#hHAvy>0g%3>g+m&LnFoNc&Ezm ziK*DsmJ)38u!>KUA;|(06hqFMg%qBYOmZhI9y=WkD6@pCiC4`IsxN#rvfn?c3t1Ln zM3a=7n{+OEw7X1Z6AQWW%3d0ffgeRSO!Iu_xq^?WS*0Y*>6T`APxKzV{{~dYlTK<4 zV1Yx*pAkcGce)5=cWFyaH-AX2{kg;{(|i&V8MNmSwZkAY`=I$hdwmMiU?NjsnEYrl zX3-OL!>*ee{~7k^>$cX1fwHf52)br-xGb;@F3sxFC5^Y(rMv6>4ZI$=Ki@2^erldq zQ4f*VtU2B*a>+>C@hdVpRZ>46y`HY~D&m6H`|awFiy3ju3H4xtJGOGO$Li-`v@qVsR|-_so~8I8wMzx{3#S+L0($(&j%E6$=nuP+ z@L^ZVk$=r#aCf;D980qE25$WIiD8820;$1rVp142qW(fqzPa*k^5j-md{T?;%T7-9 zPD_GP>_vKfvssVh)9euX<+dgJE;R6*~FIPPeoK+v-Ojq!8gSPMf_>PCiFb@YUy7LOHmE8d$otnBuydzPEM%E3J+jO>+BEEwC00Hw|>FblAzw@pL%04jj6K(#tQid=+ zGB>65ZRdh=aUaiLrU%$-PXI4u6nvp;&Ey4Ck`jWQO0-sQ zCrg%D@@SmTx&+)Z27}Nx!56G|*)60SQ&X$Y9>LFQTFc8lC$(83jmE{MG7)yg?$XBd z;3(SAUx;U#Ry#EyuFuS$%CeJH!4%Bq0H5~GmtVkC=O*YduEwD%1z%p$eW_vZl;|n@ z=2k17`s4+8kHV09n~RvB*xOVdog~A=rhaiJ%9R8B2xvoSF|`d9*~%|ThGYteS)N$1 zu7=kA82mPAJC3)@0d^t%_jtk;3<9i~ExF`#OT;!`T#I;|H#WPhD8Os1zPI&upa((TmT{vz` z%MVS27^gW>q0;R+TvDN^A)pi>$EfEES{|uD7%2eI86=|tk)7j7^Q!5?i%?p_vryVX zr_a_JuVByLq!&zOx<_#}q%q_go)+0FGD-%`Dv<>%5;RVjqlJeFWLavOM_X@&aH(WB zASsv^4QPhd#*PmReHnCm|B}^&&v|Z}ag-;NeITAyy?C;)`{r?5ubrELTBh1*k?1K+ zhM7x#t*ul>s^1TUHa?(`gJ+y#EAv+D-SBGl>mprNGW<+&?%>C3Qc30vw@&0BHQe)` zOiNI8M22==&OrwpdfqsC(sp`^-JtXAdR|>b)=+4Prc%HUuS^~BA;Fo($32aJ&m!|6 zA=FEQpzFsJIB#`~u>WTO9dI4U;}Dw=wVpx>a-fjkry{0QXyRNgdiVXd^D`a}JV|H9 zjz@L3n6{JD4a2qgj&slEwP(M(`ZeQtcXl==yj-RhP$hh?7Hqq}6nz)`oL~+sCmZK` zN>kHz%QgVX4z(Md)noK|jmw%pWc~*DdkaasW$oQvsPDb`dylGEP!MS`82Y=13}oJu zc%Vd?!2#1v1jm*DJh+(y;;ThY2xaD*-^PSM#D~Hrh?uJG?^R=uOvMBX3Y?eGY7Ij2 zI)!Jx7`*RzEUEkbfM%$DHlTMYz}$Ps-$_mW`>MpM{~1^E_+-IFFXl5oJGcZgZlA?q zbfokQcuD0No5+OYUlp%}$R;2Va}6E<0ax3tQ4~&vK3O z_Q@JW&*(n}z#+HsKF}hxEgVi<=jzGdBpo0i5d%~5)B@q_pR>f)6ggL ztQJRY8qG!1wH4R{)%=VTIZJq3n%J@E6W6->E8#I>|)+OH-{-UBwvyVfQ$jMJK;#>F4{ z`JG-Eq;F(Z9f)ug15pRA9UULI-{$W>F4_`>MGS4UU!LR4pAKlKC)mNyWvp0@+;y8_ zZBOrC*h^``_5oSmFWH`~7Wxdt8kIO{;jM6-9znIVq~b%1{$>*^_?pD%6Y6pIT1#1v zpRcX`{DsR@US}-xz_1^RXF57iEjhF=Ql0)$h!f?x&ft2G9gS7V5a$nsV?NPr0Hf5) z3yfIRelNt}ZxH#9FZ<6OsYGFY5LbyvsTJiPqtl*`g>N=f``lBRM8C{?P*D*{un3Wn zlRyMC6@Yd92elpvF!qjU|9r*2e3;)il@NRp+g(LUb-AV-?Wepbe4h7g$s(Rj|IG#P zg-u5Us->W0Wty{e%adJ$nA=iZ_2&9F(o4VH5(U!8}Wls z-6?R?nKYwf{4f9g&#%RQ!TJK+xSYEr+i_THyK;Vi3%B^it=?v(^r-NN_X&=v|CxMf zY|v*`wkZtds|FAom!}oaL*11j@a;6+k=g&TH2#irNRbnvB!)n&%NRSLwx=RHsk~Mf zI|mA9(l2dVu6r&t`xO~>*8Ib&-duC7(J4W#rDjVl-$SiWC^O)JMgAO^+^xS?`)^$G zKQD3-Z@T7x9j+$Ttu{rIwgpV+bwrSzv@H+MW*zogy8f&c3d(X+n)Q45jl6O7^uAXx zPAcoE8sN_r=Ey@0;vZ9u@_SbQ^Fj&1%g|=ne(b2ocHCfD{;TM1oo&0y{V3XWC8GDu zL@_%u#L!8>p3}@*iLGFB!!%{-+?nWRh#m)MEFBxj0S3pq4{@LHRyFgb->OX4yT06x zPWkyj{PneZ*lBYDKG(lvRR6Wqzz9c=+uzjR4s&G>$EI=5XQIwdT6cfy@$%PTI8SE5 zs5jMm)?od_hIvn)-@&$v40N<_EcG#_yyCGg37>wiwRhVExBE;ZP&t0V_j-;FMq@`_ z5c+pqgxL0xb7^AOM463jTRW79O@DhV@ki0qu~HV%k8E>9>Opz5c!pc$Z(SKj_*Ypy zN2TktpZ%w=w(A3p&c5v>3Iw!zo8|2Wim_6IDlzl6sQ7#`9mS=|yRe`HF&OoqzVu z$1hy16#Cwdl!(gwya4UaT=D996<{?+_iXkQNv`?3tkA-=2*5^K)l7-PK}%K0!oPF!4& zXgSNmp(<|jp29qOGY7V@Y1n(QrOsYX^AVoE%l%!SV`Uv?S8V~75snzt+OTC8Zi@zn zi<3sURb$j6N%v;>?fHTSI>5URkk-nkLC|ty?3Ch#$bN#s}O=5ve zO1UjXpZJBq&WA615Zw zBA>~rdvM`_yAo&}XW<)$xr?Ccbw$+rvBFj+ZSOaOyt+tw$gPI z%0u)(5IOi)>8;=up6cql5K}jjLEP)s;a46TI}7EWm(QT?EZ-swX=F+gcdU!B!16qP zgV958noYS_K+>Jxzvn|(z6efYsfdm#8?{KkCdS1mfmn8o)=1+sh|e8v98r>X?AT8G z{*X(q&+YENq0ZM(3Rp}eh=SIX6@)io#qqkHdnlh05=61r?mnAaGB=lMstRa)+$P1q ztMsBYZWC7nJ@alA6YD2&RyqTo8!>?_S>FX*NPa^x-C zucVbQew$ONlkm{DyBY6^x_uP2(+2B!FC=Zo^msJcn}&6fnyIQq*ZMKcb~EyOGWu+N zkDcTBWrhnV4Du$l;qyEu(d6snP`<<9xQX%7#w+SZ$=P5zP1l&IN$L{^wz&)o7VVj+)m<$8SL zK8tXO#g&JaU+g>?&{|VOP|f?6SnF=5tW6?BG6tekc2PyqZ+?%1i!JK+L0Nx%uNoE> z2Ki=2gxMwHzS;beDkwP|a@MOxl#nPTuajC`MyqVKl1sg-amI5-AT!GB(eOTs7B)M* z>7N!08LD#J1$8dboy>XHT0EKa7~qg~DNfvRs_pNob{u)R{DL!+Cn!`2S~Ix(v%ou{ zSF^JIOa!joi=+f^SDnSc zwE8W-avfCRJLgOB4;L&ID!r*mKblyx8*;R=bVsyeFikgDBA-z!90 zPwZ3}STaQ=y$;)&u`}GK-`zn`7CK~o?mD}}1nUk-o+Rdc31t~{c-2s=Nb%8nG%9|R zP^Y!YTdD~yRQqh$I<_*ldD=QURBl3yHN^)OuQ)Y2#m+Vrq_Tk}58Yc<4CjPxT2c4$Hk^<1CzJ0yJFsqo!4(;6a9V#d>1f z$XW=HDw9%5Hoom(gz*(VvOKEF_#$<^kZ<%23z!_Ff~}i1!PCj($?09cE;Dd)0ef$+ zw4v~yC)-~)f%dVo;^a`aT@>rOKh_rB=Das!cWOfLo-Jc%d(GVY^f@%VDB`e|G{8~Q z+b~p-{UUxh(_z2rv)?-~dNE$yRpqUdWM{n)^a7mT-VnXm({ie{N^En}J1=FSD}OW~ zy9Um|h{`c`el4n}_kx<^dp|RM@FW9MIjmB0WmfD>nVA$92pA-F=;_J|Eo}Q#b3!#W z%SCxtX^D4?YEFR$FNr}({Kti6LFIY}K8TA`pxlcyGz=22&SXj`OS?x2lNgfe)Xvj+ z;$&qMaBdb*ClFV?Z)!vL32jo*lt@-%pI^Q%fhN_^W_+pREMT}`I!RZ{n~wY^Q<|ZT zu>S7v`t<*I9Rb3*?=lLI12jAkyR~fTO>v~4;&PIyTq}ep2l03dn@4U|bm{(q2j-yS zj~mO$_fup#mQzMYe#ZHw)}ce+vRSvYO50j-S7WIsx-(9q&}d;am`O$9u{K-Il!iG< zK-ILG*ZXW|5F?c#Q_TebX_VqgC=`tX<`&jtZvpFG1%|`I+&9j)GZK3G0!(6_tkd+P z%%qf~Gu{E>O99S?@lwWQBbdEIER==TWW|>x-E>(~D_iEGar8Ar<)M=dO9g#q$9fFQE?bZ(7ZBh$4J%I07c_TWKU|T7NkGKU zsj{;;Joo$zxE(ZQn27B$mafYAvQDFQEMVI=vSW-pLj)v7LOZTm-)6PS3P&!*vLYT$ zLMH-eWzRIB4W7~`Xw~s*gbuQHK}G_SgW4O(`%UdXN;YKRD>zb66M{=^ivSqxo5B

HCJfdohYhVgPk??uWYLyayWcAb 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

vz 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 page is completed as a prerequisite. + +Running Jupyter Notebooks +------------------------- + +1. Navigate to the PrimAITE directory + +.. code-block:: bash + :caption: Unix + + cd ~/primaite/PRIMAITE_VERSION_TOKEN + +.. code-block:: powershell + :caption: Windows (Powershell) + + cd ~\primaite\PRIMAITE_VERSION_TOKEN + +2. Run jupyter notebook + +.. code-block:: bash + :caption: Unix + + jupyter notebook + +.. code-block:: powershell + :caption: Windows (Powershell) + + jupyter notebook + +3. Opening the jupyter webpage (optional) + +The default web browser may automatically open the webpage. However, if that is not the case, open a web browser and navigate to |jupyter_index|. + +.. |jupyter_index| raw:: html + + http://localhost:8888/tree + +4. Navigate to the list of notebooks + +The example notebooks are located in notebooks/example_notebooks or by navigating to |jupyter_index_notebooks| + +.. |jupyter_index_notebooks| raw:: html + + http://localhost:8888/tree/notebooks/example_notebooks + +Running Jupyter Notebooks via VSCode +------------------------------------ + +It is also possible to view the Jupyter notebooks within VSCode. + +Installing extensions +""""""""""""""""""""" + +VSCode may need some extensions to be installed if not already done. +To do this, press the "Select Kernel" button on the top right. + +This should open a dialog which has the option to install python and jupyter extensions. + +.. image:: ../../_static/notebooks/install_extensions.png + :width: 700 + :align: center + :alt: :: The top dialog option that appears will automatically install the extensions + +The following extensions should now be installed + +.. image:: ../../_static/notebooks/extensions.png + :width: 300 + :align: center + +VSCode will then ask for a Python environment version to use. PrimAITE is compatible with Python versions 3.8 - 3.10 diff --git a/docs/source/getting_started.rst b/docs/source/getting_started.rst index a800ee56..c1559168 100644 --- a/docs/source/getting_started.rst +++ b/docs/source/getting_started.rst @@ -38,12 +38,12 @@ Install PrimAITE .. code-block:: bash :caption: Unix - mkdir ~/primaite/3.0.0 + mkdir -p ~/primaite/3.0.0b6 .. code-block:: powershell :caption: Windows (Powershell) - mkdir ~\primaite\3.0.0 + mkdir ~\primaite\3.0.0b6 2. Navigate to the primaite directory and create a new python virtual environment (venv) @@ -51,7 +51,7 @@ Install PrimAITE .. code-block:: bash :caption: Unix - cd ~/primaite/3.0.0 + cd ~/primaite/3.0.0b6 python3 -m venv .venv .. code-block:: powershell diff --git a/docs/source/primaite_session.rst b/docs/source/primaite_session.rst index 87a3f03d..b02e015e 100644 --- a/docs/source/primaite_session.rst +++ b/docs/source/primaite_session.rst @@ -35,7 +35,7 @@ Outputs ------- Running a session creates a session output directory in your user data folder. The filepath looks like this: -``~/primaite/3.0.0/sessions/YYYY-MM-DD/HH-MM-SS/``. This folder contains the simulation sys logs generated by each node, +``~/primaite/3.0.0b6/sessions/YYYY-MM-DD/HH-MM-SS/``. This folder contains the simulation sys logs generated by each node, the saved agent checkpoints, and final model. The folder also contains a .json file for each episode step that contains the action, reward, and simulation state. These can be found in -``~/primaite/3.0.0/sessions/YYYY-MM-DD/HH-MM-SS/simulation_output/episode_/step_metadata/step_.json`` +``~/primaite/3.0.0b6/sessions/YYYY-MM-DD/HH-MM-SS/simulation_output/episode_/step_metadata/step_.json`` From 1d09f0791a0dc4c89a8faafa8f545e348cf641e3 Mon Sep 17 00:00:00 2001 From: Czar Echavez Date: Thu, 14 Mar 2024 23:17:34 +0000 Subject: [PATCH 012/124] #2369: Reduce dependency on manually replacing primaite version across documentation --- docs/conf.py | 19 +++++++++++++++++++ docs/source/example_notebooks.rst | 4 ++-- docs/source/getting_started.rst | 6 +++--- docs/source/primaite_session.rst | 4 ++-- 4 files changed, 26 insertions(+), 7 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index d246afe5..a666e460 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -10,6 +10,7 @@ import datetime # https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information import os import sys +from typing import Any import furo # noqa @@ -63,3 +64,21 @@ html_theme = "furo" html_static_path = ["_static"] html_theme_options = {"globaltoc_collapse": True, "globaltoc_maxdepth": 2} html_copy_source = False + + +def replace_token(app: Any, docname: Any, source: Any): + """Replaces a token from the list of tokens.""" + result = source[0] + for key in app.config.tokens: + result = result.replace(key, app.config.tokens[key]) + source[0] = result + + +tokens = {"{VERSION}": release} # Token VERSION is replaced by the value of the PrimAITE version in the version file +"""Dict containing the tokens that need to be replaced in documentation.""" + + +def setup(app: Any): + """Custom setup for sphinx.""" + app.add_config_value("tokens", {}, True) + app.connect("source-read", replace_token) diff --git a/docs/source/example_notebooks.rst b/docs/source/example_notebooks.rst index 9fb5cc9e..1ea94249 100644 --- a/docs/source/example_notebooks.rst +++ b/docs/source/example_notebooks.rst @@ -17,12 +17,12 @@ Running Jupyter Notebooks .. code-block:: bash :caption: Unix - cd ~/primaite/PRIMAITE_VERSION_TOKEN + cd ~/primaite/{VERSION} .. code-block:: powershell :caption: Windows (Powershell) - cd ~\primaite\PRIMAITE_VERSION_TOKEN + cd ~\primaite\{VERSION} 2. Run jupyter notebook diff --git a/docs/source/getting_started.rst b/docs/source/getting_started.rst index c1559168..7a23e4f8 100644 --- a/docs/source/getting_started.rst +++ b/docs/source/getting_started.rst @@ -38,12 +38,12 @@ Install PrimAITE .. code-block:: bash :caption: Unix - mkdir -p ~/primaite/3.0.0b6 + mkdir -p ~/primaite/{VERSION} .. code-block:: powershell :caption: Windows (Powershell) - mkdir ~\primaite\3.0.0b6 + mkdir ~\primaite\{VERSION} 2. Navigate to the primaite directory and create a new python virtual environment (venv) @@ -51,7 +51,7 @@ Install PrimAITE .. code-block:: bash :caption: Unix - cd ~/primaite/3.0.0b6 + cd ~/primaite/{VERSION} python3 -m venv .venv .. code-block:: powershell diff --git a/docs/source/primaite_session.rst b/docs/source/primaite_session.rst index b02e015e..d0caeaad 100644 --- a/docs/source/primaite_session.rst +++ b/docs/source/primaite_session.rst @@ -35,7 +35,7 @@ Outputs ------- Running a session creates a session output directory in your user data folder. The filepath looks like this: -``~/primaite/3.0.0b6/sessions/YYYY-MM-DD/HH-MM-SS/``. This folder contains the simulation sys logs generated by each node, +``~/primaite/{VERSION}/sessions/YYYY-MM-DD/HH-MM-SS/``. This folder contains the simulation sys logs generated by each node, the saved agent checkpoints, and final model. The folder also contains a .json file for each episode step that contains the action, reward, and simulation state. These can be found in -``~/primaite/3.0.0b6/sessions/YYYY-MM-DD/HH-MM-SS/simulation_output/episode_/step_metadata/step_.json`` +``~/primaite/{VERSION}/sessions/YYYY-MM-DD/HH-MM-SS/simulation_output/episode_/step_metadata/step_.json`` From a9bf0981e6624569eb75f2ef0c54451c18ccd27f Mon Sep 17 00:00:00 2001 From: Marek Wolan Date: Fri, 15 Mar 2024 09:22:55 +0000 Subject: [PATCH 013/124] Doc fixes --- docs/source/game_layer.rst | 4 +--- src/primaite/game/agent/rewards.py | 4 ++-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/docs/source/game_layer.rst b/docs/source/game_layer.rst index ba400ac2..af3eadc6 100644 --- a/docs/source/game_layer.rst +++ b/docs/source/game_layer.rst @@ -26,10 +26,8 @@ Agents All agents inherit from the :py:class:`primaite.game.agent.interface.AbstractAgent` class, which mandates that they have an ObservationManager, ActionManager, and RewardManager. The agent behaviour depends on the type of agent, but there are two main types: * RL agents action during each step is decided by an appropriate RL algorithm. The agent within PrimAITE just acts to format and forward actions decided by an RL policy. -* Deterministic agents perform all of their decision making within the PrimAITE game layer. They typically have a scripted policy which always performs the same action or a rule-based policy which performs actions based on the current state of the simulation. They can have a stochastic element, and their seed will be settable. +* Deterministic agents perform all of their decision making within the PrimAITE game layer. They typically have a scripted policy which always performs the same action or a rule-based policy which performs actions based on the current state of the simulation. They can have a stochastic element, and their seed is settable. -.. - TODO: add seed to stochastic scripted agents Observations ============ diff --git a/src/primaite/game/agent/rewards.py b/src/primaite/game/agent/rewards.py index d8cb1328..52bed9e2 100644 --- a/src/primaite/game/agent/rewards.py +++ b/src/primaite/game/agent/rewards.py @@ -319,11 +319,11 @@ class SharedReward(AbstractReward): """ Initialise the shared reward. - The agent_ref is a placeholder value. It starts off as none, but it must be set before this reward can work + The agent_name is a placeholder value. It starts off as none, but it must be set before this reward can work correctly. :param agent_name: The name whose reward is an input - :type agent_ref: Optional[str] + :type agent_name: Optional[str] """ self.agent_name = agent_name """Agent whose reward to track.""" From 04c86e30c9f488664ac880060460fe930e29fde2 Mon Sep 17 00:00:00 2001 From: Marek Wolan Date: Fri, 15 Mar 2024 11:15:02 +0000 Subject: [PATCH 014/124] Fix some stuff --- .../config/_package_data/data_manipulation.yaml | 10 ++++------ .../_package_data/data_manipulation_marl.yaml | 12 ++++++------ src/primaite/session/io.py | 2 +- src/primaite/simulator/network/hardware/base.py | 2 +- .../simulator/system/core/packet_capture.py | 15 +++++++++------ 5 files changed, 21 insertions(+), 20 deletions(-) diff --git a/src/primaite/config/_package_data/data_manipulation.yaml b/src/primaite/config/_package_data/data_manipulation.yaml index 748b0d77..c561030a 100644 --- a/src/primaite/config/_package_data/data_manipulation.yaml +++ b/src/primaite/config/_package_data/data_manipulation.yaml @@ -11,16 +11,14 @@ training_config: - defender io_settings: - save_checkpoints: true - checkpoint_interval: 5 save_agent_actions: true save_step_metadata: false save_pcap_logs: false - save_sys_logs: true + save_sys_logs: false game: - max_episode_length: 256 + max_episode_length: 128 ports: - HTTP - POSTGRES_SERVER @@ -323,7 +321,7 @@ agents: folder_id: 0 file_id: 0 10: - action: "NODE_FILE_CHECKHASH" + action: "NODE_FILE_SCAN" # CHECKHASH replaced by SCAN - but the behaviour is the same in this context. options: node_id: 2 folder_id: 0 @@ -351,7 +349,7 @@ agents: node_id: 2 folder_id: 0 15: - action: "NODE_FOLDER_CHECKHASH" + action: "NODE_FOLDER_SCAN" # CHECKHASH replaced by SCAN - but the behaviour is the same in this context. options: node_id: 2 folder_id: 0 diff --git a/src/primaite/config/_package_data/data_manipulation_marl.yaml b/src/primaite/config/_package_data/data_manipulation_marl.yaml index be53d2c5..e4c93161 100644 --- a/src/primaite/config/_package_data/data_manipulation_marl.yaml +++ b/src/primaite/config/_package_data/data_manipulation_marl.yaml @@ -4,7 +4,7 @@ training_config: seed: 333 n_learn_episodes: 1 n_eval_episodes: 5 - max_steps_per_episode: 256 + max_steps_per_episode: 128 deterministic_eval: false n_agents: 2 agent_references: @@ -22,7 +22,7 @@ io_settings: game: - max_episode_length: 256 + max_episode_length: 128 ports: - ARP - DNS @@ -325,7 +325,7 @@ agents: folder_id: 0 file_id: 0 10: - action: "NODE_FILE_CHECKHASH" + action: "NODE_FILE_SCAN" # CHECKHASH replaced by SCAN - but the behaviour is the same in this context. options: node_id: 2 folder_id: 0 @@ -353,7 +353,7 @@ agents: node_id: 2 folder_id: 0 15: - action: "NODE_FOLDER_CHECKHASH" + action: "NODE_FOLDER_SCAN" # CHECKHASH replaced by SCAN - but the behaviour is the same in this context. options: node_id: 2 folder_id: 0 @@ -876,7 +876,7 @@ agents: folder_id: 0 file_id: 0 10: - action: "NODE_FILE_CHECKHASH" + action: "NODE_FILE_SCAN" # CHECKHASH replaced by SCAN - but the behaviour is the same in this context. options: node_id: 2 folder_id: 0 @@ -904,7 +904,7 @@ agents: node_id: 2 folder_id: 0 15: - action: "NODE_FOLDER_CHECKHASH" + action: "NODE_FOLDER_SCAN" # CHECKHASH replaced by SCAN - but the behaviour is the same in this context. options: node_id: 2 folder_id: 0 diff --git a/src/primaite/session/io.py b/src/primaite/session/io.py index ef77c63d..e57f88ae 100644 --- a/src/primaite/session/io.py +++ b/src/primaite/session/io.py @@ -92,5 +92,5 @@ class PrimaiteIO: @classmethod def from_config(cls, config: Dict) -> "PrimaiteIO": """Create an instance of PrimaiteIO based on a configuration dict.""" - new = cls() + new = cls(settings=cls.Settings(**config)) return new diff --git a/src/primaite/simulator/network/hardware/base.py b/src/primaite/simulator/network/hardware/base.py index a91a709c..3d8640a6 100644 --- a/src/primaite/simulator/network/hardware/base.py +++ b/src/primaite/simulator/network/hardware/base.py @@ -108,7 +108,7 @@ class NetworkInterface(SimComponent, ABC): """Reset the original state of the SimComponent.""" super().setup_for_episode(episode=episode) self.nmne = {} - if episode and self.pcap: + if episode and self.pcap and SIM_OUTPUT.save_pcap_logs: self.pcap.current_episode = episode self.pcap.setup_logger() self.enable() diff --git a/src/primaite/simulator/system/core/packet_capture.py b/src/primaite/simulator/system/core/packet_capture.py index 4916966d..cf38e94b 100644 --- a/src/primaite/simulator/system/core/packet_capture.py +++ b/src/primaite/simulator/system/core/packet_capture.py @@ -49,8 +49,9 @@ class PacketCapture: self.current_episode: int = 1 - self.setup_logger(outbound=False) - self.setup_logger(outbound=True) + if SIM_OUTPUT.save_pcap_logs: + self.setup_logger(outbound=False) + self.setup_logger(outbound=True) def setup_logger(self, outbound: bool = False): """Set up the logger configuration.""" @@ -108,8 +109,9 @@ class PacketCapture: :param frame: The PCAP frame to capture. """ - msg = frame.model_dump_json() - self.inbound_logger.log(level=60, msg=msg) # Log at custom log level > CRITICAL + if SIM_OUTPUT.save_pcap_logs: + msg = frame.model_dump_json() + self.inbound_logger.log(level=60, msg=msg) # Log at custom log level > CRITICAL def capture_outbound(self, frame): # noqa - I'll have a circular import and cant use if TYPE_CHECKING ;( """ @@ -117,5 +119,6 @@ class PacketCapture: :param frame: The PCAP frame to capture. """ - msg = frame.model_dump_json() - self.outbound_logger.log(level=60, msg=msg) # Log at custom log level > CRITICAL + if SIM_OUTPUT.save_pcap_logs: + msg = frame.model_dump_json() + self.outbound_logger.log(level=60, msg=msg) # Log at custom log level > CRITICAL From e0eef8e56edba45a3b17df895a52a58d41b673e5 Mon Sep 17 00:00:00 2001 From: Marek Wolan Date: Fri, 15 Mar 2024 12:19:56 +0000 Subject: [PATCH 015/124] Fix tests --- tests/assets/configs/shared_rewards.yaml | 6 ++---- tests/assets/configs/test_primaite_session.yaml | 7 +++++-- tests/e2e_integration_tests/test_primaite_session.py | 1 + 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/tests/assets/configs/shared_rewards.yaml b/tests/assets/configs/shared_rewards.yaml index 91ff20e7..daffa585 100644 --- a/tests/assets/configs/shared_rewards.yaml +++ b/tests/assets/configs/shared_rewards.yaml @@ -11,12 +11,10 @@ training_config: - defender io_settings: - save_checkpoints: true - checkpoint_interval: 5 - save_agent_actions: true + save_agent_actions: false save_step_metadata: false save_pcap_logs: false - save_sys_logs: true + save_sys_logs: false game: diff --git a/tests/assets/configs/test_primaite_session.yaml b/tests/assets/configs/test_primaite_session.yaml index 199cf8cc..121cc7f1 100644 --- a/tests/assets/configs/test_primaite_session.yaml +++ b/tests/assets/configs/test_primaite_session.yaml @@ -11,8 +11,11 @@ training_config: - defender io_settings: - save_checkpoints: true - checkpoint_interval: 5 + save_agent_actions: true + save_step_metadata: true + save_pcap_logs: true + save_sys_logs: true + game: diff --git a/tests/e2e_integration_tests/test_primaite_session.py b/tests/e2e_integration_tests/test_primaite_session.py index da13dcd8..c45a4690 100644 --- a/tests/e2e_integration_tests/test_primaite_session.py +++ b/tests/e2e_integration_tests/test_primaite_session.py @@ -31,6 +31,7 @@ class TestPrimaiteSession: assert session.env.game.simulation.network assert len(session.env.game.simulation.network.nodes) == 10 + @pytest.mark.skip(reason="Session is not being maintained and will be removed in the subsequent beta release.") @pytest.mark.parametrize("temp_primaite_session", [[CFG_PATH]], indirect=True) def test_start_session(self, temp_primaite_session): """Make sure you can go all the way through the session without errors.""" From 1ed2f48f54cb8feb1477b7426c6dc1a3731d6a53 Mon Sep 17 00:00:00 2001 From: Czar Echavez Date: Fri, 15 Mar 2024 13:13:54 +0000 Subject: [PATCH 016/124] #2369: missed items --- docs/source/example_notebooks.rst | 6 +++++- docs/source/getting_started.rst | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/docs/source/example_notebooks.rst b/docs/source/example_notebooks.rst index 1ea94249..e0c4169f 100644 --- a/docs/source/example_notebooks.rst +++ b/docs/source/example_notebooks.rst @@ -5,7 +5,7 @@ Example Jupyter Notebooks ========================= -There are a few example notebooks included which helps with the understanding of PrimAITE's capabilities. +There are a few example notebooks included which help with the understanding of PrimAITE's capabilities. The Jupyter Notebooks can be run via the 2 examples below. These assume that the instructions to install PrimAITE from the :ref:`Getting Started ` page is completed as a prerequisite. @@ -57,6 +57,8 @@ Running Jupyter Notebooks via VSCode It is also possible to view the Jupyter notebooks within VSCode. +The best place to start is by opening a notebook file (.ipynb) in VSCode. If using VSCode to view a notebook for the first time, follow the steps below. + Installing extensions """"""""""""""""""""" @@ -77,3 +79,5 @@ The following extensions should now be installed :align: center VSCode will then ask for a Python environment version to use. PrimAITE is compatible with Python versions 3.8 - 3.10 + +You should now be able to interact with the notebook. diff --git a/docs/source/getting_started.rst b/docs/source/getting_started.rst index 7a23e4f8..91db4693 100644 --- a/docs/source/getting_started.rst +++ b/docs/source/getting_started.rst @@ -57,7 +57,7 @@ Install PrimAITE .. code-block:: powershell :caption: Windows (Powershell) - cd ~\primaite\3.0.0 + cd ~\primaite\{VERSION} python3 -m venv .venv attrib +h .venv /s /d # Hides the .venv directory From 2fde07178930d3dd9b8cb2d5c01d03beea7ac8a2 Mon Sep 17 00:00:00 2001 From: Marek Wolan Date: Fri, 15 Mar 2024 13:25:50 +0000 Subject: [PATCH 017/124] Update docs on example notebooks --- docs/source/example_notebooks.rst | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/docs/source/example_notebooks.rst b/docs/source/example_notebooks.rst index 1ea94249..3bf14bcb 100644 --- a/docs/source/example_notebooks.rst +++ b/docs/source/example_notebooks.rst @@ -5,7 +5,7 @@ Example Jupyter Notebooks ========================= -There are a few example notebooks included which helps with the understanding of PrimAITE's capabilities. +There are a few example notebooks included which help with the understanding of PrimAITE's capabilities. The Jupyter Notebooks can be run via the 2 examples below. These assume that the instructions to install PrimAITE from the :ref:`Getting Started ` page is completed as a prerequisite. @@ -24,7 +24,7 @@ Running Jupyter Notebooks cd ~\primaite\{VERSION} -2. Run jupyter notebook +2. Run jupyter notebook (the python environment to which you installed PrimAITE must be active) .. code-block:: bash :caption: Unix @@ -38,19 +38,13 @@ Running Jupyter Notebooks 3. Opening the jupyter webpage (optional) -The default web browser may automatically open the webpage. However, if that is not the case, open a web browser and navigate to |jupyter_index|. +The default web browser may automatically open the webpage. However, if that is not the case, click the link shown in your command prompt output. It should look like this: ``http://localhost:8888/?token=ab83071fd13cb5a1384efba318...`` -.. |jupyter_index| raw:: html - - http://localhost:8888/tree 4. Navigate to the list of notebooks -The example notebooks are located in notebooks/example_notebooks or by navigating to |jupyter_index_notebooks| +The example notebooks are located in ``notebooks/example_notebooks/``. The file system shown in the jupyter webpage is relative to the location in which the ``jupyter notebook`` command was used. -.. |jupyter_index_notebooks| raw:: html - - http://localhost:8888/tree/notebooks/example_notebooks Running Jupyter Notebooks via VSCode ------------------------------------ From d9b65065728d41548851a5ed011240a4e5148610 Mon Sep 17 00:00:00 2001 From: Marek Wolan Date: Fri, 15 Mar 2024 13:42:59 +0000 Subject: [PATCH 018/124] Mention python version in getting started guide. --- docs/source/getting_started.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/source/getting_started.rst b/docs/source/getting_started.rst index 91db4693..bb6e0019 100644 --- a/docs/source/getting_started.rst +++ b/docs/source/getting_started.rst @@ -11,7 +11,7 @@ Getting Started Pre-Requisites -In order to get **PrimAITE** installed, you will need to have a python version between 3.8 and 3.11 installed. If you don't already have it, this is how to install it: +In order to get **PrimAITE** installed, you will need Python, venv, and pip. If you don't already have them, this is how to install it: .. code-block:: bash @@ -30,6 +30,8 @@ In order to get **PrimAITE** installed, you will need to have a python version b **PrimAITE** is designed to be OS-agnostic, and thus should work on most variations/distros of Linux, Windows, and MacOS. +Installing PrimAITE has been tested with all supported python versions, venv 20.24.1, and pip 23. + Install PrimAITE **************** From 6f780f20d7316c91a845ead049530fd8977f00b1 Mon Sep 17 00:00:00 2001 From: Nick Todd Date: Fri, 15 Mar 2024 13:55:00 +0000 Subject: [PATCH 019/124] 2384: Updates for 3.0.0b7 release. --- CHANGELOG.md | 40 +++++++++++++++++++++++----------------- 1 file changed, 23 insertions(+), 17 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ae40a36f..c01f0139 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,27 +12,30 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Changed the red agent in the data manipulation scenario to randomly choose client 1 or client 2 to start its attack. - Changed the data manipulation scenario to include a second green agent on client 1. - Refactored actions and observations to be configurable via object name, instead of UUID. -- Fixed a bug where ACL rules were not resetting on episode reset. -- Fixed a bug where blue agent's ACL actions were being applied against the wrong IP addresses -- Fixed a bug where deleted files and folders did not reset correctly on episode reset. -- Fixed a bug where service health status was using the actual health state instead of the visible health state -- Fixed a bug where the database file health status was using the incorrect value for negative rewards -- Fixed a bug preventing file actions from reaching their intended file - Made database patch correctly take 2 timesteps instead of being immediate - Made database patch only possible when the software is compromised or good, it's no longer possible when the software is OFF or RESETTING -- Temporarily disable the blue agent file delete action due to crashes. This issue is resolved in another branch that will be merged into dev soon. -- Fix a bug where ACLs were not showing up correctly in the observation space. - Added a notebook which explains Data manipulation scenario, demonstrates the attack, and shows off blue agent's action space, observation space, and reward function. - Made packet capture and system logging optional (off by default). To turn on, change the io_settings.save_pcap_logs and io_settings.save_sys_logs settings in the config. -- Made observation space flattening optional (on by default). To turn off for an agent, change the agent_settings.flatten_obs setting in the config. -- Fixed an issue where the data manipulation attack was triggered at episode start. -- Fixed a bug where FTP STOR stored an additional copy on the client machine's filesystem -- Fixed a bug where the red agent acted to early -- Fixed the order of service health state -- Fixed an issue where starting a node didn't start the services on it +- Made observation space flattening optional (on by default). To turn off for an agent, change the `agent_settings.flatten_obs` setting in the config. - Added support for SQL INSERT command. - Added ability to log each agent's action choices in each step to a JSON file. +### Bug Fixes + +- ACL rules were not resetting on episode reset. +- ACLs were not showing up correctly in the observation space. +- Blue agent's ACL actions were being applied against the wrong IP addresses +- Deleted files and folders did not reset correctly on episode reset. +- Service health status was using the actual health state instead of the visible health state +- Database file health status was using the incorrect value for negative rewards +- Preventing file actions from reaching their intended file +- The data manipulation attack was triggered at episode start. +- FTP STOR stored an additional copy on the client machine's filesystem +- The red agent acted to early +- Order of service health state +- Starting a node didn't start the services on it +- Fixed an issue where the services were still able to run even though the node the service is installed on is turned off + ### Added @@ -51,8 +54,12 @@ a Service/Application another machine. SessionManager. - Permission System - each action can define criteria that will be used to permit or deny agent actions. - File System - ability to emulate a node's file system during a simulation -- Example notebooks - There is currently 1 jupyter notebook which walks through using PrimAITE - 1. Creating a simulation - this notebook explains how to build up a simulation using the Python package. (WIP) +- Example notebooks - There are 5 jupyter notebook which walk through using PrimAITE + 1. Training a Stable Baselines 3 agent + 2. Training a single agent system using Ray RLLib + 3. Training a multi-agent system Ray RLLib + 4. Data manipulation end to end demonstration + 5. Data manipulation scenario with customised red agents - Database: - `DatabaseClient` and `DatabaseService` created to allow emulation of database actions - Ability for `DatabaseService` to backup its data to another server via FTP and restore data from backup @@ -62,7 +69,6 @@ SessionManager. - DNS Services: `DNSClient` and `DNSServer` - FTP Services: `FTPClient` and `FTPServer` - HTTP Services: `WebBrowser` to simulate a web client and `WebServer` -- Fixed an issue where the services were still able to run even though the node the service is installed on is turned off - NTP Services: `NTPClient` and `NTPServer` - **RouterNIC Class**: Introduced a new class `RouterNIC`, extending the standard `NIC` functionality. This class is specifically designed for router operations, optimizing the processing and routing of network traffic. - **Custom Layer-3 Processing**: The `RouterNIC` class includes custom handling for network frames, bypassing standard Node NIC's Layer 3 broadcast/unicast checks. This allows for more efficient routing behavior in network scenarios where router-specific frame processing is required. From 33dd6e4dcd742a4cde0d2a9ec2319861850a7aa8 Mon Sep 17 00:00:00 2001 From: Marek Wolan Date: Fri, 15 Mar 2024 14:03:37 +0000 Subject: [PATCH 020/124] Make sure notebook is using correct dict key --- .../Data-Manipulation-E2E-Demonstration.ipynb | 501 +++++++++++++++++- 1 file changed, 475 insertions(+), 26 deletions(-) diff --git a/src/primaite/notebooks/Data-Manipulation-E2E-Demonstration.ipynb b/src/primaite/notebooks/Data-Manipulation-E2E-Demonstration.ipynb index 946202b6..93e1f27f 100644 --- a/src/primaite/notebooks/Data-Manipulation-E2E-Demonstration.ipynb +++ b/src/primaite/notebooks/Data-Manipulation-E2E-Demonstration.ipynb @@ -352,7 +352,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 1, "metadata": { "tags": [] }, @@ -364,7 +364,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 2, "metadata": { "tags": [] }, @@ -389,9 +389,154 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 3, "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "env created successfully\n", + "{'ACL': {1: {'dest_node_id': 0,\n", + " 'dest_port': 0,\n", + " 'permission': 0,\n", + " 'position': 0,\n", + " 'protocol': 0,\n", + " 'source_node_id': 0,\n", + " 'source_port': 0},\n", + " 2: {'dest_node_id': 0,\n", + " 'dest_port': 0,\n", + " 'permission': 0,\n", + " 'position': 1,\n", + " 'protocol': 0,\n", + " 'source_node_id': 0,\n", + " 'source_port': 0},\n", + " 3: {'dest_node_id': 0,\n", + " 'dest_port': 0,\n", + " 'permission': 0,\n", + " 'position': 2,\n", + " 'protocol': 0,\n", + " 'source_node_id': 0,\n", + " 'source_port': 0},\n", + " 4: {'dest_node_id': 0,\n", + " 'dest_port': 0,\n", + " 'permission': 0,\n", + " 'position': 3,\n", + " 'protocol': 0,\n", + " 'source_node_id': 0,\n", + " 'source_port': 0},\n", + " 5: {'dest_node_id': 0,\n", + " 'dest_port': 0,\n", + " 'permission': 0,\n", + " 'position': 4,\n", + " 'protocol': 0,\n", + " 'source_node_id': 0,\n", + " 'source_port': 0},\n", + " 6: {'dest_node_id': 0,\n", + " 'dest_port': 0,\n", + " 'permission': 0,\n", + " 'position': 5,\n", + " 'protocol': 0,\n", + " 'source_node_id': 0,\n", + " 'source_port': 0},\n", + " 7: {'dest_node_id': 0,\n", + " 'dest_port': 0,\n", + " 'permission': 0,\n", + " 'position': 6,\n", + " 'protocol': 0,\n", + " 'source_node_id': 0,\n", + " 'source_port': 0},\n", + " 8: {'dest_node_id': 0,\n", + " 'dest_port': 0,\n", + " 'permission': 0,\n", + " 'position': 7,\n", + " 'protocol': 0,\n", + " 'source_node_id': 0,\n", + " 'source_port': 0},\n", + " 9: {'dest_node_id': 0,\n", + " 'dest_port': 0,\n", + " 'permission': 0,\n", + " 'position': 8,\n", + " 'protocol': 0,\n", + " 'source_node_id': 0,\n", + " 'source_port': 0},\n", + " 10: {'dest_node_id': 0,\n", + " 'dest_port': 0,\n", + " 'permission': 0,\n", + " 'position': 9,\n", + " 'protocol': 0,\n", + " 'source_node_id': 0,\n", + " 'source_port': 0}},\n", + " 'ICS': 0,\n", + " 'LINKS': {1: {'PROTOCOLS': {'ALL': 1}},\n", + " 2: {'PROTOCOLS': {'ALL': 1}},\n", + " 3: {'PROTOCOLS': {'ALL': 1}},\n", + " 4: {'PROTOCOLS': {'ALL': 1}},\n", + " 5: {'PROTOCOLS': {'ALL': 1}},\n", + " 6: {'PROTOCOLS': {'ALL': 1}},\n", + " 7: {'PROTOCOLS': {'ALL': 1}},\n", + " 8: {'PROTOCOLS': {'ALL': 1}},\n", + " 9: {'PROTOCOLS': {'ALL': 1}},\n", + " 10: {'PROTOCOLS': {'ALL': 0}}},\n", + " 'NODES': {1: {'FOLDERS': {1: {'FILES': {1: {'health_status': 0}},\n", + " 'health_status': 0}},\n", + " 'NICS': {1: {'NMNE': {'inbound': 0, 'outbound': 0},\n", + " 'nic_status': 1},\n", + " 2: {'NMNE': {'inbound': 0, 'outbound': 0},\n", + " 'nic_status': 0}},\n", + " 'SERVICES': {1: {'health_status': 0, 'operating_status': 1}},\n", + " 'operating_status': 1},\n", + " 2: {'FOLDERS': {1: {'FILES': {1: {'health_status': 0}},\n", + " 'health_status': 0}},\n", + " 'NICS': {1: {'NMNE': {'inbound': 0, 'outbound': 0},\n", + " 'nic_status': 1},\n", + " 2: {'NMNE': {'inbound': 0, 'outbound': 0},\n", + " 'nic_status': 0}},\n", + " 'SERVICES': {1: {'health_status': 0, 'operating_status': 1}},\n", + " 'operating_status': 1},\n", + " 3: {'FOLDERS': {1: {'FILES': {1: {'health_status': 1}},\n", + " 'health_status': 1}},\n", + " 'NICS': {1: {'NMNE': {'inbound': 0, 'outbound': 0},\n", + " 'nic_status': 1},\n", + " 2: {'NMNE': {'inbound': 0, 'outbound': 0},\n", + " 'nic_status': 0}},\n", + " 'SERVICES': {1: {'health_status': 0, 'operating_status': 0}},\n", + " 'operating_status': 1},\n", + " 4: {'FOLDERS': {1: {'FILES': {1: {'health_status': 0}},\n", + " 'health_status': 0}},\n", + " 'NICS': {1: {'NMNE': {'inbound': 0, 'outbound': 0},\n", + " 'nic_status': 1},\n", + " 2: {'NMNE': {'inbound': 0, 'outbound': 0},\n", + " 'nic_status': 0}},\n", + " 'SERVICES': {1: {'health_status': 0, 'operating_status': 0}},\n", + " 'operating_status': 1},\n", + " 5: {'FOLDERS': {1: {'FILES': {1: {'health_status': 0}},\n", + " 'health_status': 0}},\n", + " 'NICS': {1: {'NMNE': {'inbound': 0, 'outbound': 0},\n", + " 'nic_status': 1},\n", + " 2: {'NMNE': {'inbound': 0, 'outbound': 0},\n", + " 'nic_status': 0}},\n", + " 'SERVICES': {1: {'health_status': 0, 'operating_status': 0}},\n", + " 'operating_status': 1},\n", + " 6: {'FOLDERS': {1: {'FILES': {1: {'health_status': 0}},\n", + " 'health_status': 0}},\n", + " 'NICS': {1: {'NMNE': {'inbound': 0, 'outbound': 0},\n", + " 'nic_status': 1},\n", + " 2: {'NMNE': {'inbound': 0, 'outbound': 0},\n", + " 'nic_status': 0}},\n", + " 'SERVICES': {1: {'health_status': 0, 'operating_status': 0}},\n", + " 'operating_status': 1},\n", + " 7: {'FOLDERS': {1: {'FILES': {1: {'health_status': 0}},\n", + " 'health_status': 0}},\n", + " 'NICS': {1: {'NMNE': {'inbound': 0, 'outbound': 0},\n", + " 'nic_status': 1},\n", + " 2: {'NMNE': {'inbound': 0, 'outbound': 0},\n", + " 'nic_status': 0}},\n", + " 'SERVICES': {1: {'health_status': 0, 'operating_status': 0}},\n", + " 'operating_status': 1}}}\n" + ] + } + ], "source": [ "# create the env\n", "with open(data_manipulation_config_path(), 'r') as f:\n", @@ -419,7 +564,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 4, "metadata": {}, "outputs": [], "source": [ @@ -437,9 +582,51 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 5, "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "step: 1, Red action: DO NOTHING, Blue reward:0.90\n", + "step: 2, Red action: DO NOTHING, Blue reward:0.90\n", + "step: 3, Red action: DO NOTHING, Blue reward:0.90\n", + "step: 4, Red action: DO NOTHING, Blue reward:0.90\n", + "step: 5, Red action: DO NOTHING, Blue reward:0.90\n", + "step: 6, Red action: DO NOTHING, Blue reward:0.90\n", + "step: 7, Red action: DO NOTHING, Blue reward:0.90\n", + "step: 8, Red action: DO NOTHING, Blue reward:0.90\n", + "step: 9, Red action: DO NOTHING, Blue reward:0.90\n", + "step: 10, Red action: DO NOTHING, Blue reward:0.90\n", + "step: 11, Red action: DO NOTHING, Blue reward:0.90\n", + "step: 12, Red action: DO NOTHING, Blue reward:0.90\n", + "step: 13, Red action: DO NOTHING, Blue reward:0.90\n", + "step: 14, Red action: DO NOTHING, Blue reward:0.90\n", + "step: 15, Red action: DO NOTHING, Blue reward:0.90\n", + "step: 16, Red action: DO NOTHING, Blue reward:0.95\n", + "step: 17, Red action: DO NOTHING, Blue reward:0.95\n", + "step: 18, Red action: DO NOTHING, Blue reward:0.95\n", + "step: 19, Red action: DO NOTHING, Blue reward:0.95\n", + "step: 20, Red action: DO NOTHING, Blue reward:1.00\n", + "step: 21, Red action: DO NOTHING, Blue reward:1.00\n", + "step: 22, Red action: DO NOTHING, Blue reward:1.00\n", + "step: 23, Red action: DO NOTHING, Blue reward:1.00\n", + "step: 24, Red action: DO NOTHING, Blue reward:1.00\n", + "step: 25, Red action: DO NOTHING, Blue reward:1.00\n", + "step: 26, Red action: ATTACK from client 1, Blue reward:0.20\n", + "step: 27, Red action: DO NOTHING, Blue reward:-0.30\n", + "step: 28, Red action: DO NOTHING, Blue reward:-0.80\n", + "step: 29, Red action: DO NOTHING, Blue reward:-0.80\n", + "step: 30, Red action: DO NOTHING, Blue reward:-0.80\n", + "step: 31, Red action: DO NOTHING, Blue reward:-0.80\n", + "step: 32, Red action: DO NOTHING, Blue reward:-0.80\n", + "step: 33, Red action: DO NOTHING, Blue reward:-0.80\n", + "step: 34, Red action: DO NOTHING, Blue reward:-0.80\n", + "step: 35, Red action: DO NOTHING, Blue reward:-0.80\n" + ] + } + ], "source": [ "for step in range(35):\n", " obs, reward, terminated, truncated, info = env.step(0)\n", @@ -455,9 +642,51 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 6, "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{1: {'FOLDERS': {1: {'FILES': {1: {'health_status': 0}}, 'health_status': 0}},\n", + " 'NICS': {1: {'NMNE': {'inbound': 0, 'outbound': 0}, 'nic_status': 1},\n", + " 2: {'NMNE': {'inbound': 0, 'outbound': 0}, 'nic_status': 0}},\n", + " 'SERVICES': {1: {'health_status': 0, 'operating_status': 1}},\n", + " 'operating_status': 1},\n", + " 2: {'FOLDERS': {1: {'FILES': {1: {'health_status': 0}}, 'health_status': 0}},\n", + " 'NICS': {1: {'NMNE': {'inbound': 0, 'outbound': 0}, 'nic_status': 1},\n", + " 2: {'NMNE': {'inbound': 0, 'outbound': 0}, 'nic_status': 0}},\n", + " 'SERVICES': {1: {'health_status': 0, 'operating_status': 1}},\n", + " 'operating_status': 1},\n", + " 3: {'FOLDERS': {1: {'FILES': {1: {'health_status': 1}}, 'health_status': 1}},\n", + " 'NICS': {1: {'NMNE': {'inbound': 0, 'outbound': 0}, 'nic_status': 1},\n", + " 2: {'NMNE': {'inbound': 0, 'outbound': 0}, 'nic_status': 0}},\n", + " 'SERVICES': {1: {'health_status': 0, 'operating_status': 0}},\n", + " 'operating_status': 1},\n", + " 4: {'FOLDERS': {1: {'FILES': {1: {'health_status': 0}}, 'health_status': 0}},\n", + " 'NICS': {1: {'NMNE': {'inbound': 0, 'outbound': 0}, 'nic_status': 1},\n", + " 2: {'NMNE': {'inbound': 0, 'outbound': 0}, 'nic_status': 0}},\n", + " 'SERVICES': {1: {'health_status': 0, 'operating_status': 0}},\n", + " 'operating_status': 1},\n", + " 5: {'FOLDERS': {1: {'FILES': {1: {'health_status': 0}}, 'health_status': 0}},\n", + " 'NICS': {1: {'NMNE': {'inbound': 0, 'outbound': 0}, 'nic_status': 1},\n", + " 2: {'NMNE': {'inbound': 0, 'outbound': 0}, 'nic_status': 0}},\n", + " 'SERVICES': {1: {'health_status': 0, 'operating_status': 0}},\n", + " 'operating_status': 1},\n", + " 6: {'FOLDERS': {1: {'FILES': {1: {'health_status': 0}}, 'health_status': 0}},\n", + " 'NICS': {1: {'NMNE': {'inbound': 0, 'outbound': 0}, 'nic_status': 1},\n", + " 2: {'NMNE': {'inbound': 0, 'outbound': 0}, 'nic_status': 0}},\n", + " 'SERVICES': {1: {'health_status': 0, 'operating_status': 0}},\n", + " 'operating_status': 1},\n", + " 7: {'FOLDERS': {1: {'FILES': {1: {'health_status': 0}}, 'health_status': 0}},\n", + " 'NICS': {1: {'NMNE': {'inbound': 0, 'outbound': 0}, 'nic_status': 1},\n", + " 2: {'NMNE': {'inbound': 0, 'outbound': 0}, 'nic_status': 0}},\n", + " 'SERVICES': {1: {'health_status': 0, 'operating_status': 0}},\n", + " 'operating_status': 1}}\n" + ] + } + ], "source": [ "pprint(obs['NODES'])" ] @@ -471,9 +700,51 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 7, "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{1: {'FOLDERS': {1: {'FILES': {1: {'health_status': 0}}, 'health_status': 0}},\n", + " 'NICS': {1: {'NMNE': {'inbound': 0, 'outbound': 0}, 'nic_status': 1},\n", + " 2: {'NMNE': {'inbound': 0, 'outbound': 0}, 'nic_status': 0}},\n", + " 'SERVICES': {1: {'health_status': 0, 'operating_status': 1}},\n", + " 'operating_status': 1},\n", + " 2: {'FOLDERS': {1: {'FILES': {1: {'health_status': 0}}, 'health_status': 0}},\n", + " 'NICS': {1: {'NMNE': {'inbound': 0, 'outbound': 0}, 'nic_status': 1},\n", + " 2: {'NMNE': {'inbound': 0, 'outbound': 0}, 'nic_status': 0}},\n", + " 'SERVICES': {1: {'health_status': 3, 'operating_status': 1}},\n", + " 'operating_status': 1},\n", + " 3: {'FOLDERS': {1: {'FILES': {1: {'health_status': 2}}, 'health_status': 1}},\n", + " 'NICS': {1: {'NMNE': {'inbound': 0, 'outbound': 0}, 'nic_status': 1},\n", + " 2: {'NMNE': {'inbound': 0, 'outbound': 0}, 'nic_status': 0}},\n", + " 'SERVICES': {1: {'health_status': 0, 'operating_status': 0}},\n", + " 'operating_status': 1},\n", + " 4: {'FOLDERS': {1: {'FILES': {1: {'health_status': 0}}, 'health_status': 0}},\n", + " 'NICS': {1: {'NMNE': {'inbound': 0, 'outbound': 0}, 'nic_status': 1},\n", + " 2: {'NMNE': {'inbound': 0, 'outbound': 0}, 'nic_status': 0}},\n", + " 'SERVICES': {1: {'health_status': 0, 'operating_status': 0}},\n", + " 'operating_status': 1},\n", + " 5: {'FOLDERS': {1: {'FILES': {1: {'health_status': 0}}, 'health_status': 0}},\n", + " 'NICS': {1: {'NMNE': {'inbound': 0, 'outbound': 0}, 'nic_status': 1},\n", + " 2: {'NMNE': {'inbound': 0, 'outbound': 0}, 'nic_status': 0}},\n", + " 'SERVICES': {1: {'health_status': 0, 'operating_status': 0}},\n", + " 'operating_status': 1},\n", + " 6: {'FOLDERS': {1: {'FILES': {1: {'health_status': 0}}, 'health_status': 0}},\n", + " 'NICS': {1: {'NMNE': {'inbound': 0, 'outbound': 0}, 'nic_status': 1},\n", + " 2: {'NMNE': {'inbound': 0, 'outbound': 0}, 'nic_status': 0}},\n", + " 'SERVICES': {1: {'health_status': 0, 'operating_status': 0}},\n", + " 'operating_status': 1},\n", + " 7: {'FOLDERS': {1: {'FILES': {1: {'health_status': 0}}, 'health_status': 0}},\n", + " 'NICS': {1: {'NMNE': {'inbound': 0, 'outbound': 0}, 'nic_status': 1},\n", + " 2: {'NMNE': {'inbound': 0, 'outbound': 0}, 'nic_status': 0}},\n", + " 'SERVICES': {1: {'health_status': 0, 'operating_status': 0}},\n", + " 'operating_status': 1}}\n" + ] + } + ], "source": [ "obs, reward, terminated, truncated, info = env.step(9) # scan database file\n", "obs, reward, terminated, truncated, info = env.step(1) # scan webapp service\n", @@ -504,9 +775,21 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 8, "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "step: 38\n", + "Red action: DONOTHING\n", + "Green action: NODE_APPLICATION_EXECUTE\n", + "Green action: NODE_APPLICATION_EXECUTE\n", + "Blue reward:-0.8\n" + ] + } + ], "source": [ "obs, reward, terminated, truncated, info = env.step(13) # patch the database\n", "print(f\"step: {env.game.step_counter}\")\n", @@ -529,9 +812,21 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 18, "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "step: 48\n", + "Red action: DONOTHING\n", + "Green action: timestep=47 action='NODE_APPLICATION_EXECUTE' parameters={'node_id': 0, 'application_id': 0} request=['network', 'node', 'client_2', 'application', 'WebBrowser', 'execute'] response=RequestResponse(status='failure', data={})\n", + "Green action: timestep=47 action='NODE_APPLICATION_EXECUTE' parameters={'node_id': 0, 'application_id': 0} request=['network', 'node', 'client_1', 'application', 'WebBrowser', 'execute'] response=RequestResponse(status='failure', data={})\n", + "Blue reward:-0.80\n" + ] + } + ], "source": [ "obs, reward, terminated, truncated, info = env.step(0) # do nothing\n", "print(f\"step: {env.game.step_counter}\")\n", @@ -552,9 +847,27 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 19, "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "step: 49, Red action: DONOTHING, Blue reward:-0.80\n", + "step: 50, Red action: DONOTHING, Blue reward:-0.80\n", + "step: 51, Red action: DONOTHING, Blue reward:-0.80\n", + "step: 52, Red action: DONOTHING, Blue reward:1.00\n", + "step: 53, Red action: DONOTHING, Blue reward:0.90\n", + "step: 54, Red action: DONOTHING, Blue reward:0.90\n", + "step: 55, Red action: DONOTHING, Blue reward:0.90\n", + "step: 56, Red action: DONOTHING, Blue reward:0.90\n", + "step: 57, Red action: DONOTHING, Blue reward:0.90\n", + "step: 58, Red action: DONOTHING, Blue reward:0.90\n", + "step: 59, Red action: DONOTHING, Blue reward:0.80\n" + ] + } + ], "source": [ "env.step(13) # Patch the database\n", "print(f\"step: {env.game.step_counter}, Red action: {info['agent_actions']['data_manipulation_attacker'].action}, Blue reward:{reward:.2f}\" )\n", @@ -576,7 +889,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "Now, even though the red agent executes an attack, the reward stays at 0.8." + "Now, even though the red agent executes an attack, the reward will stay at 0.8." ] }, { @@ -588,9 +901,89 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 20, "metadata": {}, - "outputs": [], + "outputs": [ + { + "data": { + "text/plain": [ + "{1: {'position': 0,\n", + " 'permission': 0,\n", + " 'source_node_id': 0,\n", + " 'source_port': 0,\n", + " 'dest_node_id': 0,\n", + " 'dest_port': 0,\n", + " 'protocol': 0},\n", + " 2: {'position': 1,\n", + " 'permission': 0,\n", + " 'source_node_id': 0,\n", + " 'source_port': 0,\n", + " 'dest_node_id': 0,\n", + " 'dest_port': 0,\n", + " 'protocol': 0},\n", + " 3: {'position': 2,\n", + " 'permission': 0,\n", + " 'source_node_id': 0,\n", + " 'source_port': 0,\n", + " 'dest_node_id': 0,\n", + " 'dest_port': 0,\n", + " 'protocol': 0},\n", + " 4: {'position': 3,\n", + " 'permission': 0,\n", + " 'source_node_id': 0,\n", + " 'source_port': 0,\n", + " 'dest_node_id': 0,\n", + " 'dest_port': 0,\n", + " 'protocol': 0},\n", + " 5: {'position': 4,\n", + " 'permission': 2,\n", + " 'source_node_id': 7,\n", + " 'source_port': 1,\n", + " 'dest_node_id': 4,\n", + " 'dest_port': 1,\n", + " 'protocol': 3},\n", + " 6: {'position': 5,\n", + " 'permission': 2,\n", + " 'source_node_id': 8,\n", + " 'source_port': 1,\n", + " 'dest_node_id': 4,\n", + " 'dest_port': 1,\n", + " 'protocol': 3},\n", + " 7: {'position': 6,\n", + " 'permission': 0,\n", + " 'source_node_id': 0,\n", + " 'source_port': 0,\n", + " 'dest_node_id': 0,\n", + " 'dest_port': 0,\n", + " 'protocol': 0},\n", + " 8: {'position': 7,\n", + " 'permission': 0,\n", + " 'source_node_id': 0,\n", + " 'source_port': 0,\n", + " 'dest_node_id': 0,\n", + " 'dest_port': 0,\n", + " 'protocol': 0},\n", + " 9: {'position': 8,\n", + " 'permission': 0,\n", + " 'source_node_id': 0,\n", + " 'source_port': 0,\n", + " 'dest_node_id': 0,\n", + " 'dest_port': 0,\n", + " 'protocol': 0},\n", + " 10: {'position': 9,\n", + " 'permission': 0,\n", + " 'source_node_id': 0,\n", + " 'source_port': 0,\n", + " 'dest_node_id': 0,\n", + " 'dest_port': 0,\n", + " 'protocol': 0}}" + ] + }, + "execution_count": 20, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ "obs['ACL']" ] @@ -604,9 +997,18 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 23, "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "blocking client 1\n", + "\n" + ] + } + ], "source": [ "env.step(58) # Remove the ACL rule that blocks client 1\n", "env.step(57) # Remove the ACL rule that blocks client 2\n", @@ -616,12 +1018,12 @@ " tries += 1\n", " obs, reward, terminated, truncated, info = env.step(0)\n", "\n", - " if obs['NODES'][6]['NETWORK_INTERFACES'][1]['nmne']['outbound'] == 1:\n", + " if obs['NODES'][6]['NICS'][1]['NMNE']['outbound'] == 1:\n", " # client 1 has NMNEs, let's block it\n", " obs, reward, terminated, truncated, info = env.step(50) # block client 1\n", " print(\"blocking client 1\")\n", " break\n", - " elif obs['NODES'][7]['NETWORK_INTERFACES'][1]['nmne']['outbound'] == 1:\n", + " elif obs['NODES'][7]['NICS'][1]['NMNE']['outbound'] == 1:\n", " # client 2 has NMNEs, so let's block it\n", " obs, reward, terminated, truncated, info = env.step(51) # block client 2\n", " print(\"blocking client 2\")\n", @@ -643,9 +1045,56 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 24, "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "step: 90, Red action: DONOTHING, Blue reward:0.00\n", + "step: 91, Red action: DONOTHING, Blue reward:1.00\n", + "step: 92, Red action: DONOTHING, Blue reward:1.00\n", + "step: 93, Red action: DONOTHING, Blue reward:1.00\n", + "step: 94, Red action: DONOTHING, Blue reward:1.00\n", + "step: 95, Red action: DONOTHING, Blue reward:1.00\n", + "step: 96, Red action: DONOTHING, Blue reward:0.90\n", + "step: 97, Red action: DONOTHING, Blue reward:0.90\n", + "step: 98, Red action: DONOTHING, Blue reward:0.90\n", + "step: 99, Red action: DONOTHING, Blue reward:0.90\n", + "step: 100, Red action: DONOTHING, Blue reward:0.90\n", + "step: 101, Red action: DONOTHING, Blue reward:0.90\n", + "step: 102, Red action: DONOTHING, Blue reward:0.90\n", + "step: 103, Red action: DONOTHING, Blue reward:0.90\n", + "step: 104, Red action: DONOTHING, Blue reward:0.90\n", + "step: 105, Red action: DONOTHING, Blue reward:0.90\n", + "step: 106, Red action: NODE_APPLICATION_EXECUTE, Blue reward:0.90\n", + "step: 107, Red action: DONOTHING, Blue reward:0.90\n", + "step: 108, Red action: DONOTHING, Blue reward:0.90\n", + "step: 109, Red action: DONOTHING, Blue reward:0.90\n", + "step: 110, Red action: DONOTHING, Blue reward:0.90\n", + "step: 111, Red action: DONOTHING, Blue reward:0.90\n", + "step: 112, Red action: DONOTHING, Blue reward:0.90\n", + "step: 113, Red action: DONOTHING, Blue reward:0.90\n", + "step: 114, Red action: DONOTHING, Blue reward:0.90\n", + "step: 115, Red action: DONOTHING, Blue reward:0.90\n", + "step: 116, Red action: DONOTHING, Blue reward:0.90\n", + "step: 117, Red action: DONOTHING, Blue reward:0.90\n", + "step: 118, Red action: DONOTHING, Blue reward:0.90\n", + "step: 119, Red action: DONOTHING, Blue reward:0.90\n", + "step: 120, Red action: DONOTHING, Blue reward:0.90\n", + "step: 121, Red action: DONOTHING, Blue reward:0.90\n", + "step: 122, Red action: DONOTHING, Blue reward:0.90\n", + "step: 123, Red action: DONOTHING, Blue reward:0.90\n", + "step: 124, Red action: DONOTHING, Blue reward:0.90\n", + "step: 125, Red action: DONOTHING, Blue reward:0.90\n", + "step: 126, Red action: DONOTHING, Blue reward:0.90\n", + "step: 127, Red action: DONOTHING, Blue reward:0.90\n", + "step: 128, Red action: NODE_APPLICATION_EXECUTE, Blue reward:0.90\n", + "step: 129, Red action: DONOTHING, Blue reward:0.90\n" + ] + } + ], "source": [ "\n", "for step in range(40):\n", From c8beb39facc2ae5ae364c002efb08d44095c78f2 Mon Sep 17 00:00:00 2001 From: Marek Wolan Date: Fri, 15 Mar 2024 14:03:49 +0000 Subject: [PATCH 021/124] clear notebook output --- .../Data-Manipulation-E2E-Demonstration.ipynb | 495 +----------------- 1 file changed, 23 insertions(+), 472 deletions(-) diff --git a/src/primaite/notebooks/Data-Manipulation-E2E-Demonstration.ipynb b/src/primaite/notebooks/Data-Manipulation-E2E-Demonstration.ipynb index 93e1f27f..7ec58b2c 100644 --- a/src/primaite/notebooks/Data-Manipulation-E2E-Demonstration.ipynb +++ b/src/primaite/notebooks/Data-Manipulation-E2E-Demonstration.ipynb @@ -352,7 +352,7 @@ }, { "cell_type": "code", - "execution_count": 1, + "execution_count": null, "metadata": { "tags": [] }, @@ -364,7 +364,7 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": null, "metadata": { "tags": [] }, @@ -389,154 +389,9 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "env created successfully\n", - "{'ACL': {1: {'dest_node_id': 0,\n", - " 'dest_port': 0,\n", - " 'permission': 0,\n", - " 'position': 0,\n", - " 'protocol': 0,\n", - " 'source_node_id': 0,\n", - " 'source_port': 0},\n", - " 2: {'dest_node_id': 0,\n", - " 'dest_port': 0,\n", - " 'permission': 0,\n", - " 'position': 1,\n", - " 'protocol': 0,\n", - " 'source_node_id': 0,\n", - " 'source_port': 0},\n", - " 3: {'dest_node_id': 0,\n", - " 'dest_port': 0,\n", - " 'permission': 0,\n", - " 'position': 2,\n", - " 'protocol': 0,\n", - " 'source_node_id': 0,\n", - " 'source_port': 0},\n", - " 4: {'dest_node_id': 0,\n", - " 'dest_port': 0,\n", - " 'permission': 0,\n", - " 'position': 3,\n", - " 'protocol': 0,\n", - " 'source_node_id': 0,\n", - " 'source_port': 0},\n", - " 5: {'dest_node_id': 0,\n", - " 'dest_port': 0,\n", - " 'permission': 0,\n", - " 'position': 4,\n", - " 'protocol': 0,\n", - " 'source_node_id': 0,\n", - " 'source_port': 0},\n", - " 6: {'dest_node_id': 0,\n", - " 'dest_port': 0,\n", - " 'permission': 0,\n", - " 'position': 5,\n", - " 'protocol': 0,\n", - " 'source_node_id': 0,\n", - " 'source_port': 0},\n", - " 7: {'dest_node_id': 0,\n", - " 'dest_port': 0,\n", - " 'permission': 0,\n", - " 'position': 6,\n", - " 'protocol': 0,\n", - " 'source_node_id': 0,\n", - " 'source_port': 0},\n", - " 8: {'dest_node_id': 0,\n", - " 'dest_port': 0,\n", - " 'permission': 0,\n", - " 'position': 7,\n", - " 'protocol': 0,\n", - " 'source_node_id': 0,\n", - " 'source_port': 0},\n", - " 9: {'dest_node_id': 0,\n", - " 'dest_port': 0,\n", - " 'permission': 0,\n", - " 'position': 8,\n", - " 'protocol': 0,\n", - " 'source_node_id': 0,\n", - " 'source_port': 0},\n", - " 10: {'dest_node_id': 0,\n", - " 'dest_port': 0,\n", - " 'permission': 0,\n", - " 'position': 9,\n", - " 'protocol': 0,\n", - " 'source_node_id': 0,\n", - " 'source_port': 0}},\n", - " 'ICS': 0,\n", - " 'LINKS': {1: {'PROTOCOLS': {'ALL': 1}},\n", - " 2: {'PROTOCOLS': {'ALL': 1}},\n", - " 3: {'PROTOCOLS': {'ALL': 1}},\n", - " 4: {'PROTOCOLS': {'ALL': 1}},\n", - " 5: {'PROTOCOLS': {'ALL': 1}},\n", - " 6: {'PROTOCOLS': {'ALL': 1}},\n", - " 7: {'PROTOCOLS': {'ALL': 1}},\n", - " 8: {'PROTOCOLS': {'ALL': 1}},\n", - " 9: {'PROTOCOLS': {'ALL': 1}},\n", - " 10: {'PROTOCOLS': {'ALL': 0}}},\n", - " 'NODES': {1: {'FOLDERS': {1: {'FILES': {1: {'health_status': 0}},\n", - " 'health_status': 0}},\n", - " 'NICS': {1: {'NMNE': {'inbound': 0, 'outbound': 0},\n", - " 'nic_status': 1},\n", - " 2: {'NMNE': {'inbound': 0, 'outbound': 0},\n", - " 'nic_status': 0}},\n", - " 'SERVICES': {1: {'health_status': 0, 'operating_status': 1}},\n", - " 'operating_status': 1},\n", - " 2: {'FOLDERS': {1: {'FILES': {1: {'health_status': 0}},\n", - " 'health_status': 0}},\n", - " 'NICS': {1: {'NMNE': {'inbound': 0, 'outbound': 0},\n", - " 'nic_status': 1},\n", - " 2: {'NMNE': {'inbound': 0, 'outbound': 0},\n", - " 'nic_status': 0}},\n", - " 'SERVICES': {1: {'health_status': 0, 'operating_status': 1}},\n", - " 'operating_status': 1},\n", - " 3: {'FOLDERS': {1: {'FILES': {1: {'health_status': 1}},\n", - " 'health_status': 1}},\n", - " 'NICS': {1: {'NMNE': {'inbound': 0, 'outbound': 0},\n", - " 'nic_status': 1},\n", - " 2: {'NMNE': {'inbound': 0, 'outbound': 0},\n", - " 'nic_status': 0}},\n", - " 'SERVICES': {1: {'health_status': 0, 'operating_status': 0}},\n", - " 'operating_status': 1},\n", - " 4: {'FOLDERS': {1: {'FILES': {1: {'health_status': 0}},\n", - " 'health_status': 0}},\n", - " 'NICS': {1: {'NMNE': {'inbound': 0, 'outbound': 0},\n", - " 'nic_status': 1},\n", - " 2: {'NMNE': {'inbound': 0, 'outbound': 0},\n", - " 'nic_status': 0}},\n", - " 'SERVICES': {1: {'health_status': 0, 'operating_status': 0}},\n", - " 'operating_status': 1},\n", - " 5: {'FOLDERS': {1: {'FILES': {1: {'health_status': 0}},\n", - " 'health_status': 0}},\n", - " 'NICS': {1: {'NMNE': {'inbound': 0, 'outbound': 0},\n", - " 'nic_status': 1},\n", - " 2: {'NMNE': {'inbound': 0, 'outbound': 0},\n", - " 'nic_status': 0}},\n", - " 'SERVICES': {1: {'health_status': 0, 'operating_status': 0}},\n", - " 'operating_status': 1},\n", - " 6: {'FOLDERS': {1: {'FILES': {1: {'health_status': 0}},\n", - " 'health_status': 0}},\n", - " 'NICS': {1: {'NMNE': {'inbound': 0, 'outbound': 0},\n", - " 'nic_status': 1},\n", - " 2: {'NMNE': {'inbound': 0, 'outbound': 0},\n", - " 'nic_status': 0}},\n", - " 'SERVICES': {1: {'health_status': 0, 'operating_status': 0}},\n", - " 'operating_status': 1},\n", - " 7: {'FOLDERS': {1: {'FILES': {1: {'health_status': 0}},\n", - " 'health_status': 0}},\n", - " 'NICS': {1: {'NMNE': {'inbound': 0, 'outbound': 0},\n", - " 'nic_status': 1},\n", - " 2: {'NMNE': {'inbound': 0, 'outbound': 0},\n", - " 'nic_status': 0}},\n", - " 'SERVICES': {1: {'health_status': 0, 'operating_status': 0}},\n", - " 'operating_status': 1}}}\n" - ] - } - ], + "outputs": [], "source": [ "# create the env\n", "with open(data_manipulation_config_path(), 'r') as f:\n", @@ -564,7 +419,7 @@ }, { "cell_type": "code", - "execution_count": 4, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -582,51 +437,9 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "step: 1, Red action: DO NOTHING, Blue reward:0.90\n", - "step: 2, Red action: DO NOTHING, Blue reward:0.90\n", - "step: 3, Red action: DO NOTHING, Blue reward:0.90\n", - "step: 4, Red action: DO NOTHING, Blue reward:0.90\n", - "step: 5, Red action: DO NOTHING, Blue reward:0.90\n", - "step: 6, Red action: DO NOTHING, Blue reward:0.90\n", - "step: 7, Red action: DO NOTHING, Blue reward:0.90\n", - "step: 8, Red action: DO NOTHING, Blue reward:0.90\n", - "step: 9, Red action: DO NOTHING, Blue reward:0.90\n", - "step: 10, Red action: DO NOTHING, Blue reward:0.90\n", - "step: 11, Red action: DO NOTHING, Blue reward:0.90\n", - "step: 12, Red action: DO NOTHING, Blue reward:0.90\n", - "step: 13, Red action: DO NOTHING, Blue reward:0.90\n", - "step: 14, Red action: DO NOTHING, Blue reward:0.90\n", - "step: 15, Red action: DO NOTHING, Blue reward:0.90\n", - "step: 16, Red action: DO NOTHING, Blue reward:0.95\n", - "step: 17, Red action: DO NOTHING, Blue reward:0.95\n", - "step: 18, Red action: DO NOTHING, Blue reward:0.95\n", - "step: 19, Red action: DO NOTHING, Blue reward:0.95\n", - "step: 20, Red action: DO NOTHING, Blue reward:1.00\n", - "step: 21, Red action: DO NOTHING, Blue reward:1.00\n", - "step: 22, Red action: DO NOTHING, Blue reward:1.00\n", - "step: 23, Red action: DO NOTHING, Blue reward:1.00\n", - "step: 24, Red action: DO NOTHING, Blue reward:1.00\n", - "step: 25, Red action: DO NOTHING, Blue reward:1.00\n", - "step: 26, Red action: ATTACK from client 1, Blue reward:0.20\n", - "step: 27, Red action: DO NOTHING, Blue reward:-0.30\n", - "step: 28, Red action: DO NOTHING, Blue reward:-0.80\n", - "step: 29, Red action: DO NOTHING, Blue reward:-0.80\n", - "step: 30, Red action: DO NOTHING, Blue reward:-0.80\n", - "step: 31, Red action: DO NOTHING, Blue reward:-0.80\n", - "step: 32, Red action: DO NOTHING, Blue reward:-0.80\n", - "step: 33, Red action: DO NOTHING, Blue reward:-0.80\n", - "step: 34, Red action: DO NOTHING, Blue reward:-0.80\n", - "step: 35, Red action: DO NOTHING, Blue reward:-0.80\n" - ] - } - ], + "outputs": [], "source": [ "for step in range(35):\n", " obs, reward, terminated, truncated, info = env.step(0)\n", @@ -642,51 +455,9 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{1: {'FOLDERS': {1: {'FILES': {1: {'health_status': 0}}, 'health_status': 0}},\n", - " 'NICS': {1: {'NMNE': {'inbound': 0, 'outbound': 0}, 'nic_status': 1},\n", - " 2: {'NMNE': {'inbound': 0, 'outbound': 0}, 'nic_status': 0}},\n", - " 'SERVICES': {1: {'health_status': 0, 'operating_status': 1}},\n", - " 'operating_status': 1},\n", - " 2: {'FOLDERS': {1: {'FILES': {1: {'health_status': 0}}, 'health_status': 0}},\n", - " 'NICS': {1: {'NMNE': {'inbound': 0, 'outbound': 0}, 'nic_status': 1},\n", - " 2: {'NMNE': {'inbound': 0, 'outbound': 0}, 'nic_status': 0}},\n", - " 'SERVICES': {1: {'health_status': 0, 'operating_status': 1}},\n", - " 'operating_status': 1},\n", - " 3: {'FOLDERS': {1: {'FILES': {1: {'health_status': 1}}, 'health_status': 1}},\n", - " 'NICS': {1: {'NMNE': {'inbound': 0, 'outbound': 0}, 'nic_status': 1},\n", - " 2: {'NMNE': {'inbound': 0, 'outbound': 0}, 'nic_status': 0}},\n", - " 'SERVICES': {1: {'health_status': 0, 'operating_status': 0}},\n", - " 'operating_status': 1},\n", - " 4: {'FOLDERS': {1: {'FILES': {1: {'health_status': 0}}, 'health_status': 0}},\n", - " 'NICS': {1: {'NMNE': {'inbound': 0, 'outbound': 0}, 'nic_status': 1},\n", - " 2: {'NMNE': {'inbound': 0, 'outbound': 0}, 'nic_status': 0}},\n", - " 'SERVICES': {1: {'health_status': 0, 'operating_status': 0}},\n", - " 'operating_status': 1},\n", - " 5: {'FOLDERS': {1: {'FILES': {1: {'health_status': 0}}, 'health_status': 0}},\n", - " 'NICS': {1: {'NMNE': {'inbound': 0, 'outbound': 0}, 'nic_status': 1},\n", - " 2: {'NMNE': {'inbound': 0, 'outbound': 0}, 'nic_status': 0}},\n", - " 'SERVICES': {1: {'health_status': 0, 'operating_status': 0}},\n", - " 'operating_status': 1},\n", - " 6: {'FOLDERS': {1: {'FILES': {1: {'health_status': 0}}, 'health_status': 0}},\n", - " 'NICS': {1: {'NMNE': {'inbound': 0, 'outbound': 0}, 'nic_status': 1},\n", - " 2: {'NMNE': {'inbound': 0, 'outbound': 0}, 'nic_status': 0}},\n", - " 'SERVICES': {1: {'health_status': 0, 'operating_status': 0}},\n", - " 'operating_status': 1},\n", - " 7: {'FOLDERS': {1: {'FILES': {1: {'health_status': 0}}, 'health_status': 0}},\n", - " 'NICS': {1: {'NMNE': {'inbound': 0, 'outbound': 0}, 'nic_status': 1},\n", - " 2: {'NMNE': {'inbound': 0, 'outbound': 0}, 'nic_status': 0}},\n", - " 'SERVICES': {1: {'health_status': 0, 'operating_status': 0}},\n", - " 'operating_status': 1}}\n" - ] - } - ], + "outputs": [], "source": [ "pprint(obs['NODES'])" ] @@ -700,51 +471,9 @@ }, { "cell_type": "code", - "execution_count": 7, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{1: {'FOLDERS': {1: {'FILES': {1: {'health_status': 0}}, 'health_status': 0}},\n", - " 'NICS': {1: {'NMNE': {'inbound': 0, 'outbound': 0}, 'nic_status': 1},\n", - " 2: {'NMNE': {'inbound': 0, 'outbound': 0}, 'nic_status': 0}},\n", - " 'SERVICES': {1: {'health_status': 0, 'operating_status': 1}},\n", - " 'operating_status': 1},\n", - " 2: {'FOLDERS': {1: {'FILES': {1: {'health_status': 0}}, 'health_status': 0}},\n", - " 'NICS': {1: {'NMNE': {'inbound': 0, 'outbound': 0}, 'nic_status': 1},\n", - " 2: {'NMNE': {'inbound': 0, 'outbound': 0}, 'nic_status': 0}},\n", - " 'SERVICES': {1: {'health_status': 3, 'operating_status': 1}},\n", - " 'operating_status': 1},\n", - " 3: {'FOLDERS': {1: {'FILES': {1: {'health_status': 2}}, 'health_status': 1}},\n", - " 'NICS': {1: {'NMNE': {'inbound': 0, 'outbound': 0}, 'nic_status': 1},\n", - " 2: {'NMNE': {'inbound': 0, 'outbound': 0}, 'nic_status': 0}},\n", - " 'SERVICES': {1: {'health_status': 0, 'operating_status': 0}},\n", - " 'operating_status': 1},\n", - " 4: {'FOLDERS': {1: {'FILES': {1: {'health_status': 0}}, 'health_status': 0}},\n", - " 'NICS': {1: {'NMNE': {'inbound': 0, 'outbound': 0}, 'nic_status': 1},\n", - " 2: {'NMNE': {'inbound': 0, 'outbound': 0}, 'nic_status': 0}},\n", - " 'SERVICES': {1: {'health_status': 0, 'operating_status': 0}},\n", - " 'operating_status': 1},\n", - " 5: {'FOLDERS': {1: {'FILES': {1: {'health_status': 0}}, 'health_status': 0}},\n", - " 'NICS': {1: {'NMNE': {'inbound': 0, 'outbound': 0}, 'nic_status': 1},\n", - " 2: {'NMNE': {'inbound': 0, 'outbound': 0}, 'nic_status': 0}},\n", - " 'SERVICES': {1: {'health_status': 0, 'operating_status': 0}},\n", - " 'operating_status': 1},\n", - " 6: {'FOLDERS': {1: {'FILES': {1: {'health_status': 0}}, 'health_status': 0}},\n", - " 'NICS': {1: {'NMNE': {'inbound': 0, 'outbound': 0}, 'nic_status': 1},\n", - " 2: {'NMNE': {'inbound': 0, 'outbound': 0}, 'nic_status': 0}},\n", - " 'SERVICES': {1: {'health_status': 0, 'operating_status': 0}},\n", - " 'operating_status': 1},\n", - " 7: {'FOLDERS': {1: {'FILES': {1: {'health_status': 0}}, 'health_status': 0}},\n", - " 'NICS': {1: {'NMNE': {'inbound': 0, 'outbound': 0}, 'nic_status': 1},\n", - " 2: {'NMNE': {'inbound': 0, 'outbound': 0}, 'nic_status': 0}},\n", - " 'SERVICES': {1: {'health_status': 0, 'operating_status': 0}},\n", - " 'operating_status': 1}}\n" - ] - } - ], + "outputs": [], "source": [ "obs, reward, terminated, truncated, info = env.step(9) # scan database file\n", "obs, reward, terminated, truncated, info = env.step(1) # scan webapp service\n", @@ -775,21 +504,9 @@ }, { "cell_type": "code", - "execution_count": 8, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "step: 38\n", - "Red action: DONOTHING\n", - "Green action: NODE_APPLICATION_EXECUTE\n", - "Green action: NODE_APPLICATION_EXECUTE\n", - "Blue reward:-0.8\n" - ] - } - ], + "outputs": [], "source": [ "obs, reward, terminated, truncated, info = env.step(13) # patch the database\n", "print(f\"step: {env.game.step_counter}\")\n", @@ -812,21 +529,9 @@ }, { "cell_type": "code", - "execution_count": 18, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "step: 48\n", - "Red action: DONOTHING\n", - "Green action: timestep=47 action='NODE_APPLICATION_EXECUTE' parameters={'node_id': 0, 'application_id': 0} request=['network', 'node', 'client_2', 'application', 'WebBrowser', 'execute'] response=RequestResponse(status='failure', data={})\n", - "Green action: timestep=47 action='NODE_APPLICATION_EXECUTE' parameters={'node_id': 0, 'application_id': 0} request=['network', 'node', 'client_1', 'application', 'WebBrowser', 'execute'] response=RequestResponse(status='failure', data={})\n", - "Blue reward:-0.80\n" - ] - } - ], + "outputs": [], "source": [ "obs, reward, terminated, truncated, info = env.step(0) # do nothing\n", "print(f\"step: {env.game.step_counter}\")\n", @@ -847,27 +552,9 @@ }, { "cell_type": "code", - "execution_count": 19, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "step: 49, Red action: DONOTHING, Blue reward:-0.80\n", - "step: 50, Red action: DONOTHING, Blue reward:-0.80\n", - "step: 51, Red action: DONOTHING, Blue reward:-0.80\n", - "step: 52, Red action: DONOTHING, Blue reward:1.00\n", - "step: 53, Red action: DONOTHING, Blue reward:0.90\n", - "step: 54, Red action: DONOTHING, Blue reward:0.90\n", - "step: 55, Red action: DONOTHING, Blue reward:0.90\n", - "step: 56, Red action: DONOTHING, Blue reward:0.90\n", - "step: 57, Red action: DONOTHING, Blue reward:0.90\n", - "step: 58, Red action: DONOTHING, Blue reward:0.90\n", - "step: 59, Red action: DONOTHING, Blue reward:0.80\n" - ] - } - ], + "outputs": [], "source": [ "env.step(13) # Patch the database\n", "print(f\"step: {env.game.step_counter}, Red action: {info['agent_actions']['data_manipulation_attacker'].action}, Blue reward:{reward:.2f}\" )\n", @@ -901,89 +588,9 @@ }, { "cell_type": "code", - "execution_count": 20, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "{1: {'position': 0,\n", - " 'permission': 0,\n", - " 'source_node_id': 0,\n", - " 'source_port': 0,\n", - " 'dest_node_id': 0,\n", - " 'dest_port': 0,\n", - " 'protocol': 0},\n", - " 2: {'position': 1,\n", - " 'permission': 0,\n", - " 'source_node_id': 0,\n", - " 'source_port': 0,\n", - " 'dest_node_id': 0,\n", - " 'dest_port': 0,\n", - " 'protocol': 0},\n", - " 3: {'position': 2,\n", - " 'permission': 0,\n", - " 'source_node_id': 0,\n", - " 'source_port': 0,\n", - " 'dest_node_id': 0,\n", - " 'dest_port': 0,\n", - " 'protocol': 0},\n", - " 4: {'position': 3,\n", - " 'permission': 0,\n", - " 'source_node_id': 0,\n", - " 'source_port': 0,\n", - " 'dest_node_id': 0,\n", - " 'dest_port': 0,\n", - " 'protocol': 0},\n", - " 5: {'position': 4,\n", - " 'permission': 2,\n", - " 'source_node_id': 7,\n", - " 'source_port': 1,\n", - " 'dest_node_id': 4,\n", - " 'dest_port': 1,\n", - " 'protocol': 3},\n", - " 6: {'position': 5,\n", - " 'permission': 2,\n", - " 'source_node_id': 8,\n", - " 'source_port': 1,\n", - " 'dest_node_id': 4,\n", - " 'dest_port': 1,\n", - " 'protocol': 3},\n", - " 7: {'position': 6,\n", - " 'permission': 0,\n", - " 'source_node_id': 0,\n", - " 'source_port': 0,\n", - " 'dest_node_id': 0,\n", - " 'dest_port': 0,\n", - " 'protocol': 0},\n", - " 8: {'position': 7,\n", - " 'permission': 0,\n", - " 'source_node_id': 0,\n", - " 'source_port': 0,\n", - " 'dest_node_id': 0,\n", - " 'dest_port': 0,\n", - " 'protocol': 0},\n", - " 9: {'position': 8,\n", - " 'permission': 0,\n", - " 'source_node_id': 0,\n", - " 'source_port': 0,\n", - " 'dest_node_id': 0,\n", - " 'dest_port': 0,\n", - " 'protocol': 0},\n", - " 10: {'position': 9,\n", - " 'permission': 0,\n", - " 'source_node_id': 0,\n", - " 'source_port': 0,\n", - " 'dest_node_id': 0,\n", - " 'dest_port': 0,\n", - " 'protocol': 0}}" - ] - }, - "execution_count": 20, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "obs['ACL']" ] @@ -997,18 +604,9 @@ }, { "cell_type": "code", - "execution_count": 23, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "blocking client 1\n", - "\n" - ] - } - ], + "outputs": [], "source": [ "env.step(58) # Remove the ACL rule that blocks client 1\n", "env.step(57) # Remove the ACL rule that blocks client 2\n", @@ -1045,56 +643,9 @@ }, { "cell_type": "code", - "execution_count": 24, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "step: 90, Red action: DONOTHING, Blue reward:0.00\n", - "step: 91, Red action: DONOTHING, Blue reward:1.00\n", - "step: 92, Red action: DONOTHING, Blue reward:1.00\n", - "step: 93, Red action: DONOTHING, Blue reward:1.00\n", - "step: 94, Red action: DONOTHING, Blue reward:1.00\n", - "step: 95, Red action: DONOTHING, Blue reward:1.00\n", - "step: 96, Red action: DONOTHING, Blue reward:0.90\n", - "step: 97, Red action: DONOTHING, Blue reward:0.90\n", - "step: 98, Red action: DONOTHING, Blue reward:0.90\n", - "step: 99, Red action: DONOTHING, Blue reward:0.90\n", - "step: 100, Red action: DONOTHING, Blue reward:0.90\n", - "step: 101, Red action: DONOTHING, Blue reward:0.90\n", - "step: 102, Red action: DONOTHING, Blue reward:0.90\n", - "step: 103, Red action: DONOTHING, Blue reward:0.90\n", - "step: 104, Red action: DONOTHING, Blue reward:0.90\n", - "step: 105, Red action: DONOTHING, Blue reward:0.90\n", - "step: 106, Red action: NODE_APPLICATION_EXECUTE, Blue reward:0.90\n", - "step: 107, Red action: DONOTHING, Blue reward:0.90\n", - "step: 108, Red action: DONOTHING, Blue reward:0.90\n", - "step: 109, Red action: DONOTHING, Blue reward:0.90\n", - "step: 110, Red action: DONOTHING, Blue reward:0.90\n", - "step: 111, Red action: DONOTHING, Blue reward:0.90\n", - "step: 112, Red action: DONOTHING, Blue reward:0.90\n", - "step: 113, Red action: DONOTHING, Blue reward:0.90\n", - "step: 114, Red action: DONOTHING, Blue reward:0.90\n", - "step: 115, Red action: DONOTHING, Blue reward:0.90\n", - "step: 116, Red action: DONOTHING, Blue reward:0.90\n", - "step: 117, Red action: DONOTHING, Blue reward:0.90\n", - "step: 118, Red action: DONOTHING, Blue reward:0.90\n", - "step: 119, Red action: DONOTHING, Blue reward:0.90\n", - "step: 120, Red action: DONOTHING, Blue reward:0.90\n", - "step: 121, Red action: DONOTHING, Blue reward:0.90\n", - "step: 122, Red action: DONOTHING, Blue reward:0.90\n", - "step: 123, Red action: DONOTHING, Blue reward:0.90\n", - "step: 124, Red action: DONOTHING, Blue reward:0.90\n", - "step: 125, Red action: DONOTHING, Blue reward:0.90\n", - "step: 126, Red action: DONOTHING, Blue reward:0.90\n", - "step: 127, Red action: DONOTHING, Blue reward:0.90\n", - "step: 128, Red action: NODE_APPLICATION_EXECUTE, Blue reward:0.90\n", - "step: 129, Red action: DONOTHING, Blue reward:0.90\n" - ] - } - ], + "outputs": [], "source": [ "\n", "for step in range(40):\n", From 7f4f3e9bfe85fd9aa8834e755e8d0128dd5fcbbf Mon Sep 17 00:00:00 2001 From: Marek Wolan Date: Fri, 15 Mar 2024 14:09:02 +0000 Subject: [PATCH 022/124] Calm logging --- src/primaite/game/agent/rewards.py | 2 +- src/primaite/simulator/network/airspace.py | 2 +- src/primaite/simulator/network/hardware/base.py | 6 +++--- src/primaite/simulator/system/applications/application.py | 2 +- src/primaite/simulator/system/services/service.py | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/primaite/game/agent/rewards.py b/src/primaite/game/agent/rewards.py index 52bed9e2..d214ecc9 100644 --- a/src/primaite/game/agent/rewards.py +++ b/src/primaite/game/agent/rewards.py @@ -111,7 +111,7 @@ class DatabaseFileIntegrity(AbstractReward): """ database_file_state = access_from_nested_dict(state, self.location_in_state) if database_file_state is NOT_PRESENT_IN_STATE: - _LOGGER.info( + _LOGGER.debug( f"Could not calculate {self.__class__} reward because " "simulation state did not contain enough information." ) diff --git a/src/primaite/simulator/network/airspace.py b/src/primaite/simulator/network/airspace.py index 5ceedc8e..a8343675 100644 --- a/src/primaite/simulator/network/airspace.py +++ b/src/primaite/simulator/network/airspace.py @@ -157,7 +157,7 @@ class WirelessNetworkInterface(NetworkInterface, ABC): return if not self._connected_node: - _LOGGER.error(f"Interface {self} cannot be enabled as it is not connected to a Node") + _LOGGER.warning(f"Interface {self} cannot be enabled as it is not connected to a Node") return if self._connected_node.operating_state != NodeOperatingState.ON: diff --git a/src/primaite/simulator/network/hardware/base.py b/src/primaite/simulator/network/hardware/base.py index a91a709c..0695c1c7 100644 --- a/src/primaite/simulator/network/hardware/base.py +++ b/src/primaite/simulator/network/hardware/base.py @@ -297,7 +297,7 @@ class WiredNetworkInterface(NetworkInterface, ABC): return True if not self._connected_node: - _LOGGER.error(f"Interface {self} cannot be enabled as it is not connected to a Node") + _LOGGER.warning(f"Interface {self} cannot be enabled as it is not connected to a Node") return False if self._connected_node.operating_state != NodeOperatingState.ON: @@ -343,11 +343,11 @@ class WiredNetworkInterface(NetworkInterface, ABC): :param link: The Link instance to connect to this network interface. """ if self._connected_link: - _LOGGER.error(f"Cannot connect Link to network interface {self} as it already has a connection") + _LOGGER.warning(f"Cannot connect Link to network interface {self} as it already has a connection") return if self._connected_link == link: - _LOGGER.error(f"Cannot connect Link to network interface {self} as it is already connected") + _LOGGER.warning(f"Cannot connect Link to network interface {self} as it is already connected") return self._connected_link = link diff --git a/src/primaite/simulator/system/applications/application.py b/src/primaite/simulator/system/applications/application.py index 74013681..b7422680 100644 --- a/src/primaite/simulator/system/applications/application.py +++ b/src/primaite/simulator/system/applications/application.py @@ -83,7 +83,7 @@ class Application(IOSoftware): if self.operating_state is not self.operating_state.RUNNING: # service is not running - _LOGGER.error(f"Cannot perform action: {self.name} is {self.operating_state.name}") + _LOGGER.debug(f"Cannot perform action: {self.name} is {self.operating_state.name}") return False return True diff --git a/src/primaite/simulator/system/services/service.py b/src/primaite/simulator/system/services/service.py index e15377a9..b2a6f685 100644 --- a/src/primaite/simulator/system/services/service.py +++ b/src/primaite/simulator/system/services/service.py @@ -59,7 +59,7 @@ class Service(IOSoftware): if self.operating_state is not ServiceOperatingState.RUNNING: # service is not running - _LOGGER.error(f"Cannot perform action: {self.name} is {self.operating_state.name}") + _LOGGER.debug(f"Cannot perform action: {self.name} is {self.operating_state.name}") return False return True From 8a9d8fb17cd7867a5ca58291d5cb8c7238c0afde Mon Sep 17 00:00:00 2001 From: Marek Wolan Date: Fri, 15 Mar 2024 14:10:34 +0000 Subject: [PATCH 023/124] Calm logging again --- src/primaite/game/agent/rewards.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/primaite/game/agent/rewards.py b/src/primaite/game/agent/rewards.py index d214ecc9..2201b09e 100644 --- a/src/primaite/game/agent/rewards.py +++ b/src/primaite/game/agent/rewards.py @@ -231,7 +231,7 @@ class WebpageUnavailablePenalty(AbstractReward): # If the last request did actually go through, then check if the webpage also loaded web_browser_state = access_from_nested_dict(state, self.location_in_state) if web_browser_state is NOT_PRESENT_IN_STATE or "history" not in web_browser_state: - _LOGGER.info( + _LOGGER.debug( "Web browser reward could not be calculated because the web browser history on node", f"{self._node} was not reported in the simulation state. Returning 0.0", ) From 9a38fcdae263f11462bcab1c3dc0b88052004904 Mon Sep 17 00:00:00 2001 From: Marek Wolan Date: Fri, 15 Mar 2024 14:19:30 +0000 Subject: [PATCH 024/124] Fix broken config --- src/primaite/config/_package_data/data_manipulation_marl.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/primaite/config/_package_data/data_manipulation_marl.yaml b/src/primaite/config/_package_data/data_manipulation_marl.yaml index be53d2c5..652dd809 100644 --- a/src/primaite/config/_package_data/data_manipulation_marl.yaml +++ b/src/primaite/config/_package_data/data_manipulation_marl.yaml @@ -13,8 +13,6 @@ training_config: io_settings: - save_checkpoints: true - checkpoint_interval: 5 save_agent_actions: true save_step_metadata: false save_pcap_logs: false From fc67fc48337160f5e8dc291982161f004f475d94 Mon Sep 17 00:00:00 2001 From: Marek Wolan Date: Fri, 15 Mar 2024 14:37:28 +0000 Subject: [PATCH 025/124] Fix notebook parsing data --- .../Data-Manipulation-Customising-Red-Agent.ipynb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/primaite/notebooks/Data-Manipulation-Customising-Red-Agent.ipynb b/src/primaite/notebooks/Data-Manipulation-Customising-Red-Agent.ipynb index 779d89f6..56e9bf5a 100644 --- a/src/primaite/notebooks/Data-Manipulation-Customising-Red-Agent.ipynb +++ b/src/primaite/notebooks/Data-Manipulation-Customising-Red-Agent.ipynb @@ -22,6 +22,7 @@ "# Imports\n", "\n", "from primaite.config.load import data_manipulation_config_path\n", + "from primaite.game.agent.interface import AgentActionHistoryItem\n", "from primaite.session.environment import PrimaiteGymEnv\n", "import yaml\n", "from pprint import pprint" @@ -62,12 +63,12 @@ "source": [ "def friendly_output_red_action(info):\n", " # parse the info dict form step output and write out what the red agent is doing\n", - " red_info = info['agent_actions']['data_manipulation_attacker']\n", - " red_action = red_info[0]\n", + " red_info : AgentActionHistoryItem = info['agent_actions']['data_manipulation_attacker']\n", + " red_action = red_info.action\n", " if red_action == 'DONOTHING':\n", " red_str = 'DO NOTHING'\n", " elif red_action == 'NODE_APPLICATION_EXECUTE':\n", - " client = \"client 1\" if red_info[1]['node_id'] == 0 else \"client 2\"\n", + " client = \"client 1\" if red_info.parameters['node_id'] == 0 else \"client 2\"\n", " red_str = f\"ATTACK from {client}\"\n", " return red_str" ] From b217869dd118a108f2eb61f318cf60340aea61ef Mon Sep 17 00:00:00 2001 From: Marek Wolan Date: Fri, 15 Mar 2024 15:03:27 +0000 Subject: [PATCH 026/124] Improve clarity in docs --- docs/source/example_notebooks.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/example_notebooks.rst b/docs/source/example_notebooks.rst index e77b444e..99d47822 100644 --- a/docs/source/example_notebooks.rst +++ b/docs/source/example_notebooks.rst @@ -38,7 +38,7 @@ Running Jupyter Notebooks 3. Opening the jupyter webpage (optional) -The default web browser may automatically open the webpage. However, if that is not the case, click the link shown in your command prompt output. It should look like this: ``http://localhost:8888/?token=ab83071fd13cb5a1384efba318...`` +The default web browser may automatically open the webpage. However, if that is not the case, click the link shown in your command prompt output. It should look like this: ``http://localhost:8888/?token=0123456798abc0123456789abc`` 4. Navigate to the list of notebooks From b4d310eda258ee453f7ded0f111f4d44effedcc7 Mon Sep 17 00:00:00 2001 From: Marek Wolan Date: Fri, 15 Mar 2024 16:17:38 +0000 Subject: [PATCH 027/124] Align step counts in logging --- src/primaite/session/environment.py | 34 ++++++++++++++++++++++------- 1 file changed, 26 insertions(+), 8 deletions(-) diff --git a/src/primaite/session/environment.py b/src/primaite/session/environment.py index 1795f14b..ce9699d4 100644 --- a/src/primaite/session/environment.py +++ b/src/primaite/session/environment.py @@ -47,6 +47,7 @@ class PrimaiteGymEnv(gymnasium.Env): def step(self, action: ActType) -> Tuple[ObsType, SupportsFloat, bool, bool, Dict[str, Any]]: """Perform a step in the environment.""" # make ProxyAgent store the action chosen my the RL policy + step = self.game.step_counter self.agent.store_action(action) # apply_agent_actions accesses the action we just stored self.game.apply_agent_actions() @@ -62,18 +63,18 @@ class PrimaiteGymEnv(gymnasium.Env): "agent_actions": {name: agent.action_history[-1] for name, agent in self.game.agents.items()} } # tell us what all the agents did for convenience. if self.game.save_step_metadata: - self._write_step_metadata_json(action, state, reward) + self._write_step_metadata_json(step, action, state, reward) return next_obs, reward, terminated, truncated, info - def _write_step_metadata_json(self, action: int, state: Dict, reward: int): + def _write_step_metadata_json(self, step: int, action: int, state: Dict, reward: int): output_dir = SIM_OUTPUT.path / f"episode_{self.episode_counter}" / "step_metadata" output_dir.mkdir(parents=True, exist_ok=True) - path = output_dir / f"step_{self.game.step_counter}.json" + path = output_dir / f"step_{step}.json" data = { "episode": self.episode_counter, - "step": self.game.step_counter, + "step": step, "action": int(action), "reward": int(reward), "state": state, @@ -121,6 +122,12 @@ class PrimaiteGymEnv(gymnasium.Env): else: return self.agent.observation_manager.current_observation + def close(self): + """Close the simulation.""" + if self.io.settings.save_agent_actions: + all_agent_actions = {name: agent.action_history for name, agent in self.game.agents.items()} + self.io.write_agent_actions(agent_actions=all_agent_actions, episode=self.episode_counter) + class PrimaiteRayEnv(gymnasium.Env): """Ray wrapper that accepts a single `env_config` parameter in init function for compatibility with Ray.""" @@ -144,6 +151,10 @@ class PrimaiteRayEnv(gymnasium.Env): """Perform a step in the environment.""" return self.env.step(action) + def close(self): + """Close the simulation.""" + self.env.close() + class PrimaiteRayMARLEnv(MultiAgentEnv): """Ray Environment that inherits from MultiAgentEnv to allow training MARL systems.""" @@ -211,6 +222,7 @@ class PrimaiteRayMARLEnv(MultiAgentEnv): identifier. :rtype: Tuple[Dict[str,ObsType], Dict[str, SupportsFloat], Dict[str,bool], Dict[str,bool], Dict] """ + step = self.game.step_counter # 1. Perform actions for agent_name, action in actions.items(): self.agents[agent_name].store_action(action) @@ -232,18 +244,18 @@ class PrimaiteRayMARLEnv(MultiAgentEnv): terminateds["__all__"] = len(self.terminateds) == len(self.agents) truncateds["__all__"] = self.game.calculate_truncated() if self.game.save_step_metadata: - self._write_step_metadata_json(actions, state, rewards) + self._write_step_metadata_json(step, actions, state, rewards) return next_obs, rewards, terminateds, truncateds, infos - def _write_step_metadata_json(self, actions: Dict, state: Dict, rewards: Dict): + def _write_step_metadata_json(self, step: int, actions: Dict, state: Dict, rewards: Dict): output_dir = SIM_OUTPUT.path / f"episode_{self.episode_counter}" / "step_metadata" output_dir.mkdir(parents=True, exist_ok=True) - path = output_dir / f"step_{self.game.step_counter}.json" + path = output_dir / f"step_{step}.json" data = { "episode": self.episode_counter, - "step": self.game.step_counter, + "step": step, "actions": {agent_name: int(action) for agent_name, action in actions.items()}, "reward": rewards, "state": state, @@ -260,3 +272,9 @@ class PrimaiteRayMARLEnv(MultiAgentEnv): unflat_obs = agent.observation_manager.current_observation obs[agent_name] = gymnasium.spaces.flatten(unflat_space, unflat_obs) return obs + + def close(self): + """Close the simulation.""" + if self.io.settings.save_agent_actions: + all_agent_actions = {name: agent.action_history for name, agent in self.game.agents.items()} + self.io.write_agent_actions(agent_actions=all_agent_actions, episode=self.episode_counter) From bb0161991846be4787df7c49d3ab28005f42a560 Mon Sep 17 00:00:00 2001 From: Marek Wolan Date: Fri, 15 Mar 2024 16:17:45 +0000 Subject: [PATCH 028/124] Bump version --- src/primaite/VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/primaite/VERSION b/src/primaite/VERSION index fa7f84f1..1129dfd4 100644 --- a/src/primaite/VERSION +++ b/src/primaite/VERSION @@ -1 +1 @@ -3.0.0b7dev +3.0.0b7 From bef2bd80845fc7fda09f0c3dbbb43654d38eb4e4 Mon Sep 17 00:00:00 2001 From: Cristian-VM2 Date: Fri, 22 Mar 2024 16:35:53 +0000 Subject: [PATCH 029/124] add actions to enable/disable ports in routers/firewalls, improve notebook for training PPO agents --- src/primaite/game/agent/actions.py | 49 +++++++++++++++ .../notebooks/Training-an-SB3-Agent.ipynb | 32 ++++++++-- tests/conftest.py | 3 + .../game_layer/test_actions.py | 62 +++++++++++++++++++ 4 files changed, 140 insertions(+), 6 deletions(-) diff --git a/src/primaite/game/agent/actions.py b/src/primaite/game/agent/actions.py index 4d28328e..8cad4108 100644 --- a/src/primaite/game/agent/actions.py +++ b/src/primaite/game/agent/actions.py @@ -569,6 +569,53 @@ class NetworkNICDisableAction(NetworkNICAbstractAction): self.verb: str = "disable" +class NetworkPortAbstractAction(AbstractAction): + """ + Abstract base class for Port actions. + + Any action which applies to a Router/Firewall and uses node_id and port_id as its only two parameters + can inherit from this base class. + """ + + def __init__(self, manager: "ActionManager", num_nodes: int, max_nics_per_node: int, **kwargs) -> None: + """Init method for NetworkNICAbstractAction. + + :param manager: Reference to the ActionManager which created this action. + :type manager: ActionManager + :param num_nodes: Number of nodes in the simulation. + :type num_nodes: int + :param max_nics_per_node: Maximum number of NICs per node. + :type max_nics_per_node: int + """ + super().__init__(manager=manager) + self.shape: Dict[str, int] = {"node_id": num_nodes, "port_id": max_nics_per_node} + self.verb: str # define but don't initialise: defends against children classes not defining this + + def form_request(self, node_id: int, port_id: int) -> List[str]: + """Return the action formatted as a request which can be ingested by the PrimAITE simulation.""" + node_name = self.manager.get_node_name_by_idx(node_idx=node_id) + port_num = self.manager.get_nic_num_by_idx(node_idx=node_id, nic_idx=port_id) + if node_name is None or port_num is None: + return ["do_nothing"] + return ["network", "node", node_name, "network_interface", port_num, self.verb] + + +class NetworkPortEnableAction(NetworkPortAbstractAction): + """Action which enables a PORT.""" + + def __init__(self, manager: "ActionManager", num_nodes: int, max_nics_per_node: int, **kwargs) -> None: + super().__init__(manager=manager, num_nodes=num_nodes, max_nics_per_node=max_nics_per_node, **kwargs) + self.verb: str = "enable" + + +class NetworkPortDisableAction(NetworkPortAbstractAction): + """Action which disables a NIC.""" + + def __init__(self, manager: "ActionManager", num_nodes: int, max_nics_per_node: int, **kwargs) -> None: + super().__init__(manager=manager, num_nodes=num_nodes, max_nics_per_node=max_nics_per_node, **kwargs) + self.verb: str = "disable" + + class ActionManager: """Class which manages the action space for an agent.""" @@ -602,6 +649,8 @@ class ActionManager: "NETWORK_ACL_REMOVERULE": NetworkACLRemoveRuleAction, "NETWORK_NIC_ENABLE": NetworkNICEnableAction, "NETWORK_NIC_DISABLE": NetworkNICDisableAction, + "NETWORK_PORT_ENABLE": NetworkPortEnableAction, + "NETWORK_PORT_DISABLE": NetworkPortDisableAction, } """Dictionary which maps action type strings to the corresponding action class.""" diff --git a/src/primaite/notebooks/Training-an-SB3-Agent.ipynb b/src/primaite/notebooks/Training-an-SB3-Agent.ipynb index cefcc429..e6f5aaee 100644 --- a/src/primaite/notebooks/Training-an-SB3-Agent.ipynb +++ b/src/primaite/notebooks/Training-an-SB3-Agent.ipynb @@ -45,7 +45,13 @@ "metadata": {}, "outputs": [], "source": [ - "from stable_baselines3 import PPO" + "from stable_baselines3 import PPO\n", + "\n", + "EPISODE_LEN = 128\n", + "NO_STEPS = EPISODE_LEN * 10\n", + "BATCH_SIZE = EPISODE_LEN * 10\n", + "TOTAL_TIMESTEPS = 5e3 * EPISODE_LEN\n", + "LEARNING_RATE = 3e-4" ] }, { @@ -54,7 +60,7 @@ "metadata": {}, "outputs": [], "source": [ - "model = PPO('MlpPolicy', gym)\n" + "model = PPO('MlpPolicy', gym, learning_rate=LEARNING_RATE, n_steps=NO_STEPS, batch_size=BATCH_SIZE, verbose=0, tensorboard_log=\"./PPO_UC2/\")\n" ] }, { @@ -63,7 +69,7 @@ "metadata": {}, "outputs": [], "source": [ - "model.learn(total_timesteps=10)\n" + "model.learn(total_timesteps=TOTAL_TIMESTEPS)\n" ] }, { @@ -72,7 +78,7 @@ "metadata": {}, "outputs": [], "source": [ - "model.save(\"deleteme\")" + "model.save(\"PrimAITE-v3.0.0b7-PPO\")" ] }, { @@ -80,7 +86,21 @@ "execution_count": null, "metadata": {}, "outputs": [], - "source": [] + "source": [ + "eval_model = PPO(\"MlpPolicy\", gym)\n", + "eval_model = PPO.load(\"PrimAITE-v3.0.0b7-PPO\", gym)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "from stable_baselines3.common.evaluation import evaluate_policy\n", + "\n", + "evaluate_policy(eval_model, gym, n_eval_episodes=10)" + ] } ], "metadata": { @@ -99,7 +119,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.10.12" + "version": "3.9.18" } }, "nbformat": 4, diff --git a/tests/conftest.py b/tests/conftest.py index 3a9e2655..fbfd23f2 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -495,6 +495,8 @@ def game_and_agent(): {"type": "NETWORK_ACL_REMOVERULE", "options": {"target_router_hostname": "router"}}, {"type": "NETWORK_NIC_ENABLE"}, {"type": "NETWORK_NIC_DISABLE"}, + {"type": "NETWORK_PORT_ENABLE"}, + {"type": "NETWORK_PORT_DISABLE"}, ] action_space = ActionManager( @@ -507,6 +509,7 @@ def game_and_agent(): }, {"node_name": "server_1", "services": [{"service_name": "DNSServer"}]}, {"node_name": "server_2", "services": [{"service_name": "WebServer"}]}, + {"node_name": "router"}, ], max_folders_per_node=2, max_files_per_folder=2, diff --git a/tests/integration_tests/game_layer/test_actions.py b/tests/integration_tests/game_layer/test_actions.py index 740fb491..5ced802c 100644 --- a/tests/integration_tests/game_layer/test_actions.py +++ b/tests/integration_tests/game_layer/test_actions.py @@ -312,3 +312,65 @@ def test_node_file_delete_integration(game_and_agent: Tuple[PrimaiteGame, ProxyA assert not client_1.file_system.get_file("downloads", "cat.png") # 3.1 (but with the reference to the original file, we can check that deleted flag is True ) assert file.deleted + + +def test_network_router_port_disable_integration(game_and_agent: Tuple[PrimaiteGame, ProxyAgent]): + """Test that the NetworkPortDisableAction can form a request and that it is accepted by the simulation.""" + game, agent = game_and_agent + + # 1: Check that client_1 can access the network + client_1 = game.simulation.network.get_node_by_hostname("client_1") + server_1 = game.simulation.network.get_node_by_hostname("server_1") + router = game.simulation.network.get_node_by_hostname("router") + + browser: WebBrowser = client_1.software_manager.software.get("WebBrowser") + browser.run() + browser.target_url = "http://www.example.com" + assert browser.get_webpage() # check that the browser can access example.com before we block it + + # 2: Disable the NIC on client_1 + action = ( + "NETWORK_PORT_DISABLE", + { + "node_id": 3, # router + "port_id": 0, # port 1 + }, + ) + agent.store_action(action) + game.step() + + # 3: Check that the NIC is disabled, and that client 1 cannot access example.com + assert router.network_interface[1].enabled == False + assert not browser.get_webpage() + assert not client_1.ping("10.0.2.2") + assert not client_1.ping("10.0.2.3") + + # 4: check that servers can still communicate + assert server_1.ping("10.0.2.3") + + +def test_network_router_port_enable_integration(game_and_agent: Tuple[PrimaiteGame, ProxyAgent]): + """Test that the NetworkPortEnableAction can form a request and that it is accepted by the simulation.""" + + game, agent = game_and_agent + + # 1: Disable router port 1 + router = game.simulation.network.get_node_by_hostname("router") + client_1 = game.simulation.network.get_node_by_hostname("client_1") + router.network_interface[1].disable() + assert not client_1.ping("10.0.2.2") + + # 2: Use action to enable port + action = ( + "NETWORK_PORT_ENABLE", + { + "node_id": 3, # router + "port_id": 0, # port 1 + }, + ) + agent.store_action(action) + game.step() + + # 3: Check that the Port is enabled, and that client 1 can ping again + assert router.network_interface[1].enabled == True + assert client_1.ping("10.0.2.3") From 4a5dd9ba0fa992b683442c4b5370e9e10dff8064 Mon Sep 17 00:00:00 2001 From: Cristian-VM2 Date: Mon, 25 Mar 2024 11:08:36 +0000 Subject: [PATCH 030/124] fix typo --- src/primaite/game/agent/actions.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/primaite/game/agent/actions.py b/src/primaite/game/agent/actions.py index 8cad4108..af90c1e1 100644 --- a/src/primaite/game/agent/actions.py +++ b/src/primaite/game/agent/actions.py @@ -609,7 +609,7 @@ class NetworkPortEnableAction(NetworkPortAbstractAction): class NetworkPortDisableAction(NetworkPortAbstractAction): - """Action which disables a NIC.""" + """Action which disables a PORT.""" def __init__(self, manager: "ActionManager", num_nodes: int, max_nics_per_node: int, **kwargs) -> None: super().__init__(manager=manager, num_nodes=num_nodes, max_nics_per_node=max_nics_per_node, **kwargs) From 78b966ace48b4e991334ea1d3d8b2f6ab7768948 Mon Sep 17 00:00:00 2001 From: Cristian-VM2 Date: Mon, 25 Mar 2024 11:41:07 +0000 Subject: [PATCH 031/124] fix port/nic enable/disable actions returning failure when they succeed --- src/primaite/simulator/network/hardware/base.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/primaite/simulator/network/hardware/base.py b/src/primaite/simulator/network/hardware/base.py index 0cad4124..38d20e1f 100644 --- a/src/primaite/simulator/network/hardware/base.py +++ b/src/primaite/simulator/network/hardware/base.py @@ -519,12 +519,10 @@ class IPWiredNetworkInterface(WiredNetworkInterface, Layer3Interface, ABC): """ super().enable() try: - pass self._connected_node.default_gateway_hello() - return True except AttributeError: pass - return False + return True @abstractmethod def receive_frame(self, frame: Frame) -> bool: From 600dc3f016b3c18add5c5f109b7ad0fe24c154ad Mon Sep 17 00:00:00 2001 From: Cristian-VM2 Date: Mon, 25 Mar 2024 16:58:27 +0000 Subject: [PATCH 032/124] #2404 add application scan, close, and fix actions, fix and enable service scan test --- src/primaite/game/agent/actions.py | 27 ++++++ .../system/applications/application.py | 14 +++ tests/conftest.py | 3 + .../game_layer/test_actions.py | 89 ++++++++++++++++++- 4 files changed, 129 insertions(+), 4 deletions(-) diff --git a/src/primaite/game/agent/actions.py b/src/primaite/game/agent/actions.py index af90c1e1..bdb90b57 100644 --- a/src/primaite/game/agent/actions.py +++ b/src/primaite/game/agent/actions.py @@ -195,6 +195,30 @@ class NodeApplicationExecuteAction(NodeApplicationAbstractAction): self.verb: str = "execute" +class NodeApplicationScanAction(NodeApplicationAbstractAction): + """Action which scans an application.""" + + def __init__(self, manager: "ActionManager", num_nodes: int, num_applications: int, **kwargs) -> None: + super().__init__(manager=manager, num_nodes=num_nodes, num_applications=num_applications) + self.verb: str = "scan" + + +class NodeApplicationCloseAction(NodeApplicationAbstractAction): + """Action which closes an application.""" + + def __init__(self, manager: "ActionManager", num_nodes: int, num_applications: int, **kwargs) -> None: + super().__init__(manager=manager, num_nodes=num_nodes, num_applications=num_applications) + self.verb: str = "close" + + +class NodeApplicationFixAction(NodeApplicationAbstractAction): + """Action which fixes an application.""" + + def __init__(self, manager: "ActionManager", num_nodes: int, num_applications: int, **kwargs) -> None: + super().__init__(manager=manager, num_nodes=num_nodes, num_applications=num_applications) + self.verb: str = "patch" + + class NodeFolderAbstractAction(AbstractAction): """ Base class for folder actions. @@ -631,6 +655,9 @@ class ActionManager: "NODE_SERVICE_ENABLE": NodeServiceEnableAction, "NODE_SERVICE_PATCH": NodeServicePatchAction, "NODE_APPLICATION_EXECUTE": NodeApplicationExecuteAction, + "NODE_APPLICATION_SCAN": NodeApplicationScanAction, + "NODE_APPLICATION_CLOSE": NodeApplicationCloseAction, + "NODE_APPLICATION_FIX": NodeApplicationFixAction, "NODE_FILE_SCAN": NodeFileScanAction, "NODE_FILE_CHECKHASH": NodeFileCheckhashAction, "NODE_FILE_DELETE": NodeFileDeleteAction, diff --git a/src/primaite/simulator/system/applications/application.py b/src/primaite/simulator/system/applications/application.py index b7422680..4ea893e0 100644 --- a/src/primaite/simulator/system/applications/application.py +++ b/src/primaite/simulator/system/applications/application.py @@ -3,6 +3,8 @@ from enum import Enum from typing import Any, Dict, Set from primaite import getLogger +from primaite.interface.request import RequestResponse +from primaite.simulator.core import RequestManager, RequestType from primaite.simulator.system.software import IOSoftware, SoftwareHealthState _LOGGER = getLogger(__name__) @@ -38,6 +40,17 @@ class Application(IOSoftware): def __init__(self, **kwargs): super().__init__(**kwargs) + def _init_request_manager(self) -> RequestManager: + """ + Initialise the request manager. + + More information in user guide and docstring for SimComponent._init_request_manager. + """ + rm = super()._init_request_manager() + + rm.add_request("close", RequestType(func=lambda request, context: RequestResponse.from_bool(self.close()))) + return rm + @abstractmethod def describe_state(self) -> Dict: """ @@ -109,6 +122,7 @@ class Application(IOSoftware): if self.operating_state == ApplicationOperatingState.RUNNING: self.sys_log.info(f"Closed Application{self.name}") self.operating_state = ApplicationOperatingState.CLOSED + return True def install(self) -> None: """Install Application.""" diff --git a/tests/conftest.py b/tests/conftest.py index fbfd23f2..9eaf1782 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -477,6 +477,9 @@ def game_and_agent(): {"type": "NODE_SERVICE_ENABLE"}, {"type": "NODE_SERVICE_PATCH"}, {"type": "NODE_APPLICATION_EXECUTE"}, + {"type": "NODE_APPLICATION_SCAN"}, + {"type": "NODE_APPLICATION_CLOSE"}, + {"type": "NODE_APPLICATION_FIX"}, {"type": "NODE_FILE_SCAN"}, {"type": "NODE_FILE_CHECKHASH"}, {"type": "NODE_FILE_DELETE"}, diff --git a/tests/integration_tests/game_layer/test_actions.py b/tests/integration_tests/game_layer/test_actions.py index 5ced802c..98e6ea5d 100644 --- a/tests/integration_tests/game_layer/test_actions.py +++ b/tests/integration_tests/game_layer/test_actions.py @@ -17,6 +17,7 @@ import pytest from primaite.game.agent.interface import ProxyAgent from primaite.game.game import PrimaiteGame from primaite.simulator.file_system.file_system_item_abc import FileSystemItemHealthStatus +from primaite.simulator.system.applications.application import ApplicationOperatingState from primaite.simulator.system.applications.web_browser import WebBrowser from primaite.simulator.system.software import SoftwareHealthState @@ -30,7 +31,6 @@ def test_do_nothing_integration(game_and_agent: Tuple[PrimaiteGame, ProxyAgent]) game.step() -@pytest.mark.skip(reason="Waiting to merge ticket 2166") def test_node_service_scan_integration(game_and_agent: Tuple[PrimaiteGame, ProxyAgent]): """ Test that the NodeServiceScanAction can form a request and that it is accepted by the simulation. @@ -42,12 +42,12 @@ def test_node_service_scan_integration(game_and_agent: Tuple[PrimaiteGame, Proxy game, agent = game_and_agent # 1: Check that the service starts off in a good state, and that visible state is hidden until first scan - svc = game.simulation.network.get_node_by_hostname("client_1").software_manager.software.get("DNSClient") + svc = game.simulation.network.get_node_by_hostname("server_1").software_manager.software.get("DNSServer") assert svc.health_state_actual == SoftwareHealthState.GOOD assert svc.health_state_visible == SoftwareHealthState.UNUSED # 2: Scan and check that the visible state is now correct - action = ("NODE_SERVICE_SCAN", {"node_id": 0, "service_id": 0}) + action = ("NODE_SERVICE_SCAN", {"node_id": 1, "service_id": 0}) agent.store_action(action) game.step() assert svc.health_state_actual == SoftwareHealthState.GOOD @@ -58,7 +58,7 @@ def test_node_service_scan_integration(game_and_agent: Tuple[PrimaiteGame, Proxy assert svc.health_state_visible == SoftwareHealthState.GOOD # 4: Scan and check that the visible state is now correct - action = ("NODE_SERVICE_SCAN", {"node_id": 0, "service_id": 0}) + action = ("NODE_SERVICE_SCAN", {"node_id": 1, "service_id": 0}) agent.store_action(action) game.step() assert svc.health_state_actual == SoftwareHealthState.COMPROMISED @@ -374,3 +374,84 @@ def test_network_router_port_enable_integration(game_and_agent: Tuple[PrimaiteGa # 3: Check that the Port is enabled, and that client 1 can ping again assert router.network_interface[1].enabled == True assert client_1.ping("10.0.2.3") + + +def test_node_application_scan_integration(game_and_agent: Tuple[PrimaiteGame, ProxyAgent]): + """Test that the NodeApplicationScanAction updates the application status as expected.""" + game, agent = game_and_agent + + # 1: Check that http traffic is going across the network nicely. + client_1 = game.simulation.network.get_node_by_hostname("client_1") + + browser: WebBrowser = client_1.software_manager.software.get("WebBrowser") + browser.run() + browser.target_url = "http://www.example.com" + assert browser.get_webpage() # check that the browser can access example.com + + assert browser.health_state_actual == SoftwareHealthState.GOOD + assert browser.health_state_visible == SoftwareHealthState.UNUSED + + # 2: Scan and check that the visible state is now correct + action = ("NODE_APPLICATION_SCAN", {"node_id": 0, "application_id": 0}) + agent.store_action(action) + game.step() + assert browser.health_state_actual == SoftwareHealthState.GOOD + assert browser.health_state_visible == SoftwareHealthState.GOOD + + # 3: Corrupt the service and check that the visible state is still good + browser.health_state_actual = SoftwareHealthState.COMPROMISED + assert browser.health_state_visible == SoftwareHealthState.GOOD + + # 4: Scan and check that the visible state is now correct + action = ("NODE_APPLICATION_SCAN", {"node_id": 0, "application_id": 0}) + agent.store_action(action) + game.step() + assert browser.health_state_actual == SoftwareHealthState.COMPROMISED + assert browser.health_state_visible == SoftwareHealthState.COMPROMISED + + +def test_node_application_fix_integration(game_and_agent: Tuple[PrimaiteGame, ProxyAgent]): + """Test that the NodeApplicationFixAction can form a request and that it is accepted by the simulation. + + When you initiate a fix action, the software health state turns to PATCHING, then after a few steps, it goes + to GOOD.""" + game, agent = game_and_agent + + # 1: Check that http traffic is going across the network nicely. + client_1 = game.simulation.network.get_node_by_hostname("client_1") + + browser: WebBrowser = client_1.software_manager.software.get("WebBrowser") + browser.health_state_actual = SoftwareHealthState.COMPROMISED + + # 2: Apply a fix action + action = ("NODE_APPLICATION_FIX", {"node_id": 0, "application_id": 0}) + agent.store_action(action) + game.step() + + # 3: Check that the application is now in the patching state + assert browser.health_state_actual == SoftwareHealthState.PATCHING + + # 4: perform a few do-nothing steps and check that the application is now in the good state + action = ("DONOTHING", {}) + agent.store_action(action) + game.step() + assert browser.health_state_actual == SoftwareHealthState.GOOD + + +def test_node_application_close_integration(game_and_agent: Tuple[PrimaiteGame, ProxyAgent]): + """Test that the NodeApplicationCloseAction can form a request and that it is accepted by the simulation. + + When you initiate a close action, the Application Operating State changes for CLOSED.""" + game, agent = game_and_agent + client_1 = game.simulation.network.get_node_by_hostname("client_1") + + browser: WebBrowser = client_1.software_manager.software.get("WebBrowser") + browser.run() + assert browser.operating_state == ApplicationOperatingState.RUNNING + + # 2: Apply a close action + action = ("NODE_APPLICATION_CLOSE", {"node_id": 0, "application_id": 0}) + agent.store_action(action) + game.step() + + assert browser.operating_state == ApplicationOperatingState.CLOSED From 944b248300fc6729e21cc9446f1682207e3847be Mon Sep 17 00:00:00 2001 From: Cristian-VM2 Date: Tue, 26 Mar 2024 10:51:33 +0000 Subject: [PATCH 033/124] #2404 rename software patch to fix --- .../config/benchmark_training_config.yaml | 2 +- .../v2.0.0/v2.0.0_benchmark_metadata.json | 2 +- diagram/classes.puml | 8 ++--- .../_package_data/data_manipulation.yaml | 4 +-- .../_package_data/data_manipulation_marl.yaml | 8 ++--- src/primaite/game/agent/actions.py | 10 +++--- .../services/database/database_service.py | 6 ++-- src/primaite/simulator/system/software.py | 32 +++++++++---------- .../assets/configs/bad_primaite_session.yaml | 4 +-- .../configs/eval_only_primaite_session.yaml | 4 +-- tests/assets/configs/multi_agent_session.yaml | 8 ++--- tests/assets/configs/shared_rewards.yaml | 4 +-- .../assets/configs/test_primaite_session.yaml | 4 +-- .../configs/train_only_primaite_session.yaml | 4 +-- .../session_metadata.json | 2 +- tests/conftest.py | 2 +- .../game_layer/test_actions.py | 6 ++-- .../test_simulation/test_request_response.py | 4 +-- .../_applications/test_applications.py | 2 +- .../_applications/test_database_client.py | 2 -- .../_system/_services/test_service_actions.py | 6 ++-- .../_system/_services/test_services.py | 6 ++-- 22 files changed, 64 insertions(+), 66 deletions(-) diff --git a/benchmark/config/benchmark_training_config.yaml b/benchmark/config/benchmark_training_config.yaml index 02b6377c..17811586 100644 --- a/benchmark/config/benchmark_training_config.yaml +++ b/benchmark/config/benchmark_training_config.yaml @@ -158,7 +158,7 @@ green_ier_blocked: -0.001 # Patching / Reset durations os_patching_duration: 5 # The time taken to patch the OS node_reset_duration: 5 # The time taken to reset a node (hardware) -service_patching_duration: 5 # The time taken to patch a service +service_fixing_duration: 5 # The time taken to patch a service file_system_repairing_limit: 5 # The time take to repair the file system file_system_restoring_limit: 5 # The time take to restore the file system file_system_scanning_limit: 5 # The time taken to scan the file system diff --git a/benchmark/results/v2.0.0/v2.0.0_benchmark_metadata.json b/benchmark/results/v2.0.0/v2.0.0_benchmark_metadata.json index b2745967..3ed57745 100644 --- a/benchmark/results/v2.0.0/v2.0.0_benchmark_metadata.json +++ b/benchmark/results/v2.0.0/v2.0.0_benchmark_metadata.json @@ -5634,7 +5634,7 @@ "green_ier_blocked": -0.001, "os_patching_duration": 5, "node_reset_duration": 5, - "service_patching_duration": 5, + "service_fixing_duration": 5, "file_system_repairing_limit": 5, "file_system_restoring_limit": 5, "file_system_scanning_limit": 5 diff --git a/diagram/classes.puml b/diagram/classes.puml index 4505f3e0..71e0b0b1 100644 --- a/diagram/classes.puml +++ b/diagram/classes.puml @@ -48,7 +48,7 @@ class "ActiveNode" as primaite.nodes.active_node.ActiveNode { file_system_state_actual : GOOD file_system_state_observed : REPAIRING, RESTORING, GOOD ip_address : str - patching_count : int + fixing_count : int software_state software_state : GOOD set_file_system_state(file_system_state: FileSystemState) -> None @@ -353,10 +353,10 @@ class "SB3Agent" as primaite.agents.sb3.SB3Agent { } class "Service" as primaite.common.service.Service { name : str - patching_count : int + fixing_count : int port : str software_state : GOOD - reduce_patching_count() -> None + reduce_fixing_count() -> None } class "ServiceNode" as primaite.nodes.service_node.ServiceNode { services : Dict[str, Service] @@ -455,7 +455,7 @@ class "TrainingConfig" as primaite.config.training_config.TrainingConfig { sb3_output_verbose_level scanning : float seed : Optional[int] - service_patching_duration : int + service_fixing_duration : int session_type time_delay : int from_dict(config_dict: Dict[str, Any]) -> TrainingConfig diff --git a/src/primaite/config/_package_data/data_manipulation.yaml b/src/primaite/config/_package_data/data_manipulation.yaml index c561030a..12f60b63 100644 --- a/src/primaite/config/_package_data/data_manipulation.yaml +++ b/src/primaite/config/_package_data/data_manipulation.yaml @@ -244,7 +244,7 @@ agents: - type: NODE_SERVICE_RESTART - type: NODE_SERVICE_DISABLE - type: NODE_SERVICE_ENABLE - - type: NODE_SERVICE_PATCH + - type: NODE_SERVICE_FIX - type: NODE_FILE_SCAN - type: NODE_FILE_CHECKHASH - type: NODE_FILE_DELETE @@ -339,7 +339,7 @@ agents: folder_id: 0 file_id: 0 13: - action: "NODE_SERVICE_PATCH" + action: "NODE_SERVICE_FIX" options: node_id: 2 service_id: 0 diff --git a/src/primaite/config/_package_data/data_manipulation_marl.yaml b/src/primaite/config/_package_data/data_manipulation_marl.yaml index 85d282ba..b632f626 100644 --- a/src/primaite/config/_package_data/data_manipulation_marl.yaml +++ b/src/primaite/config/_package_data/data_manipulation_marl.yaml @@ -246,7 +246,7 @@ agents: - type: NODE_SERVICE_RESTART - type: NODE_SERVICE_DISABLE - type: NODE_SERVICE_ENABLE - - type: NODE_SERVICE_PATCH + - type: NODE_SERVICE_FIX - type: NODE_FILE_SCAN - type: NODE_FILE_CHECKHASH - type: NODE_FILE_DELETE @@ -341,7 +341,7 @@ agents: folder_id: 0 file_id: 0 13: - action: "NODE_SERVICE_PATCH" + action: "NODE_SERVICE_FIX" options: node_id: 2 service_id: 0 @@ -797,7 +797,7 @@ agents: - type: NODE_SERVICE_RESTART - type: NODE_SERVICE_DISABLE - type: NODE_SERVICE_ENABLE - - type: NODE_SERVICE_PATCH + - type: NODE_SERVICE_FIX - type: NODE_FILE_SCAN - type: NODE_FILE_CHECKHASH - type: NODE_FILE_DELETE @@ -892,7 +892,7 @@ agents: folder_id: 0 file_id: 0 13: - action: "NODE_SERVICE_PATCH" + action: "NODE_SERVICE_FIX" options: node_id: 2 service_id: 0 diff --git a/src/primaite/game/agent/actions.py b/src/primaite/game/agent/actions.py index bdb90b57..b79fc985 100644 --- a/src/primaite/game/agent/actions.py +++ b/src/primaite/game/agent/actions.py @@ -156,12 +156,12 @@ class NodeServiceEnableAction(NodeServiceAbstractAction): self.verb: str = "enable" -class NodeServicePatchAction(NodeServiceAbstractAction): - """Action which patches a service.""" +class NodeServiceFixAction(NodeServiceAbstractAction): + """Action which fixes a service.""" def __init__(self, manager: "ActionManager", num_nodes: int, num_services: int, **kwargs) -> None: super().__init__(manager=manager, num_nodes=num_nodes, num_services=num_services) - self.verb: str = "patch" + self.verb: str = "fix" class NodeApplicationAbstractAction(AbstractAction): @@ -216,7 +216,7 @@ class NodeApplicationFixAction(NodeApplicationAbstractAction): def __init__(self, manager: "ActionManager", num_nodes: int, num_applications: int, **kwargs) -> None: super().__init__(manager=manager, num_nodes=num_nodes, num_applications=num_applications) - self.verb: str = "patch" + self.verb: str = "fix" class NodeFolderAbstractAction(AbstractAction): @@ -653,7 +653,7 @@ class ActionManager: "NODE_SERVICE_RESTART": NodeServiceRestartAction, "NODE_SERVICE_DISABLE": NodeServiceDisableAction, "NODE_SERVICE_ENABLE": NodeServiceEnableAction, - "NODE_SERVICE_PATCH": NodeServicePatchAction, + "NODE_SERVICE_FIX": NodeServiceFixAction, "NODE_APPLICATION_EXECUTE": NodeApplicationExecuteAction, "NODE_APPLICATION_SCAN": NodeApplicationScanAction, "NODE_APPLICATION_CLOSE": NodeApplicationCloseAction, diff --git a/src/primaite/simulator/system/services/database/database_service.py b/src/primaite/simulator/system/services/database/database_service.py index c73132eb..411359a2 100644 --- a/src/primaite/simulator/system/services/database/database_service.py +++ b/src/primaite/simulator/system/services/database/database_service.py @@ -304,8 +304,8 @@ class DatabaseService(Service): self.backup_database() return super().apply_timestep(timestep) - def _update_patch_status(self) -> None: + def _update_fix_status(self) -> None: """Perform a database restore when the patching countdown is finished.""" - super()._update_patch_status() - if self._patching_countdown is None: + super()._update_fix_status() + if self._fixing_countdown is None: self.restore_backup() diff --git a/src/primaite/simulator/system/software.py b/src/primaite/simulator/system/software.py index d55f141f..9b54f802 100644 --- a/src/primaite/simulator/system/software.py +++ b/src/primaite/simulator/system/software.py @@ -82,7 +82,7 @@ class Software(SimComponent): "The health state of the software visible to the red agent." criticality: SoftwareCriticality = SoftwareCriticality.LOWEST "The criticality level of the software." - patching_count: int = 0 + fixing_count: int = 0 "The count of patches applied to the software, defaults to 0." scanning_count: int = 0 "The count of times the software has been scanned, defaults to 0." @@ -96,9 +96,9 @@ class Software(SimComponent): "The FileSystem of the Node the Software is installed on." folder: Optional[Folder] = None "The folder on the file system the Software uses." - patching_duration: int = 2 + fixing_duration: int = 2 "The number of ticks it takes to patch the software." - _patching_countdown: Optional[int] = None + _fixing_countdown: Optional[int] = None "Current number of ticks left to patch the software." def _init_request_manager(self) -> RequestManager: @@ -117,9 +117,9 @@ class Software(SimComponent): ), ) rm.add_request( - "patch", + "fix", RequestType( - func=lambda request, context: RequestResponse.from_bool(self.patch()), + func=lambda request, context: RequestResponse.from_bool(self.fix()), ), ) rm.add_request("scan", RequestType(func=lambda request, context: RequestResponse.from_bool(self.scan()))) @@ -149,7 +149,7 @@ class Software(SimComponent): "health_state_actual": self.health_state_actual.value, "health_state_visible": self.health_state_visible.value, "criticality": self.criticality.value, - "patching_count": self.patching_count, + "fixing_count": self.fixing_count, "scanning_count": self.scanning_count, "revealed_to_red": self.revealed_to_red, } @@ -194,21 +194,21 @@ class Software(SimComponent): self.health_state_visible = self.health_state_actual return True - def patch(self) -> bool: - """Perform a patch on the software.""" + def fix(self) -> bool: + """Perform a fix on the software.""" if self.health_state_actual in (SoftwareHealthState.COMPROMISED, SoftwareHealthState.GOOD): - self._patching_countdown = self.patching_duration + self._fixing_countdown = self.fixing_duration self.set_health_state(SoftwareHealthState.PATCHING) return True return False - def _update_patch_status(self) -> None: - """Update the patch status of the software.""" - self._patching_countdown -= 1 - if self._patching_countdown <= 0: + def _update_fix_status(self) -> None: + """Update the fix status of the software.""" + self._fixing_countdown -= 1 + if self._fixing_countdown <= 0: self.set_health_state(SoftwareHealthState.GOOD) - self._patching_countdown = None - self.patching_count += 1 + self._fixing_countdown = None + self.fixing_count += 1 def reveal_to_red(self) -> None: """Reveals the software to the red agent.""" @@ -222,7 +222,7 @@ class Software(SimComponent): """ super().apply_timestep(timestep) if self.health_state_actual == SoftwareHealthState.PATCHING: - self._update_patch_status() + self._update_fix_status() class IOSoftware(Software): diff --git a/tests/assets/configs/bad_primaite_session.yaml b/tests/assets/configs/bad_primaite_session.yaml index 38d54ce3..e599ee7e 100644 --- a/tests/assets/configs/bad_primaite_session.yaml +++ b/tests/assets/configs/bad_primaite_session.yaml @@ -155,7 +155,7 @@ agents: - type: NODE_SERVICE_RESTART - type: NODE_SERVICE_DISABLE - type: NODE_SERVICE_ENABLE - - type: NODE_SERVICE_PATCH + - type: NODE_SERVICE_FIX - type: NODE_FILE_SCAN - type: NODE_FILE_CHECKHASH - type: NODE_FILE_DELETE @@ -250,7 +250,7 @@ agents: folder_id: 1 file_id: 0 13: - action: "NODE_SERVICE_PATCH" + action: "NODE_SERVICE_FIX" options: node_id: 2 service_id: 0 diff --git a/tests/assets/configs/eval_only_primaite_session.yaml b/tests/assets/configs/eval_only_primaite_session.yaml index f2815578..9d1404d8 100644 --- a/tests/assets/configs/eval_only_primaite_session.yaml +++ b/tests/assets/configs/eval_only_primaite_session.yaml @@ -159,7 +159,7 @@ agents: - type: NODE_SERVICE_RESTART - type: NODE_SERVICE_DISABLE - type: NODE_SERVICE_ENABLE - - type: NODE_SERVICE_PATCH + - type: NODE_SERVICE_FIX - type: NODE_FILE_SCAN - type: NODE_FILE_CHECKHASH - type: NODE_FILE_DELETE @@ -254,7 +254,7 @@ agents: folder_id: 1 file_id: 0 13: - action: "NODE_SERVICE_PATCH" + action: "NODE_SERVICE_FIX" options: node_id: 2 service_id: 0 diff --git a/tests/assets/configs/multi_agent_session.yaml b/tests/assets/configs/multi_agent_session.yaml index 8bbddb76..acb62c96 100644 --- a/tests/assets/configs/multi_agent_session.yaml +++ b/tests/assets/configs/multi_agent_session.yaml @@ -166,7 +166,7 @@ agents: - type: NODE_SERVICE_RESTART - type: NODE_SERVICE_DISABLE - type: NODE_SERVICE_ENABLE - - type: NODE_SERVICE_PATCH + - type: NODE_SERVICE_FIX - type: NODE_FILE_SCAN - type: NODE_FILE_CHECKHASH - type: NODE_FILE_DELETE @@ -261,7 +261,7 @@ agents: folder_id: 1 file_id: 0 13: - action: "NODE_SERVICE_PATCH" + action: "NODE_SERVICE_FIX" options: node_id: 2 service_id: 0 @@ -610,7 +610,7 @@ agents: - type: NODE_SERVICE_RESTART - type: NODE_SERVICE_DISABLE - type: NODE_SERVICE_ENABLE - - type: NODE_SERVICE_PATCH + - type: NODE_SERVICE_FIX - type: NODE_FILE_SCAN - type: NODE_FILE_CHECKHASH - type: NODE_FILE_DELETE @@ -705,7 +705,7 @@ agents: folder_id: 1 file_id: 0 13: - action: "NODE_SERVICE_PATCH" + action: "NODE_SERVICE_FIX" options: node_id: 2 service_id: 0 diff --git a/tests/assets/configs/shared_rewards.yaml b/tests/assets/configs/shared_rewards.yaml index daffa585..10feba9d 100644 --- a/tests/assets/configs/shared_rewards.yaml +++ b/tests/assets/configs/shared_rewards.yaml @@ -244,7 +244,7 @@ agents: - type: NODE_SERVICE_RESTART - type: NODE_SERVICE_DISABLE - type: NODE_SERVICE_ENABLE - - type: NODE_SERVICE_PATCH + - type: NODE_SERVICE_FIX - type: NODE_FILE_SCAN - type: NODE_FILE_CHECKHASH - type: NODE_FILE_DELETE @@ -339,7 +339,7 @@ agents: folder_id: 0 file_id: 0 13: - action: "NODE_SERVICE_PATCH" + action: "NODE_SERVICE_FIX" options: node_id: 2 service_id: 0 diff --git a/tests/assets/configs/test_primaite_session.yaml b/tests/assets/configs/test_primaite_session.yaml index 121cc7f1..a8b33032 100644 --- a/tests/assets/configs/test_primaite_session.yaml +++ b/tests/assets/configs/test_primaite_session.yaml @@ -169,7 +169,7 @@ agents: - type: NODE_SERVICE_RESTART - type: NODE_SERVICE_DISABLE - type: NODE_SERVICE_ENABLE - - type: NODE_SERVICE_PATCH + - type: NODE_SERVICE_FIX - type: NODE_FILE_SCAN - type: NODE_FILE_CHECKHASH - type: NODE_FILE_DELETE @@ -264,7 +264,7 @@ agents: folder_id: 1 file_id: 0 13: - action: "NODE_SERVICE_PATCH" + action: "NODE_SERVICE_FIX" options: node_id: 2 service_id: 0 diff --git a/tests/assets/configs/train_only_primaite_session.yaml b/tests/assets/configs/train_only_primaite_session.yaml index 71a23989..d0cbaab3 100644 --- a/tests/assets/configs/train_only_primaite_session.yaml +++ b/tests/assets/configs/train_only_primaite_session.yaml @@ -167,7 +167,7 @@ agents: - type: NODE_SERVICE_RESTART - type: NODE_SERVICE_DISABLE - type: NODE_SERVICE_ENABLE - - type: NODE_SERVICE_PATCH + - type: NODE_SERVICE_FIX - type: NODE_FILE_SCAN - type: NODE_FILE_CHECKHASH - type: NODE_FILE_DELETE @@ -262,7 +262,7 @@ agents: folder_id: 1 file_id: 0 13: - action: "NODE_SERVICE_PATCH" + action: "NODE_SERVICE_FIX" options: node_id: 2 service_id: 0 diff --git a/tests/assets/example_sb3_agent_session/session_metadata.json b/tests/assets/example_sb3_agent_session/session_metadata.json index c0968ba7..085e20cc 100644 --- a/tests/assets/example_sb3_agent_session/session_metadata.json +++ b/tests/assets/example_sb3_agent_session/session_metadata.json @@ -1 +1 @@ -{ "uuid": "301874d3-2e14-43c2-ba7f-e2b03ad05dde", "start_datetime": "2023-07-14T09:48:22.973005", "end_datetime": "2023-07-14T09:48:34.182715", "learning": { "total_episodes": 10, "total_time_steps": 2560 }, "evaluation": { "total_episodes": 5, "total_time_steps": 1280 }, "env": { "training_config": { "agent_framework": "SB3", "deep_learning_framework": "TF2", "agent_identifier": "PPO", "hard_coded_agent_view": "FULL", "random_red_agent": false, "action_type": "NODE", "num_train_episodes": 10, "num_train_steps": 256, "num_eval_episodes": 5, "num_eval_steps": 256, "checkpoint_every_n_episodes": 10, "observation_space": { "components": [ { "name": "NODE_LINK_TABLE" } ] }, "time_delay": 5, "session_type": "TRAIN_EVAL", "load_agent": false, "agent_load_file": null, "observation_space_high_value": 1000000000, "sb3_output_verbose_level": "NONE", "all_ok": 0, "off_should_be_on": -0.001, "off_should_be_resetting": -0.0005, "on_should_be_off": -0.0002, "on_should_be_resetting": -0.0005, "resetting_should_be_on": -0.0005, "resetting_should_be_off": -0.0002, "resetting": -0.0003, "good_should_be_patching": 0.0002, "good_should_be_compromised": 0.0005, "good_should_be_overwhelmed": 0.0005, "patching_should_be_good": -0.0005, "patching_should_be_compromised": 0.0002, "patching_should_be_overwhelmed": 0.0002, "patching": -0.0003, "compromised_should_be_good": -0.002, "compromised_should_be_patching": -0.002, "compromised_should_be_overwhelmed": -0.002, "compromised": -0.002, "overwhelmed_should_be_good": -0.002, "overwhelmed_should_be_patching": -0.002, "overwhelmed_should_be_compromised": -0.002, "overwhelmed": -0.002, "good_should_be_repairing": 0.0002, "good_should_be_restoring": 0.0002, "good_should_be_corrupt": 0.0005, "good_should_be_destroyed": 0.001, "repairing_should_be_good": -0.0005, "repairing_should_be_restoring": 0.0002, "repairing_should_be_corrupt": 0.0002, "repairing_should_be_destroyed": 0.0, "repairing": -0.0003, "restoring_should_be_good": -0.001, "restoring_should_be_repairing": -0.0002, "restoring_should_be_corrupt": 0.0001, "restoring_should_be_destroyed": 0.0002, "restoring": -0.0006, "corrupt_should_be_good": -0.001, "corrupt_should_be_repairing": -0.001, "corrupt_should_be_restoring": -0.001, "corrupt_should_be_destroyed": 0.0002, "corrupt": -0.001, "destroyed_should_be_good": -0.002, "destroyed_should_be_repairing": -0.002, "destroyed_should_be_restoring": -0.002, "destroyed_should_be_corrupt": -0.002, "destroyed": -0.002, "scanning": -0.0002, "red_ier_running": -0.0005, "green_ier_blocked": -0.001, "os_patching_duration": 5, "node_reset_duration": 5, "node_booting_duration": 3, "node_shutdown_duration": 2, "service_patching_duration": 5, "file_system_repairing_limit": 5, "file_system_restoring_limit": 5, "file_system_scanning_limit": 5, "deterministic": true, "seed": 12345 }, "lay_down_config": [ { "item_type": "PORTS", "ports_list": [ { "port": "80" } ] }, { "item_type": "SERVICES", "service_list": [ { "name": "TCP" } ] }, { "item_type": "NODE", "node_id": "1", "name": "PC1", "node_class": "SERVICE", "node_type": "COMPUTER", "priority": "P5", "hardware_state": "ON", "ip_address": "192.168.1.2", "software_state": "GOOD", "file_system_state": "GOOD", "services": [ { "name": "TCP", "port": "80", "state": "GOOD" } ] }, { "item_type": "NODE", "node_id": "2", "name": "PC2", "node_class": "SERVICE", "node_type": "COMPUTER", "priority": "P5", "hardware_state": "ON", "ip_address": "192.168.1.3", "software_state": "GOOD", "file_system_state": "GOOD", "services": [ { "name": "TCP", "port": "80", "state": "GOOD" } ] }, { "item_type": "NODE", "node_id": "3", "name": "SWITCH1", "node_class": "ACTIVE", "node_type": "SWITCH", "priority": "P2", "hardware_state": "ON", "ip_address": "192.168.1.1", "software_state": "GOOD", "file_system_state": "GOOD" }, { "item_type": "NODE", "node_id": "4", "name": "SERVER1", "node_class": "SERVICE", "node_type": "SERVER", "priority": "P5", "hardware_state": "ON", "ip_address": "192.168.1.4", "software_state": "GOOD", "file_system_state": "GOOD", "services": [ { "name": "TCP", "port": "80", "state": "GOOD" } ] }, { "item_type": "LINK", "id": "5", "name": "link1", "bandwidth": 1000000000, "source": "1", "destination": "3" }, { "item_type": "LINK", "id": "6", "name": "link2", "bandwidth": 1000000000, "source": "2", "destination": "3" }, { "item_type": "LINK", "id": "7", "name": "link3", "bandwidth": 1000000000, "source": "3", "destination": "4" }, { "item_type": "GREEN_IER", "id": "8", "start_step": 1, "end_step": 256, "load": 10000, "protocol": "TCP", "port": "80", "source": "1", "destination": "4", "mission_criticality": 1 }, { "item_type": "GREEN_IER", "id": "9", "start_step": 1, "end_step": 256, "load": 10000, "protocol": "TCP", "port": "80", "source": "2", "destination": "4", "mission_criticality": 1 }, { "item_type": "GREEN_IER", "id": "10", "start_step": 1, "end_step": 256, "load": 10000, "protocol": "TCP", "port": "80", "source": "4", "destination": "2", "mission_criticality": 5 }, { "item_type": "ACL_RULE", "id": "11", "permission": "ALLOW", "source": "192.168.1.2", "destination": "192.168.1.4", "protocol": "TCP", "port": 80, "position": 0 }, { "item_type": "ACL_RULE", "id": "12", "permission": "ALLOW", "source": "192.168.1.3", "destination": "192.168.1.4", "protocol": "TCP", "port": 80, "position": 1 }, { "item_type": "ACL_RULE", "id": "13", "permission": "ALLOW", "source": "192.168.1.4", "destination": "192.168.1.3", "protocol": "TCP", "port": 80, "position": 2 }, { "item_type": "RED_POL", "id": "14", "start_step": 20, "end_step": 20, "targetNodeId": "1", "initiator": "DIRECT", "type": "SERVICE", "protocol": "TCP", "state": "COMPROMISED", "sourceNodeId": "NA", "sourceNodeService": "NA", "sourceNodeServiceState": "NA" }, { "item_type": "RED_IER", "id": "15", "start_step": 30, "end_step": 256, "load": 10000000, "protocol": "TCP", "port": "80", "source": "1", "destination": "4", "mission_criticality": 0 }, { "item_type": "RED_POL", "id": "16", "start_step": 40, "end_step": 40, "targetNodeId": "4", "initiator": "IER", "type": "SERVICE", "protocol": "TCP", "state": "OVERWHELMED", "sourceNodeId": "NA", "sourceNodeService": "NA", "sourceNodeServiceState": "NA" } ] } } +{ "uuid": "301874d3-2e14-43c2-ba7f-e2b03ad05dde", "start_datetime": "2023-07-14T09:48:22.973005", "end_datetime": "2023-07-14T09:48:34.182715", "learning": { "total_episodes": 10, "total_time_steps": 2560 }, "evaluation": { "total_episodes": 5, "total_time_steps": 1280 }, "env": { "training_config": { "agent_framework": "SB3", "deep_learning_framework": "TF2", "agent_identifier": "PPO", "hard_coded_agent_view": "FULL", "random_red_agent": false, "action_type": "NODE", "num_train_episodes": 10, "num_train_steps": 256, "num_eval_episodes": 5, "num_eval_steps": 256, "checkpoint_every_n_episodes": 10, "observation_space": { "components": [ { "name": "NODE_LINK_TABLE" } ] }, "time_delay": 5, "session_type": "TRAIN_EVAL", "load_agent": false, "agent_load_file": null, "observation_space_high_value": 1000000000, "sb3_output_verbose_level": "NONE", "all_ok": 0, "off_should_be_on": -0.001, "off_should_be_resetting": -0.0005, "on_should_be_off": -0.0002, "on_should_be_resetting": -0.0005, "resetting_should_be_on": -0.0005, "resetting_should_be_off": -0.0002, "resetting": -0.0003, "good_should_be_patching": 0.0002, "good_should_be_compromised": 0.0005, "good_should_be_overwhelmed": 0.0005, "patching_should_be_good": -0.0005, "patching_should_be_compromised": 0.0002, "patching_should_be_overwhelmed": 0.0002, "patching": -0.0003, "compromised_should_be_good": -0.002, "compromised_should_be_patching": -0.002, "compromised_should_be_overwhelmed": -0.002, "compromised": -0.002, "overwhelmed_should_be_good": -0.002, "overwhelmed_should_be_patching": -0.002, "overwhelmed_should_be_compromised": -0.002, "overwhelmed": -0.002, "good_should_be_repairing": 0.0002, "good_should_be_restoring": 0.0002, "good_should_be_corrupt": 0.0005, "good_should_be_destroyed": 0.001, "repairing_should_be_good": -0.0005, "repairing_should_be_restoring": 0.0002, "repairing_should_be_corrupt": 0.0002, "repairing_should_be_destroyed": 0.0, "repairing": -0.0003, "restoring_should_be_good": -0.001, "restoring_should_be_repairing": -0.0002, "restoring_should_be_corrupt": 0.0001, "restoring_should_be_destroyed": 0.0002, "restoring": -0.0006, "corrupt_should_be_good": -0.001, "corrupt_should_be_repairing": -0.001, "corrupt_should_be_restoring": -0.001, "corrupt_should_be_destroyed": 0.0002, "corrupt": -0.001, "destroyed_should_be_good": -0.002, "destroyed_should_be_repairing": -0.002, "destroyed_should_be_restoring": -0.002, "destroyed_should_be_corrupt": -0.002, "destroyed": -0.002, "scanning": -0.0002, "red_ier_running": -0.0005, "green_ier_blocked": -0.001, "os_patching_duration": 5, "node_reset_duration": 5, "node_booting_duration": 3, "node_shutdown_duration": 2, "service_fixing_duration": 5, "file_system_repairing_limit": 5, "file_system_restoring_limit": 5, "file_system_scanning_limit": 5, "deterministic": true, "seed": 12345 }, "lay_down_config": [ { "item_type": "PORTS", "ports_list": [ { "port": "80" } ] }, { "item_type": "SERVICES", "service_list": [ { "name": "TCP" } ] }, { "item_type": "NODE", "node_id": "1", "name": "PC1", "node_class": "SERVICE", "node_type": "COMPUTER", "priority": "P5", "hardware_state": "ON", "ip_address": "192.168.1.2", "software_state": "GOOD", "file_system_state": "GOOD", "services": [ { "name": "TCP", "port": "80", "state": "GOOD" } ] }, { "item_type": "NODE", "node_id": "2", "name": "PC2", "node_class": "SERVICE", "node_type": "COMPUTER", "priority": "P5", "hardware_state": "ON", "ip_address": "192.168.1.3", "software_state": "GOOD", "file_system_state": "GOOD", "services": [ { "name": "TCP", "port": "80", "state": "GOOD" } ] }, { "item_type": "NODE", "node_id": "3", "name": "SWITCH1", "node_class": "ACTIVE", "node_type": "SWITCH", "priority": "P2", "hardware_state": "ON", "ip_address": "192.168.1.1", "software_state": "GOOD", "file_system_state": "GOOD" }, { "item_type": "NODE", "node_id": "4", "name": "SERVER1", "node_class": "SERVICE", "node_type": "SERVER", "priority": "P5", "hardware_state": "ON", "ip_address": "192.168.1.4", "software_state": "GOOD", "file_system_state": "GOOD", "services": [ { "name": "TCP", "port": "80", "state": "GOOD" } ] }, { "item_type": "LINK", "id": "5", "name": "link1", "bandwidth": 1000000000, "source": "1", "destination": "3" }, { "item_type": "LINK", "id": "6", "name": "link2", "bandwidth": 1000000000, "source": "2", "destination": "3" }, { "item_type": "LINK", "id": "7", "name": "link3", "bandwidth": 1000000000, "source": "3", "destination": "4" }, { "item_type": "GREEN_IER", "id": "8", "start_step": 1, "end_step": 256, "load": 10000, "protocol": "TCP", "port": "80", "source": "1", "destination": "4", "mission_criticality": 1 }, { "item_type": "GREEN_IER", "id": "9", "start_step": 1, "end_step": 256, "load": 10000, "protocol": "TCP", "port": "80", "source": "2", "destination": "4", "mission_criticality": 1 }, { "item_type": "GREEN_IER", "id": "10", "start_step": 1, "end_step": 256, "load": 10000, "protocol": "TCP", "port": "80", "source": "4", "destination": "2", "mission_criticality": 5 }, { "item_type": "ACL_RULE", "id": "11", "permission": "ALLOW", "source": "192.168.1.2", "destination": "192.168.1.4", "protocol": "TCP", "port": 80, "position": 0 }, { "item_type": "ACL_RULE", "id": "12", "permission": "ALLOW", "source": "192.168.1.3", "destination": "192.168.1.4", "protocol": "TCP", "port": 80, "position": 1 }, { "item_type": "ACL_RULE", "id": "13", "permission": "ALLOW", "source": "192.168.1.4", "destination": "192.168.1.3", "protocol": "TCP", "port": 80, "position": 2 }, { "item_type": "RED_POL", "id": "14", "start_step": 20, "end_step": 20, "targetNodeId": "1", "initiator": "DIRECT", "type": "SERVICE", "protocol": "TCP", "state": "COMPROMISED", "sourceNodeId": "NA", "sourceNodeService": "NA", "sourceNodeServiceState": "NA" }, { "item_type": "RED_IER", "id": "15", "start_step": 30, "end_step": 256, "load": 10000000, "protocol": "TCP", "port": "80", "source": "1", "destination": "4", "mission_criticality": 0 }, { "item_type": "RED_POL", "id": "16", "start_step": 40, "end_step": 40, "targetNodeId": "4", "initiator": "IER", "type": "SERVICE", "protocol": "TCP", "state": "OVERWHELMED", "sourceNodeId": "NA", "sourceNodeService": "NA", "sourceNodeServiceState": "NA" } ] } } diff --git a/tests/conftest.py b/tests/conftest.py index 9eaf1782..078a78bd 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -475,7 +475,7 @@ def game_and_agent(): {"type": "NODE_SERVICE_RESTART"}, {"type": "NODE_SERVICE_DISABLE"}, {"type": "NODE_SERVICE_ENABLE"}, - {"type": "NODE_SERVICE_PATCH"}, + {"type": "NODE_SERVICE_FIX"}, {"type": "NODE_APPLICATION_EXECUTE"}, {"type": "NODE_APPLICATION_SCAN"}, {"type": "NODE_APPLICATION_CLOSE"}, diff --git a/tests/integration_tests/game_layer/test_actions.py b/tests/integration_tests/game_layer/test_actions.py index 98e6ea5d..5aa93e27 100644 --- a/tests/integration_tests/game_layer/test_actions.py +++ b/tests/integration_tests/game_layer/test_actions.py @@ -65,9 +65,9 @@ def test_node_service_scan_integration(game_and_agent: Tuple[PrimaiteGame, Proxy assert svc.health_state_visible == SoftwareHealthState.COMPROMISED -def test_node_service_patch_integration(game_and_agent: Tuple[PrimaiteGame, ProxyAgent]): +def test_node_service_fix_integration(game_and_agent: Tuple[PrimaiteGame, ProxyAgent]): """ - Test that the NodeServicePatchAction can form a request and that it is accepted by the simulation. + Test that the NodeServiceFixAction can form a request and that it is accepted by the simulation. When you initiate a patch action, the software health state turns to PATCHING, then after a few steps, it goes to GOOD. @@ -79,7 +79,7 @@ def test_node_service_patch_integration(game_and_agent: Tuple[PrimaiteGame, Prox svc.health_state_actual = SoftwareHealthState.COMPROMISED # 2: Apply a patch action - action = ("NODE_SERVICE_PATCH", {"node_id": 1, "service_id": 0}) + action = ("NODE_SERVICE_FIX", {"node_id": 1, "service_id": 0}) agent.store_action(action) game.step() diff --git a/tests/integration_tests/test_simulation/test_request_response.py b/tests/integration_tests/test_simulation/test_request_response.py index aee5c816..5df04fbb 100644 --- a/tests/integration_tests/test_simulation/test_request_response.py +++ b/tests/integration_tests/test_simulation/test_request_response.py @@ -23,7 +23,7 @@ def test_successful_application_requests(example_network): resp_1 = net.apply_request(["node", "client_1", "application", "TestApplication", "scan"]) assert resp_1 == RequestResponse(status="success", data={}) - resp_2 = net.apply_request(["node", "client_1", "application", "TestApplication", "patch"]) + resp_2 = net.apply_request(["node", "client_1", "application", "TestApplication", "fix"]) assert resp_2 == RequestResponse(status="success", data={}) resp_3 = net.apply_request(["node", "client_1", "application", "TestApplication", "compromise"]) assert resp_3 == RequestResponse(status="success", data={}) @@ -46,7 +46,7 @@ def test_successful_service_requests(example_network): "resume", "compromise", "scan", - "patch", + "fix", ]: resp_1 = net.apply_request(["node", "server_1", "service", "TestService", verb]) assert resp_1 == RequestResponse(status="success", data={}) diff --git a/tests/unit_tests/_primaite/_simulator/_system/_applications/test_applications.py b/tests/unit_tests/_primaite/_simulator/_system/_applications/test_applications.py index 6247a100..fbdd9bef 100644 --- a/tests/unit_tests/_primaite/_simulator/_system/_applications/test_applications.py +++ b/tests/unit_tests/_primaite/_simulator/_system/_applications/test_applications.py @@ -46,5 +46,5 @@ def test_application_describe_states(application): application.set_health_state(SoftwareHealthState.COMPROMISED) assert SoftwareHealthState.COMPROMISED.value == application.describe_state().get("health_state_actual") - application.patch() + application.fix() assert SoftwareHealthState.PATCHING.value == application.describe_state().get("health_state_actual") diff --git a/tests/unit_tests/_primaite/_simulator/_system/_applications/test_database_client.py b/tests/unit_tests/_primaite/_simulator/_system/_applications/test_database_client.py index 5f10ec96..b9b43b25 100644 --- a/tests/unit_tests/_primaite/_simulator/_system/_applications/test_database_client.py +++ b/tests/unit_tests/_primaite/_simulator/_system/_applications/test_database_client.py @@ -99,8 +99,6 @@ def test_query_when_client_is_closed(database_client_on_computer): assert database_client.query(sql="test") is False - -def test_query_fail_to_connect(database_client_on_computer): """Database client query should return False if the connect attempt fails.""" database_client, computer = database_client_on_computer diff --git a/tests/unit_tests/_primaite/_simulator/_system/_services/test_service_actions.py b/tests/unit_tests/_primaite/_simulator/_system/_services/test_service_actions.py index 714644e4..dd2d7752 100644 --- a/tests/unit_tests/_primaite/_simulator/_system/_services/test_service_actions.py +++ b/tests/unit_tests/_primaite/_simulator/_system/_services/test_service_actions.py @@ -80,12 +80,12 @@ def test_service_enable(service): assert service.operating_state == ServiceOperatingState.STOPPED -def test_service_patch(service): - """Test that a service can be patched and that it takes two timesteps to complete.""" +def test_service_fix(service): + """Test that a service can be fixed and that it takes two timesteps to complete.""" service.start() assert service.health_state_actual == SoftwareHealthState.GOOD - service.apply_request(["patch"]) + service.apply_request(["fix"]) assert service.health_state_actual == SoftwareHealthState.PATCHING service.apply_timestep(1) assert service.health_state_actual == SoftwareHealthState.PATCHING diff --git a/tests/unit_tests/_primaite/_simulator/_system/_services/test_services.py b/tests/unit_tests/_primaite/_simulator/_system/_services/test_services.py index ac36c660..59d9499b 100644 --- a/tests/unit_tests/_primaite/_simulator/_system/_services/test_services.py +++ b/tests/unit_tests/_primaite/_simulator/_system/_services/test_services.py @@ -136,16 +136,16 @@ def test_compromised_service_remains_compromised(service): assert service.health_state_actual == SoftwareHealthState.COMPROMISED -def test_service_patching(service): +def test_service_fixing(service): service.start() assert service.health_state_actual == SoftwareHealthState.GOOD service.set_health_state(SoftwareHealthState.COMPROMISED) - service.patch() + service.fix() assert service.health_state_actual == SoftwareHealthState.PATCHING - for i in range(service.patching_duration + 1): + for i in range(service.fixing_duration + 1): service.apply_timestep(i) assert service.health_state_actual == SoftwareHealthState.GOOD From e5605296391dcec5b8ffab1a15e8a31d6452fb8c Mon Sep 17 00:00:00 2001 From: Marek Wolan Date: Tue, 26 Mar 2024 12:06:23 +0000 Subject: [PATCH 034/124] #2418 Add Printer and Wireless router to config parser --- src/primaite/game/game.py | 15 +++++++++++++-- .../network/hardware/nodes/host/server.py | 6 ++++++ tests/assets/configs/test_primaite_session.yaml | 6 ++++++ .../test_primaite_session.py | 2 +- 4 files changed, 26 insertions(+), 3 deletions(-) diff --git a/src/primaite/game/game.py b/src/primaite/game/game.py index 05b76679..6ba7e63c 100644 --- a/src/primaite/game/game.py +++ b/src/primaite/game/game.py @@ -15,10 +15,11 @@ from primaite.game.science import graph_has_cycle, topological_sort from primaite.simulator.network.hardware.base import NodeOperatingState from primaite.simulator.network.hardware.nodes.host.computer import Computer from primaite.simulator.network.hardware.nodes.host.host_node import NIC -from primaite.simulator.network.hardware.nodes.host.server import Server +from primaite.simulator.network.hardware.nodes.host.server import Printer, Server from primaite.simulator.network.hardware.nodes.network.firewall import Firewall from primaite.simulator.network.hardware.nodes.network.router import Router from primaite.simulator.network.hardware.nodes.network.switch import Switch +from primaite.simulator.network.hardware.nodes.network.wireless_router import WirelessRouter from primaite.simulator.network.nmne import set_nmne_config from primaite.simulator.network.transmission.transport_layer import Port from primaite.simulator.sim_container import Simulation @@ -273,8 +274,18 @@ class PrimaiteGame: new_node = Router.from_config(node_cfg) elif n_type == "firewall": new_node = Firewall.from_config(node_cfg) + elif n_type == "wireless_router": + new_node = WirelessRouter.from_config(node_cfg) + elif n_type == "printer": + new_node = Printer( + hostname=node_cfg["hostname"], + ip_address=node_cfg["ip_address"], + subnet_mask=node_cfg["subnet_mask"], + ) else: - _LOGGER.warning(f"invalid node type {n_type} in config") + msg = f"invalid node type {n_type} in config" + _LOGGER.error(msg) + raise ValueError(msg) if "services" in node_cfg: for service_cfg in node_cfg["services"]: new_service = None diff --git a/src/primaite/simulator/network/hardware/nodes/host/server.py b/src/primaite/simulator/network/hardware/nodes/host/server.py index 9f5157ad..593cd0dd 100644 --- a/src/primaite/simulator/network/hardware/nodes/host/server.py +++ b/src/primaite/simulator/network/hardware/nodes/host/server.py @@ -28,3 +28,9 @@ class Server(HostNode): * Applications: * Web Browser """ + + +class Printer(HostNode): + """Printer? I don't even know her!.""" + + # TODO: Implement printer-specific behaviour diff --git a/tests/assets/configs/test_primaite_session.yaml b/tests/assets/configs/test_primaite_session.yaml index 121cc7f1..f4ae4783 100644 --- a/tests/assets/configs/test_primaite_session.yaml +++ b/tests/assets/configs/test_primaite_session.yaml @@ -681,6 +681,12 @@ simulation: - ref: client_2_dns_client type: DNSClient + - ref: HP_LaserJet_Pro_4102fdn_printer + type: printer + hostname: HP_LaserJet_Pro_4102fdn_printer + ip_address: 192.168.10.99 + subnet_mask: 255.255.255.0 + links: - ref: router_1___switch_1 endpoint_a_ref: router_1 diff --git a/tests/e2e_integration_tests/test_primaite_session.py b/tests/e2e_integration_tests/test_primaite_session.py index c45a4690..7febe39a 100644 --- a/tests/e2e_integration_tests/test_primaite_session.py +++ b/tests/e2e_integration_tests/test_primaite_session.py @@ -29,7 +29,7 @@ class TestPrimaiteSession: assert session.env assert session.env.game.simulation.network - assert len(session.env.game.simulation.network.nodes) == 10 + assert len(session.env.game.simulation.network.nodes) == 11 @pytest.mark.skip(reason="Session is not being maintained and will be removed in the subsequent beta release.") @pytest.mark.parametrize("temp_primaite_session", [[CFG_PATH]], indirect=True) From 128e2227d6068dd642c66893638d48b33c2d6b0d Mon Sep 17 00:00:00 2001 From: Cristian-VM2 Date: Tue, 26 Mar 2024 12:39:11 +0000 Subject: [PATCH 035/124] #2404 add missing test and revert some name changes --- benchmark/config/benchmark_training_config.yaml | 2 +- .../results/v2.0.0/v2.0.0_benchmark_metadata.json | 2 +- .../simulator/system/applications/application.py | 2 +- .../_system/_applications/test_database_client.py | 13 +++++++++++++ 4 files changed, 16 insertions(+), 3 deletions(-) diff --git a/benchmark/config/benchmark_training_config.yaml b/benchmark/config/benchmark_training_config.yaml index 17811586..02b6377c 100644 --- a/benchmark/config/benchmark_training_config.yaml +++ b/benchmark/config/benchmark_training_config.yaml @@ -158,7 +158,7 @@ green_ier_blocked: -0.001 # Patching / Reset durations os_patching_duration: 5 # The time taken to patch the OS node_reset_duration: 5 # The time taken to reset a node (hardware) -service_fixing_duration: 5 # The time taken to patch a service +service_patching_duration: 5 # The time taken to patch a service file_system_repairing_limit: 5 # The time take to repair the file system file_system_restoring_limit: 5 # The time take to restore the file system file_system_scanning_limit: 5 # The time taken to scan the file system diff --git a/benchmark/results/v2.0.0/v2.0.0_benchmark_metadata.json b/benchmark/results/v2.0.0/v2.0.0_benchmark_metadata.json index 3ed57745..b2745967 100644 --- a/benchmark/results/v2.0.0/v2.0.0_benchmark_metadata.json +++ b/benchmark/results/v2.0.0/v2.0.0_benchmark_metadata.json @@ -5634,7 +5634,7 @@ "green_ier_blocked": -0.001, "os_patching_duration": 5, "node_reset_duration": 5, - "service_fixing_duration": 5, + "service_patching_duration": 5, "file_system_repairing_limit": 5, "file_system_restoring_limit": 5, "file_system_scanning_limit": 5 diff --git a/src/primaite/simulator/system/applications/application.py b/src/primaite/simulator/system/applications/application.py index 4ea893e0..617fdc23 100644 --- a/src/primaite/simulator/system/applications/application.py +++ b/src/primaite/simulator/system/applications/application.py @@ -117,7 +117,7 @@ class Application(IOSoftware): """The main application loop.""" pass - def close(self) -> None: + def close(self) -> bool: """Close the Application.""" if self.operating_state == ApplicationOperatingState.RUNNING: self.sys_log.info(f"Closed Application{self.name}") diff --git a/tests/unit_tests/_primaite/_simulator/_system/_applications/test_database_client.py b/tests/unit_tests/_primaite/_simulator/_system/_applications/test_database_client.py index b9b43b25..5098fcde 100644 --- a/tests/unit_tests/_primaite/_simulator/_system/_applications/test_database_client.py +++ b/tests/unit_tests/_primaite/_simulator/_system/_applications/test_database_client.py @@ -111,6 +111,19 @@ def test_query_when_client_is_closed(database_client_on_computer): assert database_client.query(sql="test") is False +def test_query_fail_to_connect(database_client_on_computer): + """Database client query should return False if the connect attempt fails.""" + database_client, computer = database_client_on_computer + + def return_false(): + return False + + database_client.connect = return_false + database_client.connected = False + + assert database_client.query(sql="test") is False + + def test_client_receives_response_when_closed(database_client_on_computer): """Database client receive should return False when it is closed.""" database_client, computer = database_client_on_computer From 53126e79dfe793547be0f34826a2f1e88cb7d7ab Mon Sep 17 00:00:00 2001 From: Cristian-VM2 Date: Tue, 26 Mar 2024 12:43:45 +0000 Subject: [PATCH 036/124] #2404 remove extra code in test_query_when_client_is_closed --- .../_system/_applications/test_database_client.py | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/tests/unit_tests/_primaite/_simulator/_system/_applications/test_database_client.py b/tests/unit_tests/_primaite/_simulator/_system/_applications/test_database_client.py index 5098fcde..5f10ec96 100644 --- a/tests/unit_tests/_primaite/_simulator/_system/_applications/test_database_client.py +++ b/tests/unit_tests/_primaite/_simulator/_system/_applications/test_database_client.py @@ -99,17 +99,6 @@ def test_query_when_client_is_closed(database_client_on_computer): assert database_client.query(sql="test") is False - """Database client query should return False if the connect attempt fails.""" - database_client, computer = database_client_on_computer - - def return_false(): - return False - - database_client.connect = return_false - database_client.connected = False - - assert database_client.query(sql="test") is False - def test_query_fail_to_connect(database_client_on_computer): """Database client query should return False if the connect attempt fails.""" From b3c1b6b7a5e40ac1a06d9b896d89fadd8f39604c Mon Sep 17 00:00:00 2001 From: Cristian-VM2 Date: Tue, 26 Mar 2024 12:52:16 +0000 Subject: [PATCH 037/124] #2404 quick fix for failing test_query_fail_to_connect --- .../_simulator/_system/_applications/test_database_client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/unit_tests/_primaite/_simulator/_system/_applications/test_database_client.py b/tests/unit_tests/_primaite/_simulator/_system/_applications/test_database_client.py index 5f10ec96..4d964fa1 100644 --- a/tests/unit_tests/_primaite/_simulator/_system/_applications/test_database_client.py +++ b/tests/unit_tests/_primaite/_simulator/_system/_applications/test_database_client.py @@ -104,7 +104,7 @@ def test_query_fail_to_connect(database_client_on_computer): """Database client query should return False if the connect attempt fails.""" database_client, computer = database_client_on_computer - def return_false(): + def return_false(**kwargs): return False database_client.connect = return_false From dca26b832db8a0674a87df4409eab286c5362890 Mon Sep 17 00:00:00 2001 From: Marek Wolan Date: Tue, 26 Mar 2024 13:21:22 +0000 Subject: [PATCH 038/124] #2418 Fix wireless router from config --- .../network/hardware/nodes/network/router.py | 2 +- .../hardware/nodes/network/wireless_router.py | 69 ++++++++++++++++++- .../assets/configs/test_primaite_session.yaml | 27 ++++++++ .../test_primaite_session.py | 9 ++- 4 files changed, 103 insertions(+), 4 deletions(-) diff --git a/src/primaite/simulator/network/hardware/nodes/network/router.py b/src/primaite/simulator/network/hardware/nodes/network/router.py index d2b47c1a..de308547 100644 --- a/src/primaite/simulator/network/hardware/nodes/network/router.py +++ b/src/primaite/simulator/network/hardware/nodes/network/router.py @@ -1418,7 +1418,7 @@ class Router(NetworkNode): :return: Configured router. :rtype: Router """ - router = Router( + router = cls( hostname=cfg["hostname"], num_ports=int(cfg.get("num_ports", "5")), operating_state=NodeOperatingState.ON diff --git a/src/primaite/simulator/network/hardware/nodes/network/wireless_router.py b/src/primaite/simulator/network/hardware/nodes/network/wireless_router.py index 3e8d715f..4bd3d101 100644 --- a/src/primaite/simulator/network/hardware/nodes/network/wireless_router.py +++ b/src/primaite/simulator/network/hardware/nodes/network/wireless_router.py @@ -1,10 +1,14 @@ +from ipaddress import IPv4Address from typing import Any, Dict, Union from pydantic import validate_call from primaite.simulator.network.airspace import AirSpaceFrequency, IPWirelessNetworkInterface -from primaite.simulator.network.hardware.nodes.network.router import Router, RouterInterface +from primaite.simulator.network.hardware.node_operating_state import NodeOperatingState +from primaite.simulator.network.hardware.nodes.network.router import ACLAction, Router, RouterInterface from primaite.simulator.network.transmission.data_link_layer import Frame +from primaite.simulator.network.transmission.network_layer import IPProtocol +from primaite.simulator.network.transmission.transport_layer import Port from primaite.utils.validators import IPV4Address @@ -209,3 +213,66 @@ class WirelessRouter(Router): raise NotImplementedError( "Please use the 'configure_wireless_access_point' and 'configure_router_interface' functions." ) + + @classmethod + def from_config(cls, cfg: Dict) -> "WirelessRouter": + """Generate the wireless router from config. + + Schema: + - hostname (str): unique name for this router. + - router_interface (dict): The values should be another dict specifying + - ip_address (str) + - subnet_mask (str) + - wireless_access_point (dict): Dict with + - ip address, + - subnet mask, + - frequency, (string: either WIFI_2_4 or WIFI_5) + - acl (dict): Dict with integers from 1 - max_acl_rules as keys. The key defines the position within the ACL + where the rule will be added (lower number is resolved first). The values should describe valid ACL + Rules as: + - action (str): either PERMIT or DENY + - src_port (str, optional): the named port such as HTTP, HTTPS, or POSTGRES_SERVER + - dst_port (str, optional): the named port such as HTTP, HTTPS, or POSTGRES_SERVER + - protocol (str, optional): the named IP protocol such as ICMP, TCP, or UDP + - src_ip_address (str, optional): IP address octet written in base 10 + - dst_ip_address (str, optional): IP address octet written in base 10 + + :param cfg: Config dictionary + :type cfg: Dict + :return: WirelessRouter instance. + :rtype: WirelessRouter + """ + operating_state = ( + NodeOperatingState.ON if not (p := cfg.get("operating_state")) else NodeOperatingState[p.upper()] + ) + router = cls(hostname=cfg["hostname"], operating_state=operating_state) + if "router_interface" in cfg: + ip_address = cfg["router_interface"]["ip_address"] + subnet_mask = cfg["router_interface"]["subnet_mask"] + router.configure_router_interface(ip_address=ip_address, subnet_mask=subnet_mask) + if "wireless_access_point" in cfg: + ip_address = cfg["wireless_access_point"]["ip_address"] + subnet_mask = cfg["wireless_access_point"]["subnet_mask"] + frequency = AirSpaceFrequency[cfg["wireless_access_point"]["frequency"]] + router.configure_wireless_access_point(ip_address=ip_address, subnet_mask=subnet_mask, frequency=frequency) + + if "acl" in cfg: + for r_num, r_cfg in cfg["acl"].items(): + router.acl.add_rule( + action=ACLAction[r_cfg["action"]], + src_port=None if not (p := r_cfg.get("src_port")) else Port[p], + dst_port=None if not (p := r_cfg.get("dst_port")) else Port[p], + protocol=None if not (p := r_cfg.get("protocol")) else IPProtocol[p], + src_ip_address=r_cfg.get("src_ip"), + dst_ip_address=r_cfg.get("dst_ip"), + position=r_num, + ) + if "routes" in cfg: + for route in cfg.get("routes"): + router.route_table.add_route( + address=IPv4Address(route.get("address")), + subnet_mask=IPv4Address(route.get("subnet_mask", "255.255.255.0")), + next_hop_ip_address=IPv4Address(route.get("next_hop_ip_address")), + metric=float(route.get("metric", 0)), + ) + return router diff --git a/tests/assets/configs/test_primaite_session.yaml b/tests/assets/configs/test_primaite_session.yaml index f4ae4783..11db08a7 100644 --- a/tests/assets/configs/test_primaite_session.yaml +++ b/tests/assets/configs/test_primaite_session.yaml @@ -687,6 +687,33 @@ simulation: ip_address: 192.168.10.99 subnet_mask: 255.255.255.0 + - ref: router_2 + type: wireless_router + hostname: router_2 + router_interface: + ip_address: 192.169.1.1 + subnet_mask: 255.255.255.0 + wireless_access_point: + ip_address: 192.169.1.1 + subnet_mask: 255.255.255.0 + frequency: WIFI_2_4 + acl: + 0: + action: PERMIT + src_port: POSTGRES_SERVER + dst_port: POSTGRES_SERVER + 1: + action: PERMIT + src_port: DNS + dst_port: DNS + 22: + action: PERMIT + src_port: ARP + dst_port: ARP + 23: + action: PERMIT + protocol: ICMP + links: - ref: router_1___switch_1 endpoint_a_ref: router_1 diff --git a/tests/e2e_integration_tests/test_primaite_session.py b/tests/e2e_integration_tests/test_primaite_session.py index 7febe39a..32f134a3 100644 --- a/tests/e2e_integration_tests/test_primaite_session.py +++ b/tests/e2e_integration_tests/test_primaite_session.py @@ -1,6 +1,8 @@ import pydantic import pytest +from primaite.simulator.network.hardware.nodes.host.server import Printer +from primaite.simulator.network.hardware.nodes.network.wireless_router import WirelessRouter from tests import TEST_ASSETS_ROOT from tests.conftest import TempPrimaiteSession @@ -11,7 +13,6 @@ MISCONFIGURED_PATH = TEST_ASSETS_ROOT / "configs/bad_primaite_session.yaml" MULTI_AGENT_PATH = TEST_ASSETS_ROOT / "configs/multi_agent_session.yaml" -# @pytest.mark.skip(reason="no way of currently testing this") class TestPrimaiteSession: @pytest.mark.parametrize("temp_primaite_session", [[CFG_PATH]], indirect=True) def test_creating_session(self, temp_primaite_session): @@ -29,7 +30,11 @@ class TestPrimaiteSession: assert session.env assert session.env.game.simulation.network - assert len(session.env.game.simulation.network.nodes) == 11 + assert len(session.env.game.simulation.network.nodes) == 12 + wireless = session.env.game.simulation.network.get_node_by_hostname("router_2") + assert isinstance(wireless, WirelessRouter) + printer = session.env.game.simulation.network.get_node_by_hostname("HP_LaserJet_Pro_4102fdn_printer") + assert isinstance(printer, Printer) @pytest.mark.skip(reason="Session is not being maintained and will be removed in the subsequent beta release.") @pytest.mark.parametrize("temp_primaite_session", [[CFG_PATH]], indirect=True) From 0e90e6a262024a81411fc332c2fbd1767604831b Mon Sep 17 00:00:00 2001 From: Marek Wolan Date: Tue, 26 Mar 2024 16:23:39 +0000 Subject: [PATCH 039/124] #2418 - Change test config --- tests/assets/configs/test_primaite_session.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/assets/configs/test_primaite_session.yaml b/tests/assets/configs/test_primaite_session.yaml index 11db08a7..4adbb225 100644 --- a/tests/assets/configs/test_primaite_session.yaml +++ b/tests/assets/configs/test_primaite_session.yaml @@ -694,7 +694,7 @@ simulation: ip_address: 192.169.1.1 subnet_mask: 255.255.255.0 wireless_access_point: - ip_address: 192.169.1.1 + ip_address: 192.170.1.1 subnet_mask: 255.255.255.0 frequency: WIFI_2_4 acl: From 5860c74ef97c7378a78ad2f1e2f3a13a99b0bccf Mon Sep 17 00:00:00 2001 From: Cristian-VM2 Date: Tue, 26 Mar 2024 16:41:11 +0000 Subject: [PATCH 040/124] #2404 change software state from patching to fixing to align with CAOS v0.8 --- docs/source/about.rst | 22 +++++++++---------- .../Data-Manipulation-E2E-Demonstration.ipynb | 2 +- .../services/database/database_service.py | 2 +- src/primaite/simulator/system/software.py | 8 +++---- .../game_layer/test_actions.py | 12 +++++----- .../_applications/test_applications.py | 2 +- .../_system/_services/test_service_actions.py | 4 ++-- .../_system/_services/test_services.py | 4 ++-- 8 files changed, 28 insertions(+), 28 deletions(-) diff --git a/docs/source/about.rst b/docs/source/about.rst index 3f905933..782103d6 100644 --- a/docs/source/about.rst +++ b/docs/source/about.rst @@ -41,11 +41,11 @@ The game layer is built on top of the simulator and it consumes the simulation a * Hardware State (ON, OFF, RESETTING, SHUTTING_DOWN, BOOTING - enumeration) Active Nodes also have the following attributes (Class: Active Node): * IP Address - * Software State (GOOD, PATCHING, COMPROMISED - enumeration) + * Software State (GOOD, FIXING, COMPROMISED - enumeration) * File System State (GOOD, CORRUPT, DESTROYED, REPAIRING, RESTORING - enumeration) Service Nodes also have the following attributes (Class: Service Node): * List of Services (where service is composed of service name and port). There is no theoretical limit on the number of services that can be modelled. Services and protocols are currently intrinsically linked (i.e. a service is an application on a node transmitting traffic of this protocol type) - * Service state (GOOD, PATCHING, COMPROMISED, OVERWHELMED - enumeration) + * Service state (GOOD, FIXING, COMPROMISED, OVERWHELMED - enumeration) Passive Nodes are currently not used (but may be employed for non IP-based components such as machinery actuators in future releases). **Links** Links are modelled both as network edges (networkx) and as Python classes, in order to extend their functionality. Links include the following attributes: @@ -70,8 +70,8 @@ The game layer is built on top of the simulator and it consumes the simulation a * Running status (i.e. on / off) The application of green agent IERs between a source and destination follows a number of rules. Specifically: 1. Does the current simulation time step fall between IER start and end step - 2. Is the source node operational (both physically and at an O/S level), and is the service (protocol / port) associated with the IER (a) present on this node, and (b) in an operational state (i.e. not PATCHING) - 3. Is the destination node operational (both physically and at an O/S level), and is the service (protocol / port) associated with the IER (a) present on this node, and (b) in an operational state (i.e. not PATCHING) + 2. Is the source node operational (both physically and at an O/S level), and is the service (protocol / port) associated with the IER (a) present on this node, and (b) in an operational state (i.e. not FIXING) + 3. Is the destination node operational (both physically and at an O/S level), and is the service (protocol / port) associated with the IER (a) present on this node, and (b) in an operational state (i.e. not FIXING) 4. Are there any Access Control List rules in place that prevent the application of this IER 5. Are all switches in the (OSPF) path between source and destination operational (both physically and at an O/S level) For red agent IERs, the application of IERs between a source and destination follows a number of subtly different rules. Specifically: @@ -95,7 +95,7 @@ The game layer is built on top of the simulator and it consumes the simulation a * Active Nodes and Service Nodes: * Software State: * GOOD - * PATCHING - when a status of patching is entered, the node will automatically exit this state after a number of steps (as defined by the osPatchingDuration configuration item) after which it returns to a GOOD state + * FIXING - when a status of FIXING is entered, the node will automatically exit this state after a number of steps (as defined by the osFIXINGDuration configuration item) after which it returns to a GOOD state * COMPROMISED * File System State: * GOOD @@ -106,7 +106,7 @@ The game layer is built on top of the simulator and it consumes the simulation a * Service Nodes only: * Service State (for any associated service): * GOOD - * PATCHING - when a status of patching is entered, the service will automatically exit this state after a number of steps (as defined by the servicePatchingDuration configuration item) after which it returns to a GOOD state + * FIXING - when a status of FIXING is entered, the service will automatically exit this state after a number of steps (as defined by the serviceFIXINGDuration configuration item) after which it returns to a GOOD state * COMPROMISED * OVERWHELMED Red agent pattern-of-life has an additional feature not found in the green pattern-of-life. This is the ability to influence the state of the attributes of a node via a number of different conditions: @@ -211,8 +211,8 @@ The game layer is built on top of the simulator and it consumes the simulation a Hardware State (1=ON, 2=OFF, 3=RESETTING, 4=SHUTTING_DOWN, 5=BOOTING) Operating System State (0=none, 1=GOOD, 2=PATCHING, 3=COMPROMISED) File System State (0=none, 1=GOOD, 2=CORRUPT, 3=DESTROYED, 4=REPAIRING, 5=RESTORING) - Service1/Protocol1 state (0=none, 1=GOOD, 2=PATCHING, 3=COMPROMISED) - Service2/Protocol2 state (0=none, 1=GOOD, 2=PATCHING, 3=COMPROMISED) + Service1/Protocol1 state (0=none, 1=GOOD, 2=FIXING, 3=COMPROMISED) + Service2/Protocol2 state (0=none, 1=GOOD, 2=FIXING, 3=COMPROMISED) ] (Note that each service available in the network is provided as a column, although not all nodes may utilise all services) For the links, the following statuses are represented: @@ -241,8 +241,8 @@ The game layer is built on top of the simulator and it consumes the simulation a hardware_state (0=none, 1=ON, 2=OFF, 3=RESETTING, 4=SHUTTING_DOWN, 5=BOOTING) software_state (0=none, 1=GOOD, 2=PATCHING, 3=COMPROMISED) file_system_state (0=none, 1=GOOD, 2=CORRUPT, 3=DESTROYED, 4=REPAIRING, 5=RESTORING) - service1_state (0=none, 1=GOOD, 2=PATCHING, 3=COMPROMISED) - service2_state (0=none, 1=GOOD, 2=PATCHING, 3=COMPROMISED) + service1_state (0=none, 1=GOOD, 2=FIXING, 3=COMPROMISED) + service2_state (0=none, 1=GOOD, 2=FIXING, 3=COMPROMISED) ] In a network with three nodes and two services, the full observation space would have 15 elements. It can be written with ``gym`` notation to indicate the number of discrete options for each of the elements of the observation space. For example: .. code-block:: @@ -278,7 +278,7 @@ The game layer is built on top of the simulator and it consumes the simulation a 3. Any (Agent can take both node-based and ACL-based actions) The choice of action space used during a training session is determined in the config_[name].yaml file. **Node-Based** - The agent is able to influence the status of nodes by switching them off, resetting, or patching operating systems and services. In this instance, the action space is a Gymnasium spaces.Discrete type, as follows: + The agent is able to influence the status of nodes by switching them off, resetting, or FIXING operating systems and services. In this instance, the action space is a Gymnasium spaces.Discrete type, as follows: * Dictionary item {... ,1: [x1, x2, x3,x4] ...} The placeholders inside the list under the key '1' mean the following: * [0, num nodes] - Node ID (0 = nothing, node ID) diff --git a/src/primaite/notebooks/Data-Manipulation-E2E-Demonstration.ipynb b/src/primaite/notebooks/Data-Manipulation-E2E-Demonstration.ipynb index 7ec58b2c..ebe0f329 100644 --- a/src/primaite/notebooks/Data-Manipulation-E2E-Demonstration.ipynb +++ b/src/primaite/notebooks/Data-Manipulation-E2E-Demonstration.ipynb @@ -520,7 +520,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "The patching takes two steps, so the reward hasn't changed yet. Let's do nothing for another timestep, the reward should improve.\n", + "The fixing takes two steps, so the reward hasn't changed yet. Let's do nothing for another timestep, the reward should improve.\n", "\n", "The reward will increase slightly as soon as the file finishes restoring. Then, the reward will increase to 1 when both green agents make successful requests.\n", "\n", diff --git a/src/primaite/simulator/system/services/database/database_service.py b/src/primaite/simulator/system/services/database/database_service.py index 411359a2..541a15c2 100644 --- a/src/primaite/simulator/system/services/database/database_service.py +++ b/src/primaite/simulator/system/services/database/database_service.py @@ -305,7 +305,7 @@ class DatabaseService(Service): return super().apply_timestep(timestep) def _update_fix_status(self) -> None: - """Perform a database restore when the patching countdown is finished.""" + """Perform a database restore when the FIXING countdown is finished.""" super()._update_fix_status() if self._fixing_countdown is None: self.restore_backup() diff --git a/src/primaite/simulator/system/software.py b/src/primaite/simulator/system/software.py index 9b54f802..ab60adde 100644 --- a/src/primaite/simulator/system/software.py +++ b/src/primaite/simulator/system/software.py @@ -43,8 +43,8 @@ class SoftwareHealthState(Enum): "Unused state." GOOD = 1 "The software is in a good and healthy condition." - PATCHING = 2 - "The software is undergoing patching or updates." + FIXING = 2 + "The software is undergoing FIXING or updates." COMPROMISED = 3 "The software's security has been compromised." OVERWHELMED = 4 @@ -198,7 +198,7 @@ class Software(SimComponent): """Perform a fix on the software.""" if self.health_state_actual in (SoftwareHealthState.COMPROMISED, SoftwareHealthState.GOOD): self._fixing_countdown = self.fixing_duration - self.set_health_state(SoftwareHealthState.PATCHING) + self.set_health_state(SoftwareHealthState.FIXING) return True return False @@ -221,7 +221,7 @@ class Software(SimComponent): :param timestep: The current timestep of the simulation. """ super().apply_timestep(timestep) - if self.health_state_actual == SoftwareHealthState.PATCHING: + if self.health_state_actual == SoftwareHealthState.FIXING: self._update_fix_status() diff --git a/tests/integration_tests/game_layer/test_actions.py b/tests/integration_tests/game_layer/test_actions.py index 5aa93e27..b3a52cd8 100644 --- a/tests/integration_tests/game_layer/test_actions.py +++ b/tests/integration_tests/game_layer/test_actions.py @@ -69,7 +69,7 @@ def test_node_service_fix_integration(game_and_agent: Tuple[PrimaiteGame, ProxyA """ Test that the NodeServiceFixAction can form a request and that it is accepted by the simulation. - When you initiate a patch action, the software health state turns to PATCHING, then after a few steps, it goes + When you initiate a patch action, the software health state turns to FIXING, then after a few steps, it goes to GOOD. """ game, agent = game_and_agent @@ -83,8 +83,8 @@ def test_node_service_fix_integration(game_and_agent: Tuple[PrimaiteGame, ProxyA agent.store_action(action) game.step() - # 3: Check that the service is now in the patching state - assert svc.health_state_actual == SoftwareHealthState.PATCHING + # 3: Check that the service is now in the FIXING state + assert svc.health_state_actual == SoftwareHealthState.FIXING # 4: perform a few do-nothing steps and check that the service is now in the good state action = ("DONOTHING", {}) @@ -413,7 +413,7 @@ def test_node_application_scan_integration(game_and_agent: Tuple[PrimaiteGame, P def test_node_application_fix_integration(game_and_agent: Tuple[PrimaiteGame, ProxyAgent]): """Test that the NodeApplicationFixAction can form a request and that it is accepted by the simulation. - When you initiate a fix action, the software health state turns to PATCHING, then after a few steps, it goes + When you initiate a fix action, the software health state turns to FIXING, then after a few steps, it goes to GOOD.""" game, agent = game_and_agent @@ -428,8 +428,8 @@ def test_node_application_fix_integration(game_and_agent: Tuple[PrimaiteGame, Pr agent.store_action(action) game.step() - # 3: Check that the application is now in the patching state - assert browser.health_state_actual == SoftwareHealthState.PATCHING + # 3: Check that the application is now in the FIXING state + assert browser.health_state_actual == SoftwareHealthState.FIXING # 4: perform a few do-nothing steps and check that the application is now in the good state action = ("DONOTHING", {}) diff --git a/tests/unit_tests/_primaite/_simulator/_system/_applications/test_applications.py b/tests/unit_tests/_primaite/_simulator/_system/_applications/test_applications.py index fbdd9bef..90c3f303 100644 --- a/tests/unit_tests/_primaite/_simulator/_system/_applications/test_applications.py +++ b/tests/unit_tests/_primaite/_simulator/_system/_applications/test_applications.py @@ -47,4 +47,4 @@ def test_application_describe_states(application): assert SoftwareHealthState.COMPROMISED.value == application.describe_state().get("health_state_actual") application.fix() - assert SoftwareHealthState.PATCHING.value == application.describe_state().get("health_state_actual") + assert SoftwareHealthState.FIXING.value == application.describe_state().get("health_state_actual") diff --git a/tests/unit_tests/_primaite/_simulator/_system/_services/test_service_actions.py b/tests/unit_tests/_primaite/_simulator/_system/_services/test_service_actions.py index dd2d7752..edc111e3 100644 --- a/tests/unit_tests/_primaite/_simulator/_system/_services/test_service_actions.py +++ b/tests/unit_tests/_primaite/_simulator/_system/_services/test_service_actions.py @@ -86,8 +86,8 @@ def test_service_fix(service): assert service.health_state_actual == SoftwareHealthState.GOOD service.apply_request(["fix"]) - assert service.health_state_actual == SoftwareHealthState.PATCHING + assert service.health_state_actual == SoftwareHealthState.FIXING service.apply_timestep(1) - assert service.health_state_actual == SoftwareHealthState.PATCHING + assert service.health_state_actual == SoftwareHealthState.FIXING service.apply_timestep(2) assert service.health_state_actual == SoftwareHealthState.GOOD diff --git a/tests/unit_tests/_primaite/_simulator/_system/_services/test_services.py b/tests/unit_tests/_primaite/_simulator/_system/_services/test_services.py index 59d9499b..4deeef74 100644 --- a/tests/unit_tests/_primaite/_simulator/_system/_services/test_services.py +++ b/tests/unit_tests/_primaite/_simulator/_system/_services/test_services.py @@ -93,7 +93,7 @@ def test_restart_compromised(service): """ Service should be compromised even after reset. - Only way to remove compromised status is via patching. + Only way to remove compromised status is via FIXING. """ timestep = 0 @@ -143,7 +143,7 @@ def test_service_fixing(service): service.set_health_state(SoftwareHealthState.COMPROMISED) service.fix() - assert service.health_state_actual == SoftwareHealthState.PATCHING + assert service.health_state_actual == SoftwareHealthState.FIXING for i in range(service.fixing_duration + 1): service.apply_timestep(i) From 94e637375d73c830435bdebfcc63dabe46a16143 Mon Sep 17 00:00:00 2001 From: Cristian-VM2 Date: Tue, 26 Mar 2024 17:02:51 +0000 Subject: [PATCH 041/124] #2404 update software state to fixing in UC2 e2e notebook [skip ci] --- .../notebooks/Data-Manipulation-E2E-Demonstration.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/primaite/notebooks/Data-Manipulation-E2E-Demonstration.ipynb b/src/primaite/notebooks/Data-Manipulation-E2E-Demonstration.ipynb index ebe0f329..60d40f9c 100644 --- a/src/primaite/notebooks/Data-Manipulation-E2E-Demonstration.ipynb +++ b/src/primaite/notebooks/Data-Manipulation-E2E-Demonstration.ipynb @@ -208,7 +208,7 @@ "|--|--|\n", "|0|UNUSED|\n", "|1|GOOD|\n", - "|2|PATCHING|\n", + "|2|FIXING|\n", "|3|COMPROMISED|\n", "|4|OVERWHELMED|\n", "\n", From 9a8a42f3ecf8ee57b09de465d26e91b494e98c73 Mon Sep 17 00:00:00 2001 From: Marek Wolan Date: Tue, 26 Mar 2024 21:48:17 +0000 Subject: [PATCH 042/124] #2418 - add wildcard masks and from_config tests to routers --- .../network/hardware/nodes/network/router.py | 2 + .../hardware/nodes/network/wireless_router.py | 2 + .../_network/_hardware/nodes/test_router.py | 111 ++++++++++++++++++ .../_hardware/nodes/test_wireless_router.py | 97 +++++++++++++++ 4 files changed, 212 insertions(+) create mode 100644 tests/unit_tests/_primaite/_simulator/_network/_hardware/nodes/test_router.py create mode 100644 tests/unit_tests/_primaite/_simulator/_network/_hardware/nodes/test_wireless_router.py diff --git a/src/primaite/simulator/network/hardware/nodes/network/router.py b/src/primaite/simulator/network/hardware/nodes/network/router.py index de308547..102eb7dc 100644 --- a/src/primaite/simulator/network/hardware/nodes/network/router.py +++ b/src/primaite/simulator/network/hardware/nodes/network/router.py @@ -1441,6 +1441,8 @@ class Router(NetworkNode): protocol=None if not (p := r_cfg.get("protocol")) else IPProtocol[p], src_ip_address=r_cfg.get("src_ip"), dst_ip_address=r_cfg.get("dst_ip"), + src_wildcard_mask=r_cfg.get("src_wildcard_mask"), + dst_wildcard_mask=r_cfg.get("dst_wildcard_mask"), position=r_num, ) if "routes" in cfg: diff --git a/src/primaite/simulator/network/hardware/nodes/network/wireless_router.py b/src/primaite/simulator/network/hardware/nodes/network/wireless_router.py index 4bd3d101..62332269 100644 --- a/src/primaite/simulator/network/hardware/nodes/network/wireless_router.py +++ b/src/primaite/simulator/network/hardware/nodes/network/wireless_router.py @@ -265,6 +265,8 @@ class WirelessRouter(Router): protocol=None if not (p := r_cfg.get("protocol")) else IPProtocol[p], src_ip_address=r_cfg.get("src_ip"), dst_ip_address=r_cfg.get("dst_ip"), + src_wildcard_mask=r_cfg.get("src_wildcard_mask"), + dst_wildcard_mask=r_cfg.get("dst_wildcard_mask"), position=r_num, ) if "routes" in cfg: diff --git a/tests/unit_tests/_primaite/_simulator/_network/_hardware/nodes/test_router.py b/tests/unit_tests/_primaite/_simulator/_network/_hardware/nodes/test_router.py new file mode 100644 index 00000000..be74a721 --- /dev/null +++ b/tests/unit_tests/_primaite/_simulator/_network/_hardware/nodes/test_router.py @@ -0,0 +1,111 @@ +from ipaddress import IPv4Address + +from primaite.simulator.network.hardware.nodes.network.router import ACLAction, Router +from primaite.simulator.network.transmission.network_layer import IPProtocol +from primaite.simulator.network.transmission.transport_layer import Port + + +def test_wireless_router_from_config(): + cfg = { + "ref": "router_1", + "type": "router", + "hostname": "router_1", + "num_ports": 6, + "ports": { + 1: { + "ip_address": "192.168.1.1", + "subnet_mask": "255.255.255.0", + }, + 2: { + "ip_address": "192.168.2.1", + "subnet_mask": "255.255.255.0", + }, + }, + "acl": { + 0: { + "action": "PERMIT", + "src_port": "POSTGRES_SERVER", + "dst_port": "POSTGRES_SERVER", + }, + 1: { + "action": "PERMIT", + "protocol": "ICMP", + }, + 2: { + "action": "PERMIT", + "src_ip": "100.100.100.1", + "dst_ip": "100.100.101.1", + }, + 3: { + "action": "PERMIT", + "src_ip": "100.100.102.0", + "dst_ip": "100.100.103.0", + "src_wildcard_mask": "0.0.0.255", + "dst_wildcard_mask": "0.0.0.255", + }, + 20: { + "action": "DENY", + }, + }, + } + + rt = Router.from_config(cfg=cfg) + + assert rt.num_ports == 6 + + assert rt.network_interface[1].ip_address == IPv4Address("192.168.1.1") + assert rt.network_interface[1].subnet_mask == IPv4Address("255.255.255.0") + + assert rt.network_interface[2].ip_address == IPv4Address("192.168.2.1") + assert rt.network_interface[2].subnet_mask == IPv4Address("255.255.255.0") + + assert not rt.network_interface[3].enabled + assert not rt.network_interface[4].enabled + assert not rt.network_interface[5].enabled + assert not rt.network_interface[6].enabled + + r0 = rt.acl.acl[0] + assert r0.action == ACLAction.PERMIT + assert r0.src_port == r0.dst_port == Port.POSTGRES_SERVER + assert r0.src_ip_address == r0.dst_ip_address == r0.dst_wildcard_mask == r0.src_wildcard_mask == r0.protocol == None + + r1 = rt.acl.acl[1] + assert r1.action == ACLAction.PERMIT + assert r1.protocol == IPProtocol.ICMP + assert ( + r1.src_ip_address + == r1.dst_ip_address + == r1.dst_wildcard_mask + == r1.src_wildcard_mask + == r1.src_port + == r1.dst_port + == None + ) + + r2 = rt.acl.acl[2] + assert r2.action == ACLAction.PERMIT + assert r2.src_ip_address == IPv4Address("100.100.100.1") + assert r2.dst_ip_address == IPv4Address("100.100.101.1") + assert r2.src_wildcard_mask == r2.dst_wildcard_mask == None + assert r2.src_port == r2.dst_port == r2.protocol == None + + r3 = rt.acl.acl[3] + assert r3.action == ACLAction.PERMIT + assert r3.src_ip_address == IPv4Address("100.100.102.0") + assert r3.dst_ip_address == IPv4Address("100.100.103.0") + assert r3.src_wildcard_mask == IPv4Address("0.0.0.255") + assert r3.dst_wildcard_mask == IPv4Address("0.0.0.255") + assert r3.src_port == r3.dst_port == r3.protocol == None + + r20 = rt.acl.acl[20] + assert r20.action == ACLAction.DENY + assert ( + r20.src_ip_address + == r20.dst_ip_address + == r20.src_wildcard_mask + == r20.dst_wildcard_mask + == r20.src_port + == r20.dst_port + == r20.protocol + == None + ) diff --git a/tests/unit_tests/_primaite/_simulator/_network/_hardware/nodes/test_wireless_router.py b/tests/unit_tests/_primaite/_simulator/_network/_hardware/nodes/test_wireless_router.py new file mode 100644 index 00000000..494f5a15 --- /dev/null +++ b/tests/unit_tests/_primaite/_simulator/_network/_hardware/nodes/test_wireless_router.py @@ -0,0 +1,97 @@ +from ipaddress import IPv4Address + +from primaite.simulator.network.hardware.nodes.network.router import ACLAction +from primaite.simulator.network.hardware.nodes.network.wireless_router import WirelessRouter +from primaite.simulator.network.transmission.network_layer import IPProtocol +from primaite.simulator.network.transmission.transport_layer import Port + + +def test_wireless_router_from_config(): + cfg = { + "ref": "router_2", + "type": "wireless_router", + "hostname": "router_2", + "router_interface": { + "ip_address": "192.168.1.1", + "subnet_mask": "255.255.255.0", + }, + "wireless_access_point": { + "ip_address": "192.170.1.1", + "subnet_mask": "255.255.255.0", + "frequency": "WIFI_2_4", + }, + "acl": { + 0: { + "action": "PERMIT", + "src_port": "POSTGRES_SERVER", + "dst_port": "POSTGRES_SERVER", + }, + 1: { + "action": "PERMIT", + "protocol": "ICMP", + }, + 2: { + "action": "PERMIT", + "src_ip": "100.100.100.1", + "dst_ip": "100.100.101.1", + }, + 3: { + "action": "PERMIT", + "src_ip": "100.100.102.0", + "dst_ip": "100.100.103.0", + "src_wildcard_mask": "0.0.0.255", + "dst_wildcard_mask": "0.0.0.255", + }, + 20: { + "action": "DENY", + }, + }, + } + + rt = WirelessRouter.from_config(cfg=cfg) + + r0 = rt.acl.acl[0] + assert r0.action == ACLAction.PERMIT + assert r0.src_port == r0.dst_port == Port.POSTGRES_SERVER + assert r0.src_ip_address == r0.dst_ip_address == r0.dst_wildcard_mask == r0.src_wildcard_mask == r0.protocol == None + + r1 = rt.acl.acl[1] + assert r1.action == ACLAction.PERMIT + assert r1.protocol == IPProtocol.ICMP + assert ( + r1.src_ip_address + == r1.dst_ip_address + == r1.dst_wildcard_mask + == r1.src_wildcard_mask + == r1.src_port + == r1.dst_port + == None + ) + + r2 = rt.acl.acl[2] + assert r2.action == ACLAction.PERMIT + assert r2.src_ip_address == IPv4Address("100.100.100.1") + assert r2.dst_ip_address == IPv4Address("100.100.101.1") + assert r2.src_wildcard_mask == r2.dst_wildcard_mask == None + assert r2.src_port == r2.dst_port == r2.protocol == None + + r3 = rt.acl.acl[3] + assert r3.action == ACLAction.PERMIT + assert r3.src_ip_address == IPv4Address("100.100.102.0") + assert r3.dst_ip_address == IPv4Address("100.100.103.0") + assert r3.src_wildcard_mask == IPv4Address("0.0.0.255") + assert r3.dst_wildcard_mask == IPv4Address("0.0.0.255") + assert r3.src_port == r3.dst_port == r3.protocol == None + + r20 = rt.acl.acl[20] + assert r20.action == ACLAction.DENY + assert ( + r20.src_ip_address + == r20.dst_ip_address + == r20.src_wildcard_mask + == r20.dst_wildcard_mask + == r20.src_port + == r20.dst_port + == r20.protocol + == None + ) From 368542df03361a721fba64149174f626cf9e4637 Mon Sep 17 00:00:00 2001 From: Marek Wolan Date: Tue, 26 Mar 2024 21:51:27 +0000 Subject: [PATCH 043/124] #2418 - Add printer and wireless router as node types in network show --- src/primaite/simulator/network/container.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/primaite/simulator/network/container.py b/src/primaite/simulator/network/container.py index 0e970c3d..5ec47052 100644 --- a/src/primaite/simulator/network/container.py +++ b/src/primaite/simulator/network/container.py @@ -8,6 +8,7 @@ from prettytable import MARKDOWN, PrettyTable from primaite import getLogger from primaite.simulator.core import RequestManager, RequestType, SimComponent from primaite.simulator.network.hardware.base import Link, Node, WiredNetworkInterface +from primaite.simulator.network.hardware.nodes.host.server import Printer from primaite.simulator.system.applications.application import Application from primaite.simulator.system.services.service import Service @@ -110,6 +111,16 @@ class Network(SimComponent): """The Firewalls in the Network.""" return [node for node in self.nodes.values() if node.__class__.__name__ == "Firewall"] + @property + def printer_nodes(self) -> List[Node]: + """The printers on the network.""" + return [node for node in self.nodes.values() if isinstance(node, Printer)] + + @property + def wireless_router_nodes(self) -> List[Node]: + """The Routers in the Network.""" + return [node for node in self.nodes.values() if node.__class__.__name__ == "WirelessRouter"] + def show(self, nodes: bool = True, ip_addresses: bool = True, links: bool = True, markdown: bool = False): """ Print tables describing the Network. @@ -128,6 +139,8 @@ class Network(SimComponent): "Switch": self.switch_nodes, "Server": self.server_nodes, "Computer": self.computer_nodes, + "Printer": self.printer_nodes, + "Wireless Router": self.wireless_routers, } if nodes: table = PrettyTable(["Node", "Type", "Operating State"]) From 27bee58bf755cdaa555c998cc4bee6463fc56b3f Mon Sep 17 00:00:00 2001 From: Marek Wolan Date: Wed, 27 Mar 2024 00:00:06 +0000 Subject: [PATCH 044/124] #2418 Fix broken property --- src/primaite/simulator/network/container.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/primaite/simulator/network/container.py b/src/primaite/simulator/network/container.py index 5ec47052..a4079fb8 100644 --- a/src/primaite/simulator/network/container.py +++ b/src/primaite/simulator/network/container.py @@ -140,7 +140,7 @@ class Network(SimComponent): "Server": self.server_nodes, "Computer": self.computer_nodes, "Printer": self.printer_nodes, - "Wireless Router": self.wireless_routers, + "Wireless Router": self.wireless_router_nodes, } if nodes: table = PrettyTable(["Node", "Type", "Operating State"]) From fbb4eba6b74cbd766fc4c9ecb1bb19cc866c896e Mon Sep 17 00:00:00 2001 From: Marek Wolan Date: Wed, 27 Mar 2024 03:27:44 +0000 Subject: [PATCH 045/124] Draft new observation space config --- .../_package_data/data_manipulation.yaml | 49 +++++++++++++++++-- 1 file changed, 45 insertions(+), 4 deletions(-) diff --git a/src/primaite/config/_package_data/data_manipulation.yaml b/src/primaite/config/_package_data/data_manipulation.yaml index 12f60b63..06028ee1 100644 --- a/src/primaite/config/_package_data/data_manipulation.yaml +++ b/src/primaite/config/_package_data/data_manipulation.yaml @@ -176,13 +176,54 @@ agents: team: BLUE type: ProxyAgent + observation_space: + - type: NODES + label: NODES # What is the dictionary key called + options: + hosts: + - hostname: domain_controller + - hostname: web_server + - hostname: database_server + - hostname: backup_server + - hostname: security_suite + - hostname: client_1 + - hostname: client_2 + routers: + - hostname: router_1 + firewalls: {} + + num_host_services: 1 + num_host_applications: 0 + num_host_folders: 1 + num_host_files: 1 + num_host_network_interfaces: 2 + num_router_ports: 4 + num_acl_rules: 10 + num_firewall_ports: 4 + firewalls_internal_inbound_acl: true + firewalls_internal_outbound_acl: true + firewalls_dmz_inbound_acl: true + firewalls_dmz_outbound_acl: true + firewalls_external_inbound_acl: true + firewalls_external_outbound_acl: true + - type: LINKS + label: "LINKS" + options: + links: + - link_ref: router_1___switch_1 + - link_ref: router_1___switch_2 + - link_ref: switch_1___domain_controller + - link_ref: switch_1___web_server + - link_ref: switch_1___database_server + - link_ref: switch_1___backup_server + - link_ref: switch_1___security_suite + - link_ref: switch_2___client_1 + - link_ref: switch_2___client_2 + - link_ref: switch_2___security_suite + observation_space: type: UC2BlueObservation options: - num_services_per_node: 1 - num_folders_per_node: 1 - num_files_per_folder: 1 - num_nics_per_node: 2 nodes: - node_hostname: domain_controller services: From 8bb7f8a1775b8269c5d07ecb6b0969fb41a235e7 Mon Sep 17 00:00:00 2001 From: Cristian-VM2 Date: Wed, 27 Mar 2024 17:07:12 +0000 Subject: [PATCH 046/124] #2405 add application install and remove actions --- src/primaite/game/agent/actions.py | 46 +++++++ .../simulator/network/hardware/base.py | 121 +++++++++++++++++- src/primaite/simulator/system/software.py | 2 +- tests/conftest.py | 12 +- .../game_layer/test_actions.py | 26 ++++ 5 files changed, 203 insertions(+), 4 deletions(-) diff --git a/src/primaite/game/agent/actions.py b/src/primaite/game/agent/actions.py index b79fc985..7c31ae7e 100644 --- a/src/primaite/game/agent/actions.py +++ b/src/primaite/game/agent/actions.py @@ -219,6 +219,50 @@ class NodeApplicationFixAction(NodeApplicationAbstractAction): self.verb: str = "fix" +class NodeApplicationInstallAction(AbstractAction): + """Action which installs an application.""" + + def __init__( + self, manager: "ActionManager", num_nodes: int, application_name: str, ip_address: str, **kwargs + ) -> None: + super().__init__(manager=manager) + self.shape: Dict[str, int] = {"node_id": num_nodes} + self.application_name = application_name + self.ip_address = ip_address + + def form_request(self, node_id: int) -> List[str]: + """Return the action formatted as a request which can be ingested by the PrimAITE simulation.""" + node_name = self.manager.get_node_name_by_idx(node_id) + if node_name is None: + return ["do_nothing"] + return [ + "network", + "node", + node_name, + "software_manager", + "application", + "install", + self.application_name, + self.ip_address, + ] + + +class NodeApplicationRemoveAction(AbstractAction): + """Action which removes/uninstalls an application.""" + + def __init__(self, manager: "ActionManager", num_nodes: int, application_name: str, **kwargs) -> None: + super().__init__(manager=manager) + self.shape: Dict[str, int] = {"node_id": num_nodes} + self.application_name = application_name + + def form_request(self, node_id: int) -> List[str]: + """Return the action formatted as a request which can be ingested by the PrimAITE simulation.""" + node_name = self.manager.get_node_name_by_idx(node_id) + if node_name is None: + return ["do_nothing"] + return ["network", "node", node_name, "software_manager", "application", "uninstall", self.application_name] + + class NodeFolderAbstractAction(AbstractAction): """ Base class for folder actions. @@ -658,6 +702,8 @@ class ActionManager: "NODE_APPLICATION_SCAN": NodeApplicationScanAction, "NODE_APPLICATION_CLOSE": NodeApplicationCloseAction, "NODE_APPLICATION_FIX": NodeApplicationFixAction, + "NODE_APPLICATION_INSTALL": NodeApplicationInstallAction, + "NODE_APPLICATION_REMOVE": NodeApplicationRemoveAction, "NODE_FILE_SCAN": NodeFileScanAction, "NODE_FILE_CHECKHASH": NodeFileCheckhashAction, "NODE_FILE_DELETE": NodeFileDeleteAction, diff --git a/src/primaite/simulator/network/hardware/base.py b/src/primaite/simulator/network/hardware/base.py index 38d20e1f..132fc8b1 100644 --- a/src/primaite/simulator/network/hardware/base.py +++ b/src/primaite/simulator/network/hardware/base.py @@ -5,7 +5,7 @@ import secrets from abc import ABC, abstractmethod from ipaddress import IPv4Address, IPv4Network from pathlib import Path -from typing import Any, Dict, Optional, Union +from typing import Any, Dict, Optional, Type, TypeVar, Union from prettytable import MARKDOWN, PrettyTable from pydantic import BaseModel, Field @@ -35,8 +35,11 @@ from primaite.simulator.system.core.software_manager import SoftwareManager from primaite.simulator.system.core.sys_log import SysLog from primaite.simulator.system.processes.process import Process from primaite.simulator.system.services.service import Service +from primaite.simulator.system.software import IOSoftware from primaite.utils.validators import IPV4Address +IOSoftwareClass = TypeVar("IOSoftwareClass", bound=IOSoftware) + _LOGGER = getLogger(__name__) @@ -843,12 +846,56 @@ class Node(SimComponent): ) rm.add_request("os", RequestType(func=self._os_request_manager, validator=_node_is_on)) + self._software_manager = RequestManager() + rm.add_request("software_manager", RequestType(func=self._software_manager, validator=_node_is_on)) + self._application_manager = RequestManager() + self._software_manager.add_request(name="application", request_type=RequestType(func=self._application_manager)) + + self._application_manager.add_request( + name="install", + request_type=RequestType( + func=lambda request, context: RequestResponse.from_bool( + self.application_install_action( + application=self._read_application_type(request[0]), ip_address=request[1] + ) + ) + ), + ) + + self._application_manager.add_request( + name="uninstall", + request_type=RequestType( + func=lambda request, context: RequestResponse.from_bool( + self.application_uninstall_action(application=self._read_application_type(request[0])) + ) + ), + ) + return rm def _install_system_software(self): """Install System Software - software that is usually provided with the OS.""" pass + def _read_application_type(self, application_class_str: str) -> Type[IOSoftwareClass]: + """Wrapper that converts the string from the request manager into the appropriate class for the application.""" + if application_class_str.lower() == "DoSBot".lower(): + from primaite.simulator.system.applications.red_applications.dos_bot import DoSBot + + return DoSBot + elif application_class_str.lower() == "DataManipulationBot".lower(): + from primaite.simulator.system.applications.red_applications.data_manipulation_bot import ( + DataManipulationBot, + ) + + return DataManipulationBot + elif application_class_str.lower() == "WebBrowser".lower(): + from primaite.simulator.system.applications.web_browser import WebBrowser + + return WebBrowser + else: + return 0 + def describe_state(self) -> Dict: """ Produce a dictionary describing the current state of this object. @@ -1257,6 +1304,78 @@ class Node(SimComponent): _LOGGER.info(f"Removed application {application.name} from node {self.hostname}") self._application_request_manager.remove_request(application.name) + def application_install_action(self, application: Application, ip_address: Optional[str] = None) -> bool: + """ + Install an application on this node and configure it. + + This method is useful for allowing agents to take this action. + + :param application: Application instance that has not been installed on any node yet. + :type application: Application + :parm + """ + if application in self: + _LOGGER.warning( + f"Can't add application {application.__name__}" + f"to node {self.hostname}. It's already installed." + ) + self.software_manager.install(application) + + application_instance = self.software_manager.software.get(str(application.__name__)) + self.applications[application_instance.uuid] = application_instance + application.parent = self + self.sys_log.info(f"Installed application {application.__name__}") + _LOGGER.debug(f"Added application {application.__name__} to node {self.hostname}") + self._application_request_manager.add_request( + application_instance.name, RequestType(func=application_instance._request_manager) + ) + + # Configure application if additional parameters are given + if ip_address: + from primaite.simulator.system.applications.red_applications.data_manipulation_bot import ( + DataManipulationBot, + ) + from primaite.simulator.system.applications.red_applications.dos_bot import DoSBot + + if application == DoSBot: + application_instance.configure(target_ip_address=IPv4Address(ip_address)) + elif application == DataManipulationBot: + application_instance.configure(server_ip_address=IPv4Address(ip_address)) + else: + pass + + if application in self: + return True + else: + return False + + def application_uninstall_action(self, application: Application) -> bool: + """ + Uninstall and completely remove application from this node. + + This method is useful for allowing agents to take this action. + + :param application: Application object that is currently associated with this node. + :type application: Application + """ + if application.__name__ not in self.software_manager.software: + _LOGGER.warning( + f"Can't remove application {application.__name__}" + f"from node {self.hostname}. It's not installed." + ) + return True + application_instance = self.software_manager.software.get( + str(application.__name__) + ) # This works because we can't have two applications with the same name on the same node + self.applications.pop(application_instance.uuid) + application.parent = None + self.sys_log.info(f"Uninstalled application {application.__name__}") + _LOGGER.info(f"Removed application {application.__name__} from node {self.hostname}") + self._application_request_manager.remove_request(application_instance.name) + self.software_manager.uninstall(application_instance.name) + if application_instance.name not in self.software_manager.software: + return True + else: + return False + def _shut_down_actions(self): """Actions to perform when the node is shut down.""" # Turn off all the services in the node diff --git a/src/primaite/simulator/system/software.py b/src/primaite/simulator/system/software.py index ab60adde..3ab32bc6 100644 --- a/src/primaite/simulator/system/software.py +++ b/src/primaite/simulator/system/software.py @@ -88,7 +88,7 @@ class Software(SimComponent): "The count of times the software has been scanned, defaults to 0." revealed_to_red: bool = False "Indicates if the software has been revealed to red agent, defaults is False." - software_manager: "SoftwareManager" = None + software_manager: Optional["SoftwareManager"] = None "An instance of Software Manager that is used by the parent node." sys_log: SysLog = None "An instance of SysLog that is used by the parent node." diff --git a/tests/conftest.py b/tests/conftest.py index 078a78bd..be76fc92 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -480,6 +480,8 @@ def game_and_agent(): {"type": "NODE_APPLICATION_SCAN"}, {"type": "NODE_APPLICATION_CLOSE"}, {"type": "NODE_APPLICATION_FIX"}, + {"type": "NODE_APPLICATION_INSTALL", "options": {"application_name": "DoSBot", "ip_address": "192.168.1.14"}}, + {"type": "NODE_APPLICATION_REMOVE", "options": {"application_name": "DoSBot"}}, {"type": "NODE_FILE_SCAN"}, {"type": "NODE_FILE_CHECKHASH"}, {"type": "NODE_FILE_DELETE"}, @@ -507,10 +509,16 @@ def game_and_agent(): nodes=[ { "node_name": "client_1", - "applications": [{"application_name": "WebBrowser"}], + "applications": [ + {"application_name": "WebBrowser"}, + {"application_name": "DoSBot"}, + ], "folders": [{"folder_name": "downloads", "files": [{"file_name": "cat.png"}]}], }, - {"node_name": "server_1", "services": [{"service_name": "DNSServer"}]}, + { + "node_name": "server_1", + "services": [{"service_name": "DNSServer"}], + }, {"node_name": "server_2", "services": [{"service_name": "WebServer"}]}, {"node_name": "router"}, ], diff --git a/tests/integration_tests/game_layer/test_actions.py b/tests/integration_tests/game_layer/test_actions.py index b3a52cd8..5ba58ee5 100644 --- a/tests/integration_tests/game_layer/test_actions.py +++ b/tests/integration_tests/game_layer/test_actions.py @@ -10,6 +10,7 @@ # 4. Check that the simulation has changed in the way that I expect. # 5. Repeat for all actions. +from ipaddress import IPv4Address from typing import Tuple import pytest @@ -455,3 +456,28 @@ def test_node_application_close_integration(game_and_agent: Tuple[PrimaiteGame, game.step() assert browser.operating_state == ApplicationOperatingState.CLOSED + + +def test_node_application_install_and_uninstall_integration(game_and_agent: Tuple[PrimaiteGame, ProxyAgent]): + """Test that the NodeApplicationInstallAction and NodeApplicationRemoveAction can form a request and that + it is accepted by the simulation. + + When you initiate a install action, the Application will be installed and configured on the node. + The remove action will uninstall the application from the node.""" + game, agent = game_and_agent + + client_1 = game.simulation.network.get_node_by_hostname("client_1") + + assert client_1.software_manager.software.get("DoSBot") is None + + action = ("NODE_APPLICATION_INSTALL", {"node_id": 0}) + agent.store_action(action) + game.step() + + assert client_1.software_manager.software.get("DoSBot") is not None + + action = ("NODE_APPLICATION_REMOVE", {"node_id": 0}) + agent.store_action(action) + game.step() + + assert client_1.software_manager.software.get("DoSBot") is None From cae9f64b93d62d1798fda00c6a20de6b19f25eb7 Mon Sep 17 00:00:00 2001 From: Marek Wolan Date: Wed, 27 Mar 2024 22:11:02 +0000 Subject: [PATCH 047/124] New observations --- .../agent/observations/agent_observations.py | 52 +- .../agent/observations/node_observations.py | 466 ++++++++++++++++- .../agent/observations/observation_manager.py | 20 +- .../game/agent/observations/observations.py | 490 +++++++++--------- src/primaite/game/agent/utils.py | 6 +- .../observations/test_node_observations.py | 2 +- 6 files changed, 727 insertions(+), 309 deletions(-) diff --git a/src/primaite/game/agent/observations/agent_observations.py b/src/primaite/game/agent/observations/agent_observations.py index 70a83881..2148697b 100644 --- a/src/primaite/game/agent/observations/agent_observations.py +++ b/src/primaite/game/agent/observations/agent_observations.py @@ -2,7 +2,7 @@ from typing import Dict, List, Optional, Tuple, TYPE_CHECKING from gymnasium import spaces -from primaite.game.agent.observations.node_observations import NodeObservation +from primaite.game.agent.observations.host import NodeObservation from primaite.game.agent.observations.observations import ( AbstractObservation, AclObservation, @@ -136,53 +136,3 @@ class UC2BlueObservation(AbstractObservation): new = cls(nodes=nodes, links=links, acl=acl, ics=ics, where=["network"]) return new - -class UC2RedObservation(AbstractObservation): - """Container for all observations used by the red agent in UC2.""" - - def __init__(self, nodes: List[NodeObservation], where: Optional[List[str]] = None) -> None: - super().__init__() - self.where: Optional[List[str]] = where - self.nodes: List[NodeObservation] = nodes - - self.default_observation: Dict = { - "NODES": {i + 1: n.default_observation for i, n in enumerate(self.nodes)}, - } - - def observe(self, state: Dict) -> Dict: - """Generate observation based on the current state of the simulation.""" - if self.where is None: - return self.default_observation - - obs = {} - obs["NODES"] = {i + 1: node.observe(state) for i, node in enumerate(self.nodes)} - return obs - - @property - def space(self) -> spaces.Space: - """Gymnasium space object describing the observation space shape.""" - return spaces.Dict( - { - "NODES": spaces.Dict({i + 1: node.space for i, node in enumerate(self.nodes)}), - } - ) - - @classmethod - def from_config(cls, config: Dict, game: "PrimaiteGame") -> "UC2RedObservation": - """ - Create UC2 red observation from a config. - - :param config: Dictionary containing the configuration for this UC2 red observation. - :type config: Dict - :param game: Reference to the PrimaiteGame object that spawned this observation. - :type game: PrimaiteGame - """ - node_configs = config["nodes"] - nodes = [NodeObservation.from_config(config=cfg, game=game) for cfg in node_configs] - return cls(nodes=nodes, where=["network"]) - - -class UC2GreenObservation(NullObservation): - """Green agent observation. As the green agent's actions don't depend on the observation, this is empty.""" - - pass diff --git a/src/primaite/game/agent/observations/node_observations.py b/src/primaite/game/agent/observations/node_observations.py index 94f0974b..42bdb749 100644 --- a/src/primaite/game/agent/observations/node_observations.py +++ b/src/primaite/game/agent/observations/node_observations.py @@ -1,21 +1,473 @@ -from typing import Dict, List, Optional, Tuple, TYPE_CHECKING +from __future__ import annotations +from typing import Any, Dict, Iterable, List, Literal, Optional, Tuple, TYPE_CHECKING, Union from gymnasium import spaces +from gymnasium.core import ObsType +from pydantic import BaseModel, ConfigDict from primaite import getLogger -from primaite.game.agent.observations.file_system_observations import FolderObservation -from primaite.game.agent.observations.nic_observations import NicObservation from primaite.game.agent.observations.observations import AbstractObservation -from primaite.game.agent.observations.software_observation import ServiceObservation +# from primaite.game.agent.observations.file_system_observations import FolderObservation +# from primaite.game.agent.observations.nic_observations import NicObservation +# from primaite.game.agent.observations.software_observation import ServiceObservation from primaite.game.agent.utils import access_from_nested_dict, NOT_PRESENT_IN_STATE _LOGGER = getLogger(__name__) -if TYPE_CHECKING: - from primaite.game.game import PrimaiteGame +WhereType = Iterable[str | int] | None -class NodeObservation(AbstractObservation): +class ServiceObservation(AbstractObservation, identifier="SERVICE"): + class ConfigSchema(AbstractObservation.ConfigSchema): + service_name: str + + def __init__(self, where: WhereType)->None: + self.where = where + self.default_observation = {"operating_status": 0, "health_status": 0} + + def observe(self, state: Dict) -> Any: + service_state = access_from_nested_dict(state, self.where) + if service_state is NOT_PRESENT_IN_STATE: + return self.default_observation + return { + "operating_status": service_state["operating_state"], + "health_status": service_state["health_state_visible"], + } + + @property + def space(self) -> spaces.Space: + """Gymnasium space object describing the observation space shape.""" + return spaces.Dict({"operating_status": spaces.Discrete(7), "health_status": spaces.Discrete(5)}) + + @classmethod + def from_config(cls, config: ConfigSchema, parent_where: WhereType = [] ) -> ServiceObservation: + return cls(where=parent_where+["services", config.service_name]) + + +class ApplicationObservation(AbstractObservation, identifier="APPLICATION"): + class ConfigSchema(AbstractObservation.ConfigSchema): + application_name: str + + def __init__(self, where: WhereType)->None: + self.where = where + self.default_observation = {"operating_status": 0, "health_status": 0, "num_executions": 0} + + def observe(self, state: Dict) -> Any: + # raise NotImplementedError("TODO NUM EXECUTIONS NEEDS TO BE CONVERTED TO A CATEGORICAL") + application_state = access_from_nested_dict(state, self.where) + if application_state is NOT_PRESENT_IN_STATE: + return self.default_observation + return { + "operating_status": application_state["operating_state"], + "health_status": application_state["health_state_visible"], + "num_executions": application_state["num_executions"], + } + + @property + def space(self) -> spaces.Space: + """Gymnasium space object describing the observation space shape.""" + return spaces.Dict({ + "operating_status": spaces.Discrete(7), + "health_status": spaces.Discrete(5), + "num_executions": spaces.Discrete(4) + }) + + @classmethod + def from_config(cls, config: ConfigSchema, parent_where: WhereType = [] ) -> ApplicationObservation: + return cls(where=parent_where+["applications", config.application_name]) + + +class FileObservation(AbstractObservation, identifier="FILE"): + class ConfigSchema(AbstractObservation.ConfigSchema): + file_name: str + include_num_access : bool = False + + def __init__(self, where: WhereType, include_num_access: bool)->None: + self.where: WhereType = where + self.include_num_access :bool = include_num_access + + self.default_observation: ObsType = {"health_status": 0} + if self.include_num_access: + self.default_observation["num_access"] = 0 + + def observe(self, state: Dict) -> Any: + file_state = access_from_nested_dict(state, self.where) + if file_state is NOT_PRESENT_IN_STATE: + return self.default_observation + obs = {"health_status": file_state["visible_status"]} + if self.include_num_access: + obs["num_access"] = file_state["num_access"] + # raise NotImplementedError("TODO: need to fix num_access to use thresholds instead of raw value.") + return obs + + @property + def space(self) -> spaces.Space: + space = {"health_status": spaces.Discrete(6)} + if self.include_num_access: + space["num_access"] = spaces.Discrete(4) + return spaces.Dict(space) + + @classmethod + def from_config(cls, config: ConfigSchema, parent_where: WhereType = [] ) -> FileObservation: + return cls(where=parent_where+["files", config.file_name], include_num_access=config.include_num_access) + + +class FolderObservation(AbstractObservation, identifier="FOLDER"): + class ConfigSchema(AbstractObservation.ConfigSchema): + folder_name: str + files: List[FileObservation.ConfigSchema] = [] + num_files : int = 0 + include_num_access : bool = False + + def __init__(self, where: WhereType, files: Iterable[FileObservation], num_files: int, include_num_access: bool)->None: + self.where: WhereType = where + + self.files: List[FileObservation] = files + while len(self.files) < num_files: + self.files.append(FileObservation(where=None,include_num_access=include_num_access)) + while len(self.files) > num_files: + truncated_file = self.files.pop() + msg = f"Too many files in folder observation. Truncating file {truncated_file}" + _LOGGER.warning(msg) + + self.default_observation = { + "health_status": 0, + "FILES": {i + 1: f.default_observation for i, f in enumerate(self.files)}, + } + + def observe(self, state: Dict) -> Any: + folder_state = access_from_nested_dict(state, self.where) + if folder_state is NOT_PRESENT_IN_STATE: + return self.default_observation + + health_status = folder_state["health_status"] + + obs = {} + + obs["health_status"] = health_status + obs["FILES"] = {i + 1: file.observe(state) for i, file in enumerate(self.files)} + + return obs + + @property + def space(self) -> spaces.Space: + """Gymnasium space object describing the observation space shape. + + :return: Gymnasium space + :rtype: spaces.Space + """ + return spaces.Dict( + { + "health_status": spaces.Discrete(6), + "FILES": spaces.Dict({i + 1: f.space for i, f in enumerate(self.files)}), + } + ) + @classmethod + def from_config(cls, config: ConfigSchema, parent_where: WhereType = [] ) -> FileObservation: + where = parent_where + ["folders", config.folder_name] + + #pass down shared/common config items + for file_config in config.files: + file_config.include_num_access = config.include_num_access + + files = [FileObservation.from_config(config=f, parent_where = where) for f in config.files] + return cls(where=where, files=files, num_files=config.num_files, include_num_access=config.include_num_access) + + +class NICObservation(AbstractObservation, identifier="NETWORK_INTERFACE"): + class ConfigSchema(AbstractObservation.ConfigSchema): + nic_num: int + include_nmne: bool = False + + + def __init__(self, where: WhereType, include_nmne: bool)->None: + self.where = where + self.include_nmne : bool = include_nmne + + self.default_observation: ObsType = {"nic_status": 0} + if self.include_nmne: + self.default_observation.update({"NMNE":{"inbound":0, "outbound":0}}) + + def observe(self, state: Dict) -> Any: + # raise NotImplementedError("TODO: CATEGORISATION") + nic_state = access_from_nested_dict(state, self.where) + + if nic_state is NOT_PRESENT_IN_STATE: + return self.default_observation + + obs = {"nic_status": 1 if nic_state["enabled"] else 2} + if self.include_nmne: + obs.update({"NMNE": {}}) + direction_dict = nic_state["nmne"].get("direction", {}) + inbound_keywords = direction_dict.get("inbound", {}).get("keywords", {}) + inbound_count = inbound_keywords.get("*", 0) + outbound_keywords = direction_dict.get("outbound", {}).get("keywords", {}) + outbound_count = outbound_keywords.get("*", 0) + obs["NMNE"]["inbound"] = self._categorise_mne_count(inbound_count - self.nmne_inbound_last_step) + obs["NMNE"]["outbound"] = self._categorise_mne_count(outbound_count - self.nmne_outbound_last_step) + self.nmne_inbound_last_step = inbound_count + self.nmne_outbound_last_step = outbound_count + return obs + + + @property + def space(self) -> spaces.Space: + space = spaces.Dict({"nic_status": spaces.Discrete(3)}) + + if self.include_nmne: + space["NMNE"] = spaces.Dict({"inbound": spaces.Discrete(4), "outbound": spaces.Discrete(4)}) + + return space + + @classmethod + def from_config(cls, config: ConfigSchema, parent_where: WhereType = [] ) -> ServiceObservation: + return cls(where = parent_where+["NICs", config.nic_num], include_nmne=config.include_nmne) + + +class HostObservation(AbstractObservation, identifier="HOST"): + class ConfigSchema(AbstractObservation.ConfigSchema): + hostname: str + services: List[ServiceObservation.ConfigSchema] = [] + applications: List[ApplicationObservation.ConfigSchema] = [] + folders: List[FolderObservation.ConfigSchema] = [] + network_interfaces: List[NICObservation.ConfigSchema] = [] + num_services: int + num_applications: int + num_folders: int + num_files: int + num_nics: int + include_nmne: bool + include_num_access: bool + + def __init__(self, + where: WhereType, + services:List[ServiceObservation], + applications:List[ApplicationObservation], + folders:List[FolderObservation], + network_interfaces:List[NICObservation], + num_services: int, + num_applications: int, + num_folders: int, + num_files: int, + num_nics: int, + include_nmne: bool, + include_num_access: bool + )->None: + + self.where : WhereType = where + + # ensure service list has length equal to num_services by truncating or padding + self.services: List[ServiceObservation] = services + while len(self.services) < num_services: + self.services.append(ServiceObservation(where=None)) + while len(self.services) > num_services: + truncated_service = self.services.pop() + msg = f"Too many services in Node observation space for node. Truncating service {truncated_service.where}" + _LOGGER.warning(msg) + + # ensure application list has length equal to num_applications by truncating or padding + self.applications: List[ApplicationObservation] = applications + while len(self.applications) < num_applications: + self.applications.append(ApplicationObservation(where=None)) + while len(self.applications) > num_applications: + truncated_application = self.applications.pop() + msg = f"Too many applications in Node observation space for node. Truncating application {truncated_application.where}" + _LOGGER.warning(msg) + + # ensure folder list has length equal to num_folders by truncating or padding + self.folders: List[FolderObservation] = folders + while len(self.folders) < num_folders: + self.folders.append(FolderObservation(where = None, files= [], num_files=num_files, include_num_access=include_num_access)) + while len(self.folders) > num_folders: + truncated_folder = self.folders.pop() + msg = f"Too many folders in Node observation space for node. Truncating folder {truncated_folder.where}" + _LOGGER.warning(msg) + + # ensure network_interface list has length equal to num_network_interfaces by truncating or padding + self.network_interfaces: List[NICObservation] = network_interfaces + while len(self.network_interfaces) < num_nics: + self.network_interfaces.append(NICObservation(where = None, include_nmne=include_nmne)) + while len(self.network_interfaces) > num_nics: + truncated_nic = self.network_interfaces.pop() + msg = f"Too many network_interfaces in Node observation space for node. Truncating {truncated_folder.where}" + _LOGGER.warning(msg) + + self.default_observation: ObsType = { + "SERVICES": {i + 1: s.default_observation for i, s in enumerate(self.services)}, + "FOLDERS": {i + 1: f.default_observation for i, f in enumerate(self.folders)}, + "NICS": {i + 1: n.default_observation for i, n in enumerate(self.network_interfaces)}, + "operating_status": 0, + "num_file_creations": 0, + "num_file_deletions": 0, + } + + + def observe(self, state: Dict) -> Any: + node_state = access_from_nested_dict(state, self.where) + if node_state is NOT_PRESENT_IN_STATE: + return self.default_observation + + obs = {} + obs["SERVICES"] = {i + 1: service.observe(state) for i, service in enumerate(self.services)} + obs["FOLDERS"] = {i + 1: folder.observe(state) for i, folder in enumerate(self.folders)} + obs["operating_status"] = node_state["operating_state"] + obs["NICS"] = { + i + 1: network_interface.observe(state) for i, network_interface in enumerate(self.network_interfaces) + } + obs["num_file_creations"] = node_state["file_system"]["num_file_creations"] + obs["num_file_deletions"] = node_state["file_system"]["num_file_deletions"] + return obs + + @property + def space(self) -> spaces.Space: + shape = { + "SERVICES": spaces.Dict({i + 1: service.space for i, service in enumerate(self.services)}), + "FOLDERS": spaces.Dict({i + 1: folder.space for i, folder in enumerate(self.folders)}), + "operating_status": spaces.Discrete(5), + "NICS": spaces.Dict( + {i + 1: network_interface.space for i, network_interface in enumerate(self.network_interfaces)} + ), + "num_file_creations" : spaces.Discrete(4), + "num_file_deletions" : spaces.Discrete(4), + } + return spaces.Dict(shape) + + @classmethod + def from_config(cls, config: ConfigSchema, parent_where: WhereType = None ) -> ServiceObservation: + if parent_where is None: + where = ["network", "nodes", config.hostname] + else: + where = parent_where + ["nodes", config.hostname] + + #pass down shared/common config items + for folder_config in config.folders: + folder_config.include_num_access = config.include_num_access + folder_config.num_files = config.num_files + for nic_config in config.network_interfaces: + nic_config.include_nmne = config.include_nmne + + services = [ServiceObservation.from_config(config=c,parent_where=where) for c in config.services] + applications = [ApplicationObservation.from_config(config=c, parent_where=where) for c in config.applications] + folders = [FolderObservation.from_config(config=c, parent_where=where) for c in config.folders] + nics = [NICObservation.from_config(config=c, parent_where=where) for c in config.network_interfaces] + + return cls( + where = where, + services = services, + applications = applications, + folders = folders, + network_interfaces = nics, + num_services = config.num_services, + num_applications = config.num_applications, + num_folders = config.num_folders, + num_files = config.num_files, + num_nics = config.num_nics, + include_nmne = config.include_nmne, + include_num_access = config.include_num_access, + ) + + +class PortObservation(AbstractObservation, identifier="PORT"): + class ConfigSchema(AbstractObservation.ConfigSchema): + pass + + def __init__(self, where: WhereType)->None: + pass + + def observe(self, state: Dict) -> Any: + pass + + @property + def space(self) -> spaces.Space: + pass + + @classmethod + def from_config(cls, config: ConfigSchema, parent_where: WhereType = [] ) -> ServiceObservation: + pass + +class ACLObservation(AbstractObservation, identifier="ACL"): + class ConfigSchema(AbstractObservation.ConfigSchema): + pass + + def __init__(self, where: WhereType)->None: + pass + + def observe(self, state: Dict) -> Any: + pass + + @property + def space(self) -> spaces.Space: + pass + + @classmethod + def from_config(cls, config: ConfigSchema, parent_where: WhereType = [] ) -> ServiceObservation: + pass + +class RouterObservation(AbstractObservation, identifier="ROUTER"): + class ConfigSchema(AbstractObservation.ConfigSchema): + hostname: str + ports: List[PortObservation.ConfigSchema] + + + def __init__(self, where: WhereType)->None: + pass + + def observe(self, state: Dict) -> Any: + pass + + @property + def space(self) -> spaces.Space: + pass + + @classmethod + def from_config(cls, config: ConfigSchema, parent_where: WhereType = [] ) -> ServiceObservation: + pass + +class FirewallObservation(AbstractObservation, identifier="FIREWALL"): + class ConfigSchema(AbstractObservation.ConfigSchema): + hostname: str + ports: List[PortObservation.ConfigSchema] = [] + + def __init__(self, where: WhereType)->None: + pass + + def observe(self, state: Dict) -> Any: + pass + + @property + def space(self) -> spaces.Space: + pass + + @classmethod + def from_config(cls, config: ConfigSchema, parent_where: WhereType = [] ) -> ServiceObservation: + pass + +class NodesObservation(AbstractObservation, identifier="NODES"): + class ConfigSchema(AbstractObservation.ConfigSchema): + """Config""" + hosts: List[HostObservation.ConfigSchema] = [] + routers: List[RouterObservation.ConfigSchema] = [] + firewalls: List[FirewallObservation.ConfigSchema] = [] + num_services: int = 1 + + + def __init__(self, where: WhereType)->None: + pass + + def observe(self, state: Dict) -> Any: + pass + + @property + def space(self) -> spaces.Space: + pass + + @classmethod + def from_config(cls, config: ConfigSchema, parent_where: WhereType = [] ) -> ServiceObservation: + pass + +############################ OLD + +class NodeObservation(AbstractObservation, identifier= "OLD"): """Observation of a node in the network. Includes services, folders and NICs.""" def __init__( diff --git a/src/primaite/game/agent/observations/observation_manager.py b/src/primaite/game/agent/observations/observation_manager.py index 400345fa..be90041e 100644 --- a/src/primaite/game/agent/observations/observation_manager.py +++ b/src/primaite/game/agent/observations/observation_manager.py @@ -2,11 +2,6 @@ from typing import Dict, TYPE_CHECKING from gymnasium.core import ObsType -from primaite.game.agent.observations.agent_observations import ( - UC2BlueObservation, - UC2GreenObservation, - UC2RedObservation, -) from primaite.game.agent.observations.observations import AbstractObservation if TYPE_CHECKING: @@ -63,11 +58,10 @@ class ObservationManager: :param game: Reference to the PrimaiteGame object that spawned this observation. :type game: PrimaiteGame """ - if config["type"] == "UC2BlueObservation": - return cls(UC2BlueObservation.from_config(config.get("options", {}), game=game)) - elif config["type"] == "UC2RedObservation": - return cls(UC2RedObservation.from_config(config.get("options", {}), game=game)) - elif config["type"] == "UC2GreenObservation": - return cls(UC2GreenObservation.from_config(config.get("options", {}), game=game)) - else: - raise ValueError("Observation space type invalid") + + for obs_cfg in config: + obs_type = obs_cfg['type'] + obs_class = AbstractObservation._registry[obs_type] + observation = obs_class.from_config(obs_class.ConfigSchema(**obs_cfg['options'])) + obs_manager = cls(observation) + return obs_manager \ No newline at end of file diff --git a/src/primaite/game/agent/observations/observations.py b/src/primaite/game/agent/observations/observations.py index 6236b00d..dc41e8e5 100644 --- a/src/primaite/game/agent/observations/observations.py +++ b/src/primaite/game/agent/observations/observations.py @@ -1,9 +1,10 @@ """Manages the observation space for the agent.""" from abc import ABC, abstractmethod from ipaddress import IPv4Address -from typing import Any, Dict, List, Optional, Tuple, TYPE_CHECKING +from typing import Any, Dict, List, Optional, Tuple, TYPE_CHECKING, Type from gymnasium import spaces +from pydantic import BaseModel, ConfigDict from primaite import getLogger from primaite.game.agent.utils import access_from_nested_dict, NOT_PRESENT_IN_STATE @@ -17,6 +18,28 @@ if TYPE_CHECKING: class AbstractObservation(ABC): """Abstract class for an observation space component.""" + class ConfigSchema(ABC, BaseModel): + model_config = ConfigDict(extra="forbid") + + _registry: Dict[str, Type["AbstractObservation"]] = {} + """Registry of observation components, with their name as key. + + Automatically populated when subclasses are defined. Used for defining from_config. + """ + + def __init_subclass__(cls, identifier: str, **kwargs: Any) -> None: + """ + Register an observation type. + + :param identifier: Identifier used to uniquely specify observation component types. + :type identifier: str + :raises ValueError: When attempting to create a component with a name that is already in use. + """ + super().__init_subclass__(**kwargs) + if identifier in cls._registry: + raise ValueError(f"Duplicate observation component type {identifier}") + cls._registry[identifier] = cls + @abstractmethod def observe(self, state: Dict) -> Any: """ @@ -36,274 +59,271 @@ class AbstractObservation(ABC): pass @classmethod - @abstractmethod - def from_config(cls, config: Dict, game: "PrimaiteGame"): - """Create this observation space component form a serialised format. - - The `game` parameter is for a the PrimaiteGame object that spawns this component. - """ - pass + def from_config(cls, cfg: Dict) -> "AbstractObservation": + """Create this observation space component form a serialised format.""" + ObservationType = cls._registry[cfg['type']] + return ObservationType.from_config(cfg=cfg) -class LinkObservation(AbstractObservation): - """Observation of a link in the network.""" +# class LinkObservation(AbstractObservation): +# """Observation of a link in the network.""" - default_observation: spaces.Space = {"PROTOCOLS": {"ALL": 0}} - "Default observation is what should be returned when the link doesn't exist." +# default_observation: spaces.Space = {"PROTOCOLS": {"ALL": 0}} +# "Default observation is what should be returned when the link doesn't exist." - def __init__(self, where: Optional[Tuple[str]] = None) -> None: - """Initialise link observation. +# def __init__(self, where: Optional[Tuple[str]] = None) -> None: +# """Initialise link observation. - :param where: Store information about where in the simulation state dictionary to find the relevant information. - Optional. If None, this corresponds that the file does not exist and the observation will be populated with - zeroes. +# :param where: Store information about where in the simulation state dictionary to find the relevant information. +# Optional. If None, this corresponds that the file does not exist and the observation will be populated with +# zeroes. - A typical location for a service looks like this: - `['network','nodes',,'servics', ]` - :type where: Optional[List[str]] - """ - super().__init__() - self.where: Optional[Tuple[str]] = where +# A typical location for a service looks like this: +# `['network','nodes',,'servics', ]` +# :type where: Optional[List[str]] +# """ +# super().__init__() +# self.where: Optional[Tuple[str]] = where - def observe(self, state: Dict) -> Dict: - """Generate observation based on the current state of the simulation. +# def observe(self, state: Dict) -> Dict: +# """Generate observation based on the current state of the simulation. - :param state: Simulation state dictionary - :type state: Dict - :return: Observation - :rtype: Dict - """ - if self.where is None: - return self.default_observation +# :param state: Simulation state dictionary +# :type state: Dict +# :return: Observation +# :rtype: Dict +# """ +# if self.where is None: +# return self.default_observation - link_state = access_from_nested_dict(state, self.where) - if link_state is NOT_PRESENT_IN_STATE: - return self.default_observation +# link_state = access_from_nested_dict(state, self.where) +# if link_state is NOT_PRESENT_IN_STATE: +# return self.default_observation - bandwidth = link_state["bandwidth"] - load = link_state["current_load"] - if load == 0: - utilisation_category = 0 - else: - utilisation_fraction = load / bandwidth - # 0 is UNUSED, 1 is 0%-10%. 2 is 10%-20%. 3 is 20%-30%. And so on... 10 is exactly 100% - utilisation_category = int(utilisation_fraction * 9) + 1 +# bandwidth = link_state["bandwidth"] +# load = link_state["current_load"] +# if load == 0: +# utilisation_category = 0 +# else: +# utilisation_fraction = load / bandwidth +# # 0 is UNUSED, 1 is 0%-10%. 2 is 10%-20%. 3 is 20%-30%. And so on... 10 is exactly 100% +# utilisation_category = int(utilisation_fraction * 9) + 1 - # TODO: once the links support separte load per protocol, this needs amendment to reflect that. - return {"PROTOCOLS": {"ALL": min(utilisation_category, 10)}} +# # TODO: once the links support separte load per protocol, this needs amendment to reflect that. +# return {"PROTOCOLS": {"ALL": min(utilisation_category, 10)}} - @property - def space(self) -> spaces.Space: - """Gymnasium space object describing the observation space shape. +# @property +# def space(self) -> spaces.Space: +# """Gymnasium space object describing the observation space shape. - :return: Gymnasium space - :rtype: spaces.Space - """ - return spaces.Dict({"PROTOCOLS": spaces.Dict({"ALL": spaces.Discrete(11)})}) +# :return: Gymnasium space +# :rtype: spaces.Space +# """ +# return spaces.Dict({"PROTOCOLS": spaces.Dict({"ALL": spaces.Discrete(11)})}) - @classmethod - def from_config(cls, config: Dict, game: "PrimaiteGame") -> "LinkObservation": - """Create link observation from a config. +# @classmethod +# def from_config(cls, config: Dict, game: "PrimaiteGame") -> "LinkObservation": +# """Create link observation from a config. - :param config: Dictionary containing the configuration for this link observation. - :type config: Dict - :param game: Reference to the PrimaiteGame object that spawned this observation. - :type game: PrimaiteGame - :return: Constructed link observation - :rtype: LinkObservation - """ - return cls(where=["network", "links", game.ref_map_links[config["link_ref"]]]) +# :param config: Dictionary containing the configuration for this link observation. +# :type config: Dict +# :param game: Reference to the PrimaiteGame object that spawned this observation. +# :type game: PrimaiteGame +# :return: Constructed link observation +# :rtype: LinkObservation +# """ +# return cls(where=["network", "links", game.ref_map_links[config["link_ref"]]]) -class AclObservation(AbstractObservation): - """Observation of an Access Control List (ACL) in the network.""" +# class AclObservation(AbstractObservation): +# """Observation of an Access Control List (ACL) in the network.""" - # TODO: should where be optional, and we can use where=None to pad the observation space? - # definitely the current approach does not support tracking files that aren't specified by name, for example - # if a file is created at runtime, we have currently got no way of telling the observation space to track it. - # this needs adding, but not for the MVP. - def __init__( - self, - node_ip_to_id: Dict[str, int], - ports: List[int], - protocols: List[str], - where: Optional[Tuple[str]] = None, - num_rules: int = 10, - ) -> None: - """Initialise ACL observation. +# # TODO: should where be optional, and we can use where=None to pad the observation space? +# # definitely the current approach does not support tracking files that aren't specified by name, for example +# # if a file is created at runtime, we have currently got no way of telling the observation space to track it. +# # this needs adding, but not for the MVP. +# def __init__( +# self, +# node_ip_to_id: Dict[str, int], +# ports: List[int], +# protocols: List[str], +# where: Optional[Tuple[str]] = None, +# num_rules: int = 10, +# ) -> None: +# """Initialise ACL observation. - :param node_ip_to_id: Mapping between IP address and ID. - :type node_ip_to_id: Dict[str, int] - :param ports: List of ports which are part of the game that define the ordering when converting to an ID - :type ports: List[int] - :param protocols: List of protocols which are part of the game, defines ordering when converting to an ID - :type protocols: list[str] - :param where: Where in the simulation state dictionary to find the relevant information for this ACL. A typical - example may look like this: - ['network','nodes',,'acl','acl'] - :type where: Optional[Tuple[str]], optional - :param num_rules: , defaults to 10 - :type num_rules: int, optional - """ - super().__init__() - self.where: Optional[Tuple[str]] = where - self.num_rules: int = num_rules - self.node_to_id: Dict[str, int] = node_ip_to_id - "List of node IP addresses, order in this list determines how they are converted to an ID" - self.port_to_id: Dict[int, int] = {port: i + 2 for i, port in enumerate(ports)} - "List of ports which are part of the game that define the ordering when converting to an ID" - self.protocol_to_id: Dict[str, int] = {protocol: i + 2 for i, protocol in enumerate(protocols)} - "List of protocols which are part of the game, defines ordering when converting to an ID" - self.default_observation: Dict = { - i - + 1: { - "position": i, - "permission": 0, - "source_node_id": 0, - "source_port": 0, - "dest_node_id": 0, - "dest_port": 0, - "protocol": 0, - } - for i in range(self.num_rules) - } +# :param node_ip_to_id: Mapping between IP address and ID. +# :type node_ip_to_id: Dict[str, int] +# :param ports: List of ports which are part of the game that define the ordering when converting to an ID +# :type ports: List[int] +# :param protocols: List of protocols which are part of the game, defines ordering when converting to an ID +# :type protocols: list[str] +# :param where: Where in the simulation state dictionary to find the relevant information for this ACL. A typical +# example may look like this: +# ['network','nodes',,'acl','acl'] +# :type where: Optional[Tuple[str]], optional +# :param num_rules: , defaults to 10 +# :type num_rules: int, optional +# """ +# super().__init__() +# self.where: Optional[Tuple[str]] = where +# self.num_rules: int = num_rules +# self.node_to_id: Dict[str, int] = node_ip_to_id +# "List of node IP addresses, order in this list determines how they are converted to an ID" +# self.port_to_id: Dict[int, int] = {port: i + 2 for i, port in enumerate(ports)} +# "List of ports which are part of the game that define the ordering when converting to an ID" +# self.protocol_to_id: Dict[str, int] = {protocol: i + 2 for i, protocol in enumerate(protocols)} +# "List of protocols which are part of the game, defines ordering when converting to an ID" +# self.default_observation: Dict = { +# i +# + 1: { +# "position": i, +# "permission": 0, +# "source_node_id": 0, +# "source_port": 0, +# "dest_node_id": 0, +# "dest_port": 0, +# "protocol": 0, +# } +# for i in range(self.num_rules) +# } - def observe(self, state: Dict) -> Dict: - """Generate observation based on the current state of the simulation. +# def observe(self, state: Dict) -> Dict: +# """Generate observation based on the current state of the simulation. - :param state: Simulation state dictionary - :type state: Dict - :return: Observation - :rtype: Dict - """ - if self.where is None: - return self.default_observation - acl_state: Dict = access_from_nested_dict(state, self.where) - if acl_state is NOT_PRESENT_IN_STATE: - return self.default_observation +# :param state: Simulation state dictionary +# :type state: Dict +# :return: Observation +# :rtype: Dict +# """ +# if self.where is None: +# return self.default_observation +# acl_state: Dict = access_from_nested_dict(state, self.where) +# if acl_state is NOT_PRESENT_IN_STATE: +# return self.default_observation - # TODO: what if the ACL has more rules than num of max rules for obs space - obs = {} - acl_items = dict(acl_state.items()) - i = 1 # don't show rule 0 for compatibility reasons. - while i < self.num_rules + 1: - rule_state = acl_items[i] - if rule_state is None: - obs[i] = { - "position": i - 1, - "permission": 0, - "source_node_id": 0, - "source_port": 0, - "dest_node_id": 0, - "dest_port": 0, - "protocol": 0, - } - else: - src_ip = rule_state["src_ip_address"] - src_node_id = 1 if src_ip is None else self.node_to_id[IPv4Address(src_ip)] - dst_ip = rule_state["dst_ip_address"] - dst_node_ip = 1 if dst_ip is None else self.node_to_id[IPv4Address(dst_ip)] - src_port = rule_state["src_port"] - src_port_id = 1 if src_port is None else self.port_to_id[src_port] - dst_port = rule_state["dst_port"] - dst_port_id = 1 if dst_port is None else self.port_to_id[dst_port] - protocol = rule_state["protocol"] - protocol_id = 1 if protocol is None else self.protocol_to_id[protocol] - obs[i] = { - "position": i - 1, - "permission": rule_state["action"], - "source_node_id": src_node_id, - "source_port": src_port_id, - "dest_node_id": dst_node_ip, - "dest_port": dst_port_id, - "protocol": protocol_id, - } - i += 1 - return obs +# # TODO: what if the ACL has more rules than num of max rules for obs space +# obs = {} +# acl_items = dict(acl_state.items()) +# i = 1 # don't show rule 0 for compatibility reasons. +# while i < self.num_rules + 1: +# rule_state = acl_items[i] +# if rule_state is None: +# obs[i] = { +# "position": i - 1, +# "permission": 0, +# "source_node_id": 0, +# "source_port": 0, +# "dest_node_id": 0, +# "dest_port": 0, +# "protocol": 0, +# } +# else: +# src_ip = rule_state["src_ip_address"] +# src_node_id = 1 if src_ip is None else self.node_to_id[IPv4Address(src_ip)] +# dst_ip = rule_state["dst_ip_address"] +# dst_node_ip = 1 if dst_ip is None else self.node_to_id[IPv4Address(dst_ip)] +# src_port = rule_state["src_port"] +# src_port_id = 1 if src_port is None else self.port_to_id[src_port] +# dst_port = rule_state["dst_port"] +# dst_port_id = 1 if dst_port is None else self.port_to_id[dst_port] +# protocol = rule_state["protocol"] +# protocol_id = 1 if protocol is None else self.protocol_to_id[protocol] +# obs[i] = { +# "position": i - 1, +# "permission": rule_state["action"], +# "source_node_id": src_node_id, +# "source_port": src_port_id, +# "dest_node_id": dst_node_ip, +# "dest_port": dst_port_id, +# "protocol": protocol_id, +# } +# i += 1 +# return obs - @property - def space(self) -> spaces.Space: - """Gymnasium space object describing the observation space shape. +# @property +# def space(self) -> spaces.Space: +# """Gymnasium space object describing the observation space shape. - :return: Gymnasium space - :rtype: spaces.Space - """ - return spaces.Dict( - { - i - + 1: spaces.Dict( - { - "position": spaces.Discrete(self.num_rules), - "permission": spaces.Discrete(3), - # adding two to lengths is to account for reserved values 0 (unused) and 1 (any) - "source_node_id": spaces.Discrete(len(set(self.node_to_id.values())) + 2), - "source_port": spaces.Discrete(len(self.port_to_id) + 2), - "dest_node_id": spaces.Discrete(len(set(self.node_to_id.values())) + 2), - "dest_port": spaces.Discrete(len(self.port_to_id) + 2), - "protocol": spaces.Discrete(len(self.protocol_to_id) + 2), - } - ) - for i in range(self.num_rules) - } - ) +# :return: Gymnasium space +# :rtype: spaces.Space +# """ +# return spaces.Dict( +# { +# i +# + 1: spaces.Dict( +# { +# "position": spaces.Discrete(self.num_rules), +# "permission": spaces.Discrete(3), +# # adding two to lengths is to account for reserved values 0 (unused) and 1 (any) +# "source_node_id": spaces.Discrete(len(set(self.node_to_id.values())) + 2), +# "source_port": spaces.Discrete(len(self.port_to_id) + 2), +# "dest_node_id": spaces.Discrete(len(set(self.node_to_id.values())) + 2), +# "dest_port": spaces.Discrete(len(self.port_to_id) + 2), +# "protocol": spaces.Discrete(len(self.protocol_to_id) + 2), +# } +# ) +# for i in range(self.num_rules) +# } +# ) - @classmethod - def from_config(cls, config: Dict, game: "PrimaiteGame") -> "AclObservation": - """Generate ACL observation from a config. +# @classmethod +# def from_config(cls, config: Dict, game: "PrimaiteGame") -> "AclObservation": +# """Generate ACL observation from a config. - :param config: Dictionary containing the configuration for this ACL observation. - :type config: Dict - :param game: Reference to the PrimaiteGame object that spawned this observation. - :type game: PrimaiteGame - :return: Observation object - :rtype: AclObservation - """ - max_acl_rules = config["options"]["max_acl_rules"] - node_ip_to_idx = {} - for ip_idx, ip_map_config in enumerate(config["ip_address_order"]): - node_ref = ip_map_config["node_hostname"] - nic_num = ip_map_config["nic_num"] - node_obj = game.simulation.network.nodes[game.ref_map_nodes[node_ref]] - nic_obj = node_obj.network_interface[nic_num] - node_ip_to_idx[nic_obj.ip_address] = ip_idx + 2 +# :param config: Dictionary containing the configuration for this ACL observation. +# :type config: Dict +# :param game: Reference to the PrimaiteGame object that spawned this observation. +# :type game: PrimaiteGame +# :return: Observation object +# :rtype: AclObservation +# """ +# max_acl_rules = config["options"]["max_acl_rules"] +# node_ip_to_idx = {} +# for ip_idx, ip_map_config in enumerate(config["ip_address_order"]): +# node_ref = ip_map_config["node_hostname"] +# nic_num = ip_map_config["nic_num"] +# node_obj = game.simulation.network.nodes[game.ref_map_nodes[node_ref]] +# nic_obj = node_obj.network_interface[nic_num] +# node_ip_to_idx[nic_obj.ip_address] = ip_idx + 2 - router_hostname = config["router_hostname"] - return cls( - node_ip_to_id=node_ip_to_idx, - ports=game.options.ports, - protocols=game.options.protocols, - where=["network", "nodes", router_hostname, "acl", "acl"], - num_rules=max_acl_rules, - ) +# router_hostname = config["router_hostname"] +# return cls( +# node_ip_to_id=node_ip_to_idx, +# ports=game.options.ports, +# protocols=game.options.protocols, +# where=["network", "nodes", router_hostname, "acl", "acl"], +# num_rules=max_acl_rules, +# ) -class NullObservation(AbstractObservation): - """Null observation, returns a single 0 value for the observation space.""" +# class NullObservation(AbstractObservation): +# """Null observation, returns a single 0 value for the observation space.""" - def __init__(self, where: Optional[List[str]] = None): - """Initialise null observation.""" - self.default_observation: Dict = {} +# def __init__(self, where: Optional[List[str]] = None): +# """Initialise null observation.""" +# self.default_observation: Dict = {} - def observe(self, state: Dict) -> Dict: - """Generate observation based on the current state of the simulation.""" - return 0 +# def observe(self, state: Dict) -> Dict: +# """Generate observation based on the current state of the simulation.""" +# return 0 - @property - def space(self) -> spaces.Space: - """Gymnasium space object describing the observation space shape.""" - return spaces.Discrete(1) +# @property +# def space(self) -> spaces.Space: +# """Gymnasium space object describing the observation space shape.""" +# return spaces.Discrete(1) - @classmethod - def from_config(cls, config: Dict, game: Optional["PrimaiteGame"] = None) -> "NullObservation": - """ - Create null observation from a config. +# @classmethod +# def from_config(cls, config: Dict, game: Optional["PrimaiteGame"] = None) -> "NullObservation": +# """ +# Create null observation from a config. - The parameters are ignored, they are here to match the signature of the other observation classes. - """ - return cls() +# The parameters are ignored, they are here to match the signature of the other observation classes. +# """ +# return cls() -class ICSObservation(NullObservation): - """ICS observation placeholder, currently not implemented so always returns a single 0.""" +# class ICSObservation(NullObservation): +# """ICS observation placeholder, currently not implemented so always returns a single 0.""" - pass +# pass diff --git a/src/primaite/game/agent/utils.py b/src/primaite/game/agent/utils.py index 1314087c..42e8f30b 100644 --- a/src/primaite/game/agent/utils.py +++ b/src/primaite/game/agent/utils.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, Hashable, Sequence +from typing import Any, Dict, Hashable, Optional, Sequence NOT_PRESENT_IN_STATE = object() """ @@ -7,7 +7,7 @@ the thing requested in the state could equal None. This NOT_PRESENT_IN_STATE is """ -def access_from_nested_dict(dictionary: Dict, keys: Sequence[Hashable]) -> Any: +def access_from_nested_dict(dictionary: Dict, keys: Optional[Sequence[Hashable]]) -> Any: """ Access an item from a deeply dictionary with a list of keys. @@ -21,6 +21,8 @@ def access_from_nested_dict(dictionary: Dict, keys: Sequence[Hashable]) -> Any: :return: The value in the dictionary :rtype: Any """ + if keys is None: + return NOT_PRESENT_IN_STATE key_list = [*keys] # copy keys to a new list to prevent editing original list if len(key_list) == 0: return dictionary diff --git a/tests/integration_tests/game_layer/observations/test_node_observations.py b/tests/integration_tests/game_layer/observations/test_node_observations.py index dce05b6a..a5195e1e 100644 --- a/tests/integration_tests/game_layer/observations/test_node_observations.py +++ b/tests/integration_tests/game_layer/observations/test_node_observations.py @@ -4,7 +4,7 @@ from uuid import uuid4 import pytest from gymnasium import spaces -from primaite.game.agent.observations.node_observations import NodeObservation +from primaite.game.agent.observations.host import NodeObservation from primaite.simulator.network.hardware.nodes.host.computer import Computer from primaite.simulator.sim_container import Simulation From 0d0b5bc7d9fc64549f19017ded0569bfe9ba45ce Mon Sep 17 00:00:00 2001 From: Marek Wolan Date: Wed, 27 Mar 2024 22:11:37 +0000 Subject: [PATCH 048/124] fix previous commit --- src/primaite/game/agent/observations/agent_observations.py | 2 +- .../game_layer/observations/test_node_observations.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/primaite/game/agent/observations/agent_observations.py b/src/primaite/game/agent/observations/agent_observations.py index 2148697b..10370660 100644 --- a/src/primaite/game/agent/observations/agent_observations.py +++ b/src/primaite/game/agent/observations/agent_observations.py @@ -2,7 +2,7 @@ from typing import Dict, List, Optional, Tuple, TYPE_CHECKING from gymnasium import spaces -from primaite.game.agent.observations.host import NodeObservation +from primaite.game.agent.observations.node_observations import NodeObservation from primaite.game.agent.observations.observations import ( AbstractObservation, AclObservation, diff --git a/tests/integration_tests/game_layer/observations/test_node_observations.py b/tests/integration_tests/game_layer/observations/test_node_observations.py index a5195e1e..dce05b6a 100644 --- a/tests/integration_tests/game_layer/observations/test_node_observations.py +++ b/tests/integration_tests/game_layer/observations/test_node_observations.py @@ -4,7 +4,7 @@ from uuid import uuid4 import pytest from gymnasium import spaces -from primaite.game.agent.observations.host import NodeObservation +from primaite.game.agent.observations.node_observations import NodeObservation from primaite.simulator.network.hardware.nodes.host.computer import Computer from primaite.simulator.sim_container import Simulation From cddb39e8e90709de243e2b8e9b2fb938ed37900e Mon Sep 17 00:00:00 2001 From: Cristian-VM2 Date: Thu, 28 Mar 2024 10:43:57 +0000 Subject: [PATCH 049/124] #2405 update docstrings --- src/primaite/simulator/network/hardware/base.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/primaite/simulator/network/hardware/base.py b/src/primaite/simulator/network/hardware/base.py index 132fc8b1..1e29ceb6 100644 --- a/src/primaite/simulator/network/hardware/base.py +++ b/src/primaite/simulator/network/hardware/base.py @@ -1312,7 +1312,10 @@ class Node(SimComponent): :param application: Application instance that has not been installed on any node yet. :type application: Application - :parm + :param ip_address: IP address used to configure the application + (target IP for the DoSBot or server IP for the DataManipulationBot) + :type ip_address: str + :return: True if the application is installed successfully, otherwise False. """ if application in self: _LOGGER.warning( @@ -1356,6 +1359,7 @@ class Node(SimComponent): :param application: Application object that is currently associated with this node. :type application: Application + :return: True if the application is uninstalled successfully, otherwise False. """ if application.__name__ not in self.software_manager.software: _LOGGER.warning( From d5b5c7d47a84768a512006226680536a7be6862c Mon Sep 17 00:00:00 2001 From: Cristian-VM2 Date: Thu, 28 Mar 2024 11:02:26 +0000 Subject: [PATCH 050/124] #2405 simplify implementation --- .../simulator/network/hardware/base.py | 21 +++++++------------ 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/src/primaite/simulator/network/hardware/base.py b/src/primaite/simulator/network/hardware/base.py index 1e29ceb6..c464e9bf 100644 --- a/src/primaite/simulator/network/hardware/base.py +++ b/src/primaite/simulator/network/hardware/base.py @@ -1325,23 +1325,17 @@ class Node(SimComponent): application_instance = self.software_manager.software.get(str(application.__name__)) self.applications[application_instance.uuid] = application_instance - application.parent = self - self.sys_log.info(f"Installed application {application.__name__}") - _LOGGER.debug(f"Added application {application.__name__} to node {self.hostname}") + self.sys_log.info(f"Installed application {application_instance.name}") + _LOGGER.debug(f"Added application {application_instance.name} to node {self.hostname}") self._application_request_manager.add_request( application_instance.name, RequestType(func=application_instance._request_manager) ) # Configure application if additional parameters are given if ip_address: - from primaite.simulator.system.applications.red_applications.data_manipulation_bot import ( - DataManipulationBot, - ) - from primaite.simulator.system.applications.red_applications.dos_bot import DoSBot - - if application == DoSBot: + if application_instance.name == "DoSBot": application_instance.configure(target_ip_address=IPv4Address(ip_address)) - elif application == DataManipulationBot: + elif application_instance.name == "DataManipulationBot": application_instance.configure(server_ip_address=IPv4Address(ip_address)) else: pass @@ -1370,11 +1364,12 @@ class Node(SimComponent): str(application.__name__) ) # This works because we can't have two applications with the same name on the same node self.applications.pop(application_instance.uuid) - application.parent = None - self.sys_log.info(f"Uninstalled application {application.__name__}") - _LOGGER.info(f"Removed application {application.__name__} from node {self.hostname}") + application_instance.parent = None + self.sys_log.info(f"Uninstalled application {application_instance.name}") + _LOGGER.info(f"Removed application {application_instance.name} from node {self.hostname}") self._application_request_manager.remove_request(application_instance.name) self.software_manager.uninstall(application_instance.name) + if application_instance.name not in self.software_manager.software: return True else: From 9b6135524efcf4f1aa0f05a9c0f02f9429e27579 Mon Sep 17 00:00:00 2001 From: Cristian-VM2 Date: Thu, 28 Mar 2024 11:08:30 +0000 Subject: [PATCH 051/124] #2504 update application_install_action docstring --- src/primaite/simulator/network/hardware/base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/primaite/simulator/network/hardware/base.py b/src/primaite/simulator/network/hardware/base.py index c464e9bf..239ef687 100644 --- a/src/primaite/simulator/network/hardware/base.py +++ b/src/primaite/simulator/network/hardware/base.py @@ -1310,7 +1310,7 @@ class Node(SimComponent): This method is useful for allowing agents to take this action. - :param application: Application instance that has not been installed on any node yet. + :param application: Application object that has not been installed on any node yet. :type application: Application :param ip_address: IP address used to configure the application (target IP for the DoSBot or server IP for the DataManipulationBot) From 4301f3fdba18a013c518e20c7e56d91ff4a63344 Mon Sep 17 00:00:00 2001 From: Marek Wolan Date: Tue, 26 Mar 2024 12:06:23 +0000 Subject: [PATCH 052/124] #2418 Add Printer and Wireless router to config parser --- src/primaite/game/game.py | 15 +++++++++++++-- .../network/hardware/nodes/host/server.py | 6 ++++++ tests/assets/configs/test_primaite_session.yaml | 6 ++++++ .../test_primaite_session.py | 2 +- 4 files changed, 26 insertions(+), 3 deletions(-) diff --git a/src/primaite/game/game.py b/src/primaite/game/game.py index 05b76679..6ba7e63c 100644 --- a/src/primaite/game/game.py +++ b/src/primaite/game/game.py @@ -15,10 +15,11 @@ from primaite.game.science import graph_has_cycle, topological_sort from primaite.simulator.network.hardware.base import NodeOperatingState from primaite.simulator.network.hardware.nodes.host.computer import Computer from primaite.simulator.network.hardware.nodes.host.host_node import NIC -from primaite.simulator.network.hardware.nodes.host.server import Server +from primaite.simulator.network.hardware.nodes.host.server import Printer, Server from primaite.simulator.network.hardware.nodes.network.firewall import Firewall from primaite.simulator.network.hardware.nodes.network.router import Router from primaite.simulator.network.hardware.nodes.network.switch import Switch +from primaite.simulator.network.hardware.nodes.network.wireless_router import WirelessRouter from primaite.simulator.network.nmne import set_nmne_config from primaite.simulator.network.transmission.transport_layer import Port from primaite.simulator.sim_container import Simulation @@ -273,8 +274,18 @@ class PrimaiteGame: new_node = Router.from_config(node_cfg) elif n_type == "firewall": new_node = Firewall.from_config(node_cfg) + elif n_type == "wireless_router": + new_node = WirelessRouter.from_config(node_cfg) + elif n_type == "printer": + new_node = Printer( + hostname=node_cfg["hostname"], + ip_address=node_cfg["ip_address"], + subnet_mask=node_cfg["subnet_mask"], + ) else: - _LOGGER.warning(f"invalid node type {n_type} in config") + msg = f"invalid node type {n_type} in config" + _LOGGER.error(msg) + raise ValueError(msg) if "services" in node_cfg: for service_cfg in node_cfg["services"]: new_service = None diff --git a/src/primaite/simulator/network/hardware/nodes/host/server.py b/src/primaite/simulator/network/hardware/nodes/host/server.py index 9f5157ad..593cd0dd 100644 --- a/src/primaite/simulator/network/hardware/nodes/host/server.py +++ b/src/primaite/simulator/network/hardware/nodes/host/server.py @@ -28,3 +28,9 @@ class Server(HostNode): * Applications: * Web Browser """ + + +class Printer(HostNode): + """Printer? I don't even know her!.""" + + # TODO: Implement printer-specific behaviour diff --git a/tests/assets/configs/test_primaite_session.yaml b/tests/assets/configs/test_primaite_session.yaml index a8b33032..e1b0ac7b 100644 --- a/tests/assets/configs/test_primaite_session.yaml +++ b/tests/assets/configs/test_primaite_session.yaml @@ -681,6 +681,12 @@ simulation: - ref: client_2_dns_client type: DNSClient + - ref: HP_LaserJet_Pro_4102fdn_printer + type: printer + hostname: HP_LaserJet_Pro_4102fdn_printer + ip_address: 192.168.10.99 + subnet_mask: 255.255.255.0 + links: - ref: router_1___switch_1 endpoint_a_ref: router_1 diff --git a/tests/e2e_integration_tests/test_primaite_session.py b/tests/e2e_integration_tests/test_primaite_session.py index c45a4690..7febe39a 100644 --- a/tests/e2e_integration_tests/test_primaite_session.py +++ b/tests/e2e_integration_tests/test_primaite_session.py @@ -29,7 +29,7 @@ class TestPrimaiteSession: assert session.env assert session.env.game.simulation.network - assert len(session.env.game.simulation.network.nodes) == 10 + assert len(session.env.game.simulation.network.nodes) == 11 @pytest.mark.skip(reason="Session is not being maintained and will be removed in the subsequent beta release.") @pytest.mark.parametrize("temp_primaite_session", [[CFG_PATH]], indirect=True) From b12dee73ba5ac4e4b29713ed49cee5d9c929d47f Mon Sep 17 00:00:00 2001 From: Marek Wolan Date: Tue, 26 Mar 2024 13:21:22 +0000 Subject: [PATCH 053/124] #2418 Fix wireless router from config --- .../network/hardware/nodes/network/router.py | 2 +- .../hardware/nodes/network/wireless_router.py | 69 ++++++++++++++++++- .../assets/configs/test_primaite_session.yaml | 27 ++++++++ .../test_primaite_session.py | 9 ++- 4 files changed, 103 insertions(+), 4 deletions(-) diff --git a/src/primaite/simulator/network/hardware/nodes/network/router.py b/src/primaite/simulator/network/hardware/nodes/network/router.py index d2b47c1a..de308547 100644 --- a/src/primaite/simulator/network/hardware/nodes/network/router.py +++ b/src/primaite/simulator/network/hardware/nodes/network/router.py @@ -1418,7 +1418,7 @@ class Router(NetworkNode): :return: Configured router. :rtype: Router """ - router = Router( + router = cls( hostname=cfg["hostname"], num_ports=int(cfg.get("num_ports", "5")), operating_state=NodeOperatingState.ON diff --git a/src/primaite/simulator/network/hardware/nodes/network/wireless_router.py b/src/primaite/simulator/network/hardware/nodes/network/wireless_router.py index 3e8d715f..4bd3d101 100644 --- a/src/primaite/simulator/network/hardware/nodes/network/wireless_router.py +++ b/src/primaite/simulator/network/hardware/nodes/network/wireless_router.py @@ -1,10 +1,14 @@ +from ipaddress import IPv4Address from typing import Any, Dict, Union from pydantic import validate_call from primaite.simulator.network.airspace import AirSpaceFrequency, IPWirelessNetworkInterface -from primaite.simulator.network.hardware.nodes.network.router import Router, RouterInterface +from primaite.simulator.network.hardware.node_operating_state import NodeOperatingState +from primaite.simulator.network.hardware.nodes.network.router import ACLAction, Router, RouterInterface from primaite.simulator.network.transmission.data_link_layer import Frame +from primaite.simulator.network.transmission.network_layer import IPProtocol +from primaite.simulator.network.transmission.transport_layer import Port from primaite.utils.validators import IPV4Address @@ -209,3 +213,66 @@ class WirelessRouter(Router): raise NotImplementedError( "Please use the 'configure_wireless_access_point' and 'configure_router_interface' functions." ) + + @classmethod + def from_config(cls, cfg: Dict) -> "WirelessRouter": + """Generate the wireless router from config. + + Schema: + - hostname (str): unique name for this router. + - router_interface (dict): The values should be another dict specifying + - ip_address (str) + - subnet_mask (str) + - wireless_access_point (dict): Dict with + - ip address, + - subnet mask, + - frequency, (string: either WIFI_2_4 or WIFI_5) + - acl (dict): Dict with integers from 1 - max_acl_rules as keys. The key defines the position within the ACL + where the rule will be added (lower number is resolved first). The values should describe valid ACL + Rules as: + - action (str): either PERMIT or DENY + - src_port (str, optional): the named port such as HTTP, HTTPS, or POSTGRES_SERVER + - dst_port (str, optional): the named port such as HTTP, HTTPS, or POSTGRES_SERVER + - protocol (str, optional): the named IP protocol such as ICMP, TCP, or UDP + - src_ip_address (str, optional): IP address octet written in base 10 + - dst_ip_address (str, optional): IP address octet written in base 10 + + :param cfg: Config dictionary + :type cfg: Dict + :return: WirelessRouter instance. + :rtype: WirelessRouter + """ + operating_state = ( + NodeOperatingState.ON if not (p := cfg.get("operating_state")) else NodeOperatingState[p.upper()] + ) + router = cls(hostname=cfg["hostname"], operating_state=operating_state) + if "router_interface" in cfg: + ip_address = cfg["router_interface"]["ip_address"] + subnet_mask = cfg["router_interface"]["subnet_mask"] + router.configure_router_interface(ip_address=ip_address, subnet_mask=subnet_mask) + if "wireless_access_point" in cfg: + ip_address = cfg["wireless_access_point"]["ip_address"] + subnet_mask = cfg["wireless_access_point"]["subnet_mask"] + frequency = AirSpaceFrequency[cfg["wireless_access_point"]["frequency"]] + router.configure_wireless_access_point(ip_address=ip_address, subnet_mask=subnet_mask, frequency=frequency) + + if "acl" in cfg: + for r_num, r_cfg in cfg["acl"].items(): + router.acl.add_rule( + action=ACLAction[r_cfg["action"]], + src_port=None if not (p := r_cfg.get("src_port")) else Port[p], + dst_port=None if not (p := r_cfg.get("dst_port")) else Port[p], + protocol=None if not (p := r_cfg.get("protocol")) else IPProtocol[p], + src_ip_address=r_cfg.get("src_ip"), + dst_ip_address=r_cfg.get("dst_ip"), + position=r_num, + ) + if "routes" in cfg: + for route in cfg.get("routes"): + router.route_table.add_route( + address=IPv4Address(route.get("address")), + subnet_mask=IPv4Address(route.get("subnet_mask", "255.255.255.0")), + next_hop_ip_address=IPv4Address(route.get("next_hop_ip_address")), + metric=float(route.get("metric", 0)), + ) + return router diff --git a/tests/assets/configs/test_primaite_session.yaml b/tests/assets/configs/test_primaite_session.yaml index e1b0ac7b..0ce3fee7 100644 --- a/tests/assets/configs/test_primaite_session.yaml +++ b/tests/assets/configs/test_primaite_session.yaml @@ -687,6 +687,33 @@ simulation: ip_address: 192.168.10.99 subnet_mask: 255.255.255.0 + - ref: router_2 + type: wireless_router + hostname: router_2 + router_interface: + ip_address: 192.169.1.1 + subnet_mask: 255.255.255.0 + wireless_access_point: + ip_address: 192.169.1.1 + subnet_mask: 255.255.255.0 + frequency: WIFI_2_4 + acl: + 0: + action: PERMIT + src_port: POSTGRES_SERVER + dst_port: POSTGRES_SERVER + 1: + action: PERMIT + src_port: DNS + dst_port: DNS + 22: + action: PERMIT + src_port: ARP + dst_port: ARP + 23: + action: PERMIT + protocol: ICMP + links: - ref: router_1___switch_1 endpoint_a_ref: router_1 diff --git a/tests/e2e_integration_tests/test_primaite_session.py b/tests/e2e_integration_tests/test_primaite_session.py index 7febe39a..32f134a3 100644 --- a/tests/e2e_integration_tests/test_primaite_session.py +++ b/tests/e2e_integration_tests/test_primaite_session.py @@ -1,6 +1,8 @@ import pydantic import pytest +from primaite.simulator.network.hardware.nodes.host.server import Printer +from primaite.simulator.network.hardware.nodes.network.wireless_router import WirelessRouter from tests import TEST_ASSETS_ROOT from tests.conftest import TempPrimaiteSession @@ -11,7 +13,6 @@ MISCONFIGURED_PATH = TEST_ASSETS_ROOT / "configs/bad_primaite_session.yaml" MULTI_AGENT_PATH = TEST_ASSETS_ROOT / "configs/multi_agent_session.yaml" -# @pytest.mark.skip(reason="no way of currently testing this") class TestPrimaiteSession: @pytest.mark.parametrize("temp_primaite_session", [[CFG_PATH]], indirect=True) def test_creating_session(self, temp_primaite_session): @@ -29,7 +30,11 @@ class TestPrimaiteSession: assert session.env assert session.env.game.simulation.network - assert len(session.env.game.simulation.network.nodes) == 11 + assert len(session.env.game.simulation.network.nodes) == 12 + wireless = session.env.game.simulation.network.get_node_by_hostname("router_2") + assert isinstance(wireless, WirelessRouter) + printer = session.env.game.simulation.network.get_node_by_hostname("HP_LaserJet_Pro_4102fdn_printer") + assert isinstance(printer, Printer) @pytest.mark.skip(reason="Session is not being maintained and will be removed in the subsequent beta release.") @pytest.mark.parametrize("temp_primaite_session", [[CFG_PATH]], indirect=True) From e21c59dff1d149abd21abca2a73e42e66d54ac95 Mon Sep 17 00:00:00 2001 From: Marek Wolan Date: Tue, 26 Mar 2024 16:23:39 +0000 Subject: [PATCH 054/124] #2418 - Change test config --- tests/assets/configs/test_primaite_session.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/assets/configs/test_primaite_session.yaml b/tests/assets/configs/test_primaite_session.yaml index 0ce3fee7..b131c1b7 100644 --- a/tests/assets/configs/test_primaite_session.yaml +++ b/tests/assets/configs/test_primaite_session.yaml @@ -694,7 +694,7 @@ simulation: ip_address: 192.169.1.1 subnet_mask: 255.255.255.0 wireless_access_point: - ip_address: 192.169.1.1 + ip_address: 192.170.1.1 subnet_mask: 255.255.255.0 frequency: WIFI_2_4 acl: From c29c3971fab30467cf6b770a6ce7c7f1b1cb3bb9 Mon Sep 17 00:00:00 2001 From: Marek Wolan Date: Tue, 26 Mar 2024 21:48:17 +0000 Subject: [PATCH 055/124] #2418 - add wildcard masks and from_config tests to routers --- .../network/hardware/nodes/network/router.py | 2 + .../hardware/nodes/network/wireless_router.py | 2 + .../_network/_hardware/nodes/test_router.py | 111 ++++++++++++++++++ .../_hardware/nodes/test_wireless_router.py | 97 +++++++++++++++ 4 files changed, 212 insertions(+) create mode 100644 tests/unit_tests/_primaite/_simulator/_network/_hardware/nodes/test_router.py create mode 100644 tests/unit_tests/_primaite/_simulator/_network/_hardware/nodes/test_wireless_router.py diff --git a/src/primaite/simulator/network/hardware/nodes/network/router.py b/src/primaite/simulator/network/hardware/nodes/network/router.py index de308547..102eb7dc 100644 --- a/src/primaite/simulator/network/hardware/nodes/network/router.py +++ b/src/primaite/simulator/network/hardware/nodes/network/router.py @@ -1441,6 +1441,8 @@ class Router(NetworkNode): protocol=None if not (p := r_cfg.get("protocol")) else IPProtocol[p], src_ip_address=r_cfg.get("src_ip"), dst_ip_address=r_cfg.get("dst_ip"), + src_wildcard_mask=r_cfg.get("src_wildcard_mask"), + dst_wildcard_mask=r_cfg.get("dst_wildcard_mask"), position=r_num, ) if "routes" in cfg: diff --git a/src/primaite/simulator/network/hardware/nodes/network/wireless_router.py b/src/primaite/simulator/network/hardware/nodes/network/wireless_router.py index 4bd3d101..62332269 100644 --- a/src/primaite/simulator/network/hardware/nodes/network/wireless_router.py +++ b/src/primaite/simulator/network/hardware/nodes/network/wireless_router.py @@ -265,6 +265,8 @@ class WirelessRouter(Router): protocol=None if not (p := r_cfg.get("protocol")) else IPProtocol[p], src_ip_address=r_cfg.get("src_ip"), dst_ip_address=r_cfg.get("dst_ip"), + src_wildcard_mask=r_cfg.get("src_wildcard_mask"), + dst_wildcard_mask=r_cfg.get("dst_wildcard_mask"), position=r_num, ) if "routes" in cfg: diff --git a/tests/unit_tests/_primaite/_simulator/_network/_hardware/nodes/test_router.py b/tests/unit_tests/_primaite/_simulator/_network/_hardware/nodes/test_router.py new file mode 100644 index 00000000..be74a721 --- /dev/null +++ b/tests/unit_tests/_primaite/_simulator/_network/_hardware/nodes/test_router.py @@ -0,0 +1,111 @@ +from ipaddress import IPv4Address + +from primaite.simulator.network.hardware.nodes.network.router import ACLAction, Router +from primaite.simulator.network.transmission.network_layer import IPProtocol +from primaite.simulator.network.transmission.transport_layer import Port + + +def test_wireless_router_from_config(): + cfg = { + "ref": "router_1", + "type": "router", + "hostname": "router_1", + "num_ports": 6, + "ports": { + 1: { + "ip_address": "192.168.1.1", + "subnet_mask": "255.255.255.0", + }, + 2: { + "ip_address": "192.168.2.1", + "subnet_mask": "255.255.255.0", + }, + }, + "acl": { + 0: { + "action": "PERMIT", + "src_port": "POSTGRES_SERVER", + "dst_port": "POSTGRES_SERVER", + }, + 1: { + "action": "PERMIT", + "protocol": "ICMP", + }, + 2: { + "action": "PERMIT", + "src_ip": "100.100.100.1", + "dst_ip": "100.100.101.1", + }, + 3: { + "action": "PERMIT", + "src_ip": "100.100.102.0", + "dst_ip": "100.100.103.0", + "src_wildcard_mask": "0.0.0.255", + "dst_wildcard_mask": "0.0.0.255", + }, + 20: { + "action": "DENY", + }, + }, + } + + rt = Router.from_config(cfg=cfg) + + assert rt.num_ports == 6 + + assert rt.network_interface[1].ip_address == IPv4Address("192.168.1.1") + assert rt.network_interface[1].subnet_mask == IPv4Address("255.255.255.0") + + assert rt.network_interface[2].ip_address == IPv4Address("192.168.2.1") + assert rt.network_interface[2].subnet_mask == IPv4Address("255.255.255.0") + + assert not rt.network_interface[3].enabled + assert not rt.network_interface[4].enabled + assert not rt.network_interface[5].enabled + assert not rt.network_interface[6].enabled + + r0 = rt.acl.acl[0] + assert r0.action == ACLAction.PERMIT + assert r0.src_port == r0.dst_port == Port.POSTGRES_SERVER + assert r0.src_ip_address == r0.dst_ip_address == r0.dst_wildcard_mask == r0.src_wildcard_mask == r0.protocol == None + + r1 = rt.acl.acl[1] + assert r1.action == ACLAction.PERMIT + assert r1.protocol == IPProtocol.ICMP + assert ( + r1.src_ip_address + == r1.dst_ip_address + == r1.dst_wildcard_mask + == r1.src_wildcard_mask + == r1.src_port + == r1.dst_port + == None + ) + + r2 = rt.acl.acl[2] + assert r2.action == ACLAction.PERMIT + assert r2.src_ip_address == IPv4Address("100.100.100.1") + assert r2.dst_ip_address == IPv4Address("100.100.101.1") + assert r2.src_wildcard_mask == r2.dst_wildcard_mask == None + assert r2.src_port == r2.dst_port == r2.protocol == None + + r3 = rt.acl.acl[3] + assert r3.action == ACLAction.PERMIT + assert r3.src_ip_address == IPv4Address("100.100.102.0") + assert r3.dst_ip_address == IPv4Address("100.100.103.0") + assert r3.src_wildcard_mask == IPv4Address("0.0.0.255") + assert r3.dst_wildcard_mask == IPv4Address("0.0.0.255") + assert r3.src_port == r3.dst_port == r3.protocol == None + + r20 = rt.acl.acl[20] + assert r20.action == ACLAction.DENY + assert ( + r20.src_ip_address + == r20.dst_ip_address + == r20.src_wildcard_mask + == r20.dst_wildcard_mask + == r20.src_port + == r20.dst_port + == r20.protocol + == None + ) diff --git a/tests/unit_tests/_primaite/_simulator/_network/_hardware/nodes/test_wireless_router.py b/tests/unit_tests/_primaite/_simulator/_network/_hardware/nodes/test_wireless_router.py new file mode 100644 index 00000000..494f5a15 --- /dev/null +++ b/tests/unit_tests/_primaite/_simulator/_network/_hardware/nodes/test_wireless_router.py @@ -0,0 +1,97 @@ +from ipaddress import IPv4Address + +from primaite.simulator.network.hardware.nodes.network.router import ACLAction +from primaite.simulator.network.hardware.nodes.network.wireless_router import WirelessRouter +from primaite.simulator.network.transmission.network_layer import IPProtocol +from primaite.simulator.network.transmission.transport_layer import Port + + +def test_wireless_router_from_config(): + cfg = { + "ref": "router_2", + "type": "wireless_router", + "hostname": "router_2", + "router_interface": { + "ip_address": "192.168.1.1", + "subnet_mask": "255.255.255.0", + }, + "wireless_access_point": { + "ip_address": "192.170.1.1", + "subnet_mask": "255.255.255.0", + "frequency": "WIFI_2_4", + }, + "acl": { + 0: { + "action": "PERMIT", + "src_port": "POSTGRES_SERVER", + "dst_port": "POSTGRES_SERVER", + }, + 1: { + "action": "PERMIT", + "protocol": "ICMP", + }, + 2: { + "action": "PERMIT", + "src_ip": "100.100.100.1", + "dst_ip": "100.100.101.1", + }, + 3: { + "action": "PERMIT", + "src_ip": "100.100.102.0", + "dst_ip": "100.100.103.0", + "src_wildcard_mask": "0.0.0.255", + "dst_wildcard_mask": "0.0.0.255", + }, + 20: { + "action": "DENY", + }, + }, + } + + rt = WirelessRouter.from_config(cfg=cfg) + + r0 = rt.acl.acl[0] + assert r0.action == ACLAction.PERMIT + assert r0.src_port == r0.dst_port == Port.POSTGRES_SERVER + assert r0.src_ip_address == r0.dst_ip_address == r0.dst_wildcard_mask == r0.src_wildcard_mask == r0.protocol == None + + r1 = rt.acl.acl[1] + assert r1.action == ACLAction.PERMIT + assert r1.protocol == IPProtocol.ICMP + assert ( + r1.src_ip_address + == r1.dst_ip_address + == r1.dst_wildcard_mask + == r1.src_wildcard_mask + == r1.src_port + == r1.dst_port + == None + ) + + r2 = rt.acl.acl[2] + assert r2.action == ACLAction.PERMIT + assert r2.src_ip_address == IPv4Address("100.100.100.1") + assert r2.dst_ip_address == IPv4Address("100.100.101.1") + assert r2.src_wildcard_mask == r2.dst_wildcard_mask == None + assert r2.src_port == r2.dst_port == r2.protocol == None + + r3 = rt.acl.acl[3] + assert r3.action == ACLAction.PERMIT + assert r3.src_ip_address == IPv4Address("100.100.102.0") + assert r3.dst_ip_address == IPv4Address("100.100.103.0") + assert r3.src_wildcard_mask == IPv4Address("0.0.0.255") + assert r3.dst_wildcard_mask == IPv4Address("0.0.0.255") + assert r3.src_port == r3.dst_port == r3.protocol == None + + r20 = rt.acl.acl[20] + assert r20.action == ACLAction.DENY + assert ( + r20.src_ip_address + == r20.dst_ip_address + == r20.src_wildcard_mask + == r20.dst_wildcard_mask + == r20.src_port + == r20.dst_port + == r20.protocol + == None + ) From 09caa55c6524865be855ae72f2bf24261f513d1c Mon Sep 17 00:00:00 2001 From: Marek Wolan Date: Tue, 26 Mar 2024 21:51:27 +0000 Subject: [PATCH 056/124] #2418 - Add printer and wireless router as node types in network show --- src/primaite/simulator/network/container.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/primaite/simulator/network/container.py b/src/primaite/simulator/network/container.py index 0e970c3d..5ec47052 100644 --- a/src/primaite/simulator/network/container.py +++ b/src/primaite/simulator/network/container.py @@ -8,6 +8,7 @@ from prettytable import MARKDOWN, PrettyTable from primaite import getLogger from primaite.simulator.core import RequestManager, RequestType, SimComponent from primaite.simulator.network.hardware.base import Link, Node, WiredNetworkInterface +from primaite.simulator.network.hardware.nodes.host.server import Printer from primaite.simulator.system.applications.application import Application from primaite.simulator.system.services.service import Service @@ -110,6 +111,16 @@ class Network(SimComponent): """The Firewalls in the Network.""" return [node for node in self.nodes.values() if node.__class__.__name__ == "Firewall"] + @property + def printer_nodes(self) -> List[Node]: + """The printers on the network.""" + return [node for node in self.nodes.values() if isinstance(node, Printer)] + + @property + def wireless_router_nodes(self) -> List[Node]: + """The Routers in the Network.""" + return [node for node in self.nodes.values() if node.__class__.__name__ == "WirelessRouter"] + def show(self, nodes: bool = True, ip_addresses: bool = True, links: bool = True, markdown: bool = False): """ Print tables describing the Network. @@ -128,6 +139,8 @@ class Network(SimComponent): "Switch": self.switch_nodes, "Server": self.server_nodes, "Computer": self.computer_nodes, + "Printer": self.printer_nodes, + "Wireless Router": self.wireless_routers, } if nodes: table = PrettyTable(["Node", "Type", "Operating State"]) From 350b98831851518f26aa3b34c94f124e1a1041f7 Mon Sep 17 00:00:00 2001 From: Marek Wolan Date: Wed, 27 Mar 2024 00:00:06 +0000 Subject: [PATCH 057/124] #2418 Fix broken property --- src/primaite/simulator/network/container.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/primaite/simulator/network/container.py b/src/primaite/simulator/network/container.py index 5ec47052..a4079fb8 100644 --- a/src/primaite/simulator/network/container.py +++ b/src/primaite/simulator/network/container.py @@ -140,7 +140,7 @@ class Network(SimComponent): "Server": self.server_nodes, "Computer": self.computer_nodes, "Printer": self.printer_nodes, - "Wireless Router": self.wireless_routers, + "Wireless Router": self.wireless_router_nodes, } if nodes: table = PrettyTable(["Node", "Type", "Operating State"]) From 8612842b74f7520c58fa37401925a17e5747ed2c Mon Sep 17 00:00:00 2001 From: Cristian-VM2 Date: Thu, 28 Mar 2024 12:01:36 +0000 Subject: [PATCH 058/124] #2405 remove .lower from _read_application_type, rename _software_manager to _software_request_manager in base.py --- src/primaite/simulator/network/hardware/base.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/primaite/simulator/network/hardware/base.py b/src/primaite/simulator/network/hardware/base.py index 239ef687..721bc1cd 100644 --- a/src/primaite/simulator/network/hardware/base.py +++ b/src/primaite/simulator/network/hardware/base.py @@ -846,10 +846,10 @@ class Node(SimComponent): ) rm.add_request("os", RequestType(func=self._os_request_manager, validator=_node_is_on)) - self._software_manager = RequestManager() - rm.add_request("software_manager", RequestType(func=self._software_manager, validator=_node_is_on)) + self._software_request_manager = RequestManager() + rm.add_request("software_manager", RequestType(func=self._software_request_manager, validator=_node_is_on)) self._application_manager = RequestManager() - self._software_manager.add_request(name="application", request_type=RequestType(func=self._application_manager)) + self._software_request_manager.add_request(name="application", request_type=RequestType(func=self._application_manager)) self._application_manager.add_request( name="install", @@ -879,17 +879,17 @@ class Node(SimComponent): def _read_application_type(self, application_class_str: str) -> Type[IOSoftwareClass]: """Wrapper that converts the string from the request manager into the appropriate class for the application.""" - if application_class_str.lower() == "DoSBot".lower(): + if application_class_str == "DoSBot": from primaite.simulator.system.applications.red_applications.dos_bot import DoSBot return DoSBot - elif application_class_str.lower() == "DataManipulationBot".lower(): + elif application_class_str == "DataManipulationBot": from primaite.simulator.system.applications.red_applications.data_manipulation_bot import ( DataManipulationBot, ) return DataManipulationBot - elif application_class_str.lower() == "WebBrowser".lower(): + elif application_class_str == "WebBrowser": from primaite.simulator.system.applications.web_browser import WebBrowser return WebBrowser From f83d9cb1b01c5ddef20337a80de4da36ae176050 Mon Sep 17 00:00:00 2001 From: Cristian-VM2 Date: Thu, 28 Mar 2024 12:14:05 +0000 Subject: [PATCH 059/124] #2405 refactor application_uninstall_action to re-use existing code in uninstall_application --- src/primaite/simulator/network/hardware/base.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/primaite/simulator/network/hardware/base.py b/src/primaite/simulator/network/hardware/base.py index 721bc1cd..754c7a24 100644 --- a/src/primaite/simulator/network/hardware/base.py +++ b/src/primaite/simulator/network/hardware/base.py @@ -849,7 +849,9 @@ class Node(SimComponent): self._software_request_manager = RequestManager() rm.add_request("software_manager", RequestType(func=self._software_request_manager, validator=_node_is_on)) self._application_manager = RequestManager() - self._software_request_manager.add_request(name="application", request_type=RequestType(func=self._application_manager)) + self._software_request_manager.add_request( + name="application", request_type=RequestType(func=self._application_manager) + ) self._application_manager.add_request( name="install", @@ -1321,8 +1323,9 @@ class Node(SimComponent): _LOGGER.warning( f"Can't add application {application.__name__}" + f"to node {self.hostname}. It's already installed." ) - self.software_manager.install(application) + return True + self.software_manager.install(application) application_instance = self.software_manager.software.get(str(application.__name__)) self.applications[application_instance.uuid] = application_instance self.sys_log.info(f"Installed application {application_instance.name}") @@ -1360,14 +1363,11 @@ class Node(SimComponent): f"Can't remove application {application.__name__}" + f"from node {self.hostname}. It's not installed." ) return True + application_instance = self.software_manager.software.get( str(application.__name__) ) # This works because we can't have two applications with the same name on the same node - self.applications.pop(application_instance.uuid) - application_instance.parent = None - self.sys_log.info(f"Uninstalled application {application_instance.name}") - _LOGGER.info(f"Removed application {application_instance.name} from node {self.hostname}") - self._application_request_manager.remove_request(application_instance.name) + self.uninstall_application(application_instance) self.software_manager.uninstall(application_instance.name) if application_instance.name not in self.software_manager.software: From 1e1eea47f139ae24c1b413cef9041b399b7210df Mon Sep 17 00:00:00 2001 From: Cristian-VM2 Date: Thu, 28 Mar 2024 14:08:08 +0000 Subject: [PATCH 060/124] #2405 add e2e test for application install and uninstall, refactor input params --- src/primaite/game/agent/actions.py | 19 +- .../configs/test_application_install.yaml | 986 ++++++++++++++++++ tests/conftest.py | 4 +- .../test_uc2_data_manipulation_scenario.py | 29 + .../game_layer/test_actions.py | 4 +- 5 files changed, 1026 insertions(+), 16 deletions(-) create mode 100644 tests/assets/configs/test_application_install.yaml diff --git a/src/primaite/game/agent/actions.py b/src/primaite/game/agent/actions.py index 7c31ae7e..e22c882c 100644 --- a/src/primaite/game/agent/actions.py +++ b/src/primaite/game/agent/actions.py @@ -222,15 +222,11 @@ class NodeApplicationFixAction(NodeApplicationAbstractAction): class NodeApplicationInstallAction(AbstractAction): """Action which installs an application.""" - def __init__( - self, manager: "ActionManager", num_nodes: int, application_name: str, ip_address: str, **kwargs - ) -> None: + def __init__(self, manager: "ActionManager", num_nodes: int, **kwargs) -> None: super().__init__(manager=manager) self.shape: Dict[str, int] = {"node_id": num_nodes} - self.application_name = application_name - self.ip_address = ip_address - def form_request(self, node_id: int) -> List[str]: + def form_request(self, node_id: int, application_name: str, ip_address: str) -> List[str]: """Return the action formatted as a request which can be ingested by the PrimAITE simulation.""" node_name = self.manager.get_node_name_by_idx(node_id) if node_name is None: @@ -242,25 +238,24 @@ class NodeApplicationInstallAction(AbstractAction): "software_manager", "application", "install", - self.application_name, - self.ip_address, + application_name, + ip_address, ] class NodeApplicationRemoveAction(AbstractAction): """Action which removes/uninstalls an application.""" - def __init__(self, manager: "ActionManager", num_nodes: int, application_name: str, **kwargs) -> None: + def __init__(self, manager: "ActionManager", num_nodes: int, **kwargs) -> None: super().__init__(manager=manager) self.shape: Dict[str, int] = {"node_id": num_nodes} - self.application_name = application_name - def form_request(self, node_id: int) -> List[str]: + def form_request(self, node_id: int, application_name: str) -> List[str]: """Return the action formatted as a request which can be ingested by the PrimAITE simulation.""" node_name = self.manager.get_node_name_by_idx(node_id) if node_name is None: return ["do_nothing"] - return ["network", "node", node_name, "software_manager", "application", "uninstall", self.application_name] + return ["network", "node", node_name, "software_manager", "application", "uninstall", application_name] class NodeFolderAbstractAction(AbstractAction): diff --git a/tests/assets/configs/test_application_install.yaml b/tests/assets/configs/test_application_install.yaml new file mode 100644 index 00000000..c1908fc4 --- /dev/null +++ b/tests/assets/configs/test_application_install.yaml @@ -0,0 +1,986 @@ +training_config: + rl_framework: SB3 + rl_algorithm: PPO + seed: 333 + n_learn_episodes: 1 + n_eval_episodes: 5 + max_steps_per_episode: 128 + deterministic_eval: false + n_agents: 1 + agent_references: + - defender + +io_settings: + save_agent_actions: true + save_step_metadata: false + save_pcap_logs: false + save_sys_logs: false + + +game: + max_episode_length: 128 + ports: + - HTTP + - POSTGRES_SERVER + protocols: + - ICMP + - TCP + - UDP + thresholds: + nmne: + high: 10 + medium: 5 + low: 0 + +agents: + - ref: client_2_green_user + team: GREEN + type: ProbabilisticAgent + agent_settings: + action_probabilities: + 0: 0.3 + 1: 0.6 + 2: 0.1 + observation_space: + type: UC2GreenObservation + action_space: + action_list: + - type: DONOTHING + - type: NODE_APPLICATION_EXECUTE + options: + nodes: + - node_name: client_2 + applications: + - application_name: WebBrowser + - application_name: DatabaseClient + max_folders_per_node: 1 + max_files_per_folder: 1 + max_services_per_node: 1 + max_applications_per_node: 2 + action_map: + 0: + action: DONOTHING + options: {} + 1: + action: NODE_APPLICATION_EXECUTE + options: + node_id: 0 + application_id: 0 + 2: + action: NODE_APPLICATION_EXECUTE + options: + node_id: 0 + application_id: 1 + + reward_function: + reward_components: + - type: WEBPAGE_UNAVAILABLE_PENALTY + weight: 0.25 + options: + node_hostname: client_2 + - type: GREEN_ADMIN_DATABASE_UNREACHABLE_PENALTY + weight: 0.05 + options: + node_hostname: client_2 + + - ref: client_1_green_user + team: GREEN + type: ProbabilisticAgent + agent_settings: + action_probabilities: + 0: 0.3 + 1: 0.6 + 2: 0.1 + observation_space: + type: UC2GreenObservation + action_space: + action_list: + - type: DONOTHING + - type: NODE_APPLICATION_EXECUTE + options: + nodes: + - node_name: client_1 + applications: + - application_name: WebBrowser + - application_name: DatabaseClient + max_folders_per_node: 1 + max_files_per_folder: 1 + max_services_per_node: 1 + max_applications_per_node: 2 + action_map: + 0: + action: DONOTHING + options: {} + 1: + action: NODE_APPLICATION_EXECUTE + options: + node_id: 0 + application_id: 0 + 2: + action: NODE_APPLICATION_EXECUTE + options: + node_id: 0 + application_id: 1 + + reward_function: + reward_components: + - type: WEBPAGE_UNAVAILABLE_PENALTY + weight: 0.25 + options: + node_hostname: client_1 + - type: GREEN_ADMIN_DATABASE_UNREACHABLE_PENALTY + weight: 0.05 + options: + node_hostname: client_1 + + + + + + - ref: data_manipulation_attacker + team: RED + type: RedDatabaseCorruptingAgent + + observation_space: + type: UC2RedObservation + options: + nodes: {} + + action_space: + action_list: + - type: DONOTHING + - type: NODE_APPLICATION_EXECUTE + options: + nodes: + - node_name: client_1 + applications: + - application_name: DataManipulationBot + - node_name: client_2 + applications: + - application_name: DataManipulationBot + max_folders_per_node: 1 + max_files_per_folder: 1 + max_services_per_node: 1 + + reward_function: + reward_components: + - type: DUMMY + + agent_settings: # options specific to this particular agent type, basically args of __init__(self) + start_settings: + start_step: 25 + frequency: 20 + variance: 5 + + - ref: defender + team: BLUE + type: ProxyAgent + + observation_space: + type: UC2BlueObservation + options: + num_services_per_node: 1 + num_folders_per_node: 1 + num_files_per_folder: 1 + num_nics_per_node: 2 + nodes: + - node_hostname: domain_controller + services: + - service_name: DNSServer + - node_hostname: web_server + services: + - service_name: WebServer + - node_hostname: database_server + folders: + - folder_name: database + files: + - file_name: database.db + - node_hostname: backup_server + - node_hostname: security_suite + - node_hostname: client_1 + - node_hostname: client_2 + links: + - link_ref: router_1___switch_1 + - link_ref: router_1___switch_2 + - link_ref: switch_1___domain_controller + - link_ref: switch_1___web_server + - link_ref: switch_1___database_server + - link_ref: switch_1___backup_server + - link_ref: switch_1___security_suite + - link_ref: switch_2___client_1 + - link_ref: switch_2___client_2 + - link_ref: switch_2___security_suite + acl: + options: + max_acl_rules: 10 + router_hostname: router_1 + ip_address_order: + - node_hostname: domain_controller + nic_num: 1 + - node_hostname: web_server + nic_num: 1 + - node_hostname: database_server + nic_num: 1 + - node_hostname: backup_server + nic_num: 1 + - node_hostname: security_suite + nic_num: 1 + - node_hostname: client_1 + nic_num: 1 + - node_hostname: client_2 + nic_num: 1 + - node_hostname: security_suite + nic_num: 2 + ics: null + + action_space: + action_list: + - type: DONOTHING + - type: NODE_SERVICE_SCAN + - type: NODE_SERVICE_STOP + - type: NODE_SERVICE_START + - type: NODE_SERVICE_PAUSE + - type: NODE_SERVICE_RESUME + - type: NODE_SERVICE_RESTART + - type: NODE_SERVICE_DISABLE + - type: NODE_SERVICE_ENABLE + - type: NODE_SERVICE_FIX + - type: NODE_FILE_SCAN + - type: NODE_FILE_CHECKHASH + - type: NODE_FILE_DELETE + - type: NODE_FILE_REPAIR + - type: NODE_FILE_RESTORE + - type: NODE_FOLDER_SCAN + - type: NODE_FOLDER_CHECKHASH + - type: NODE_FOLDER_REPAIR + - type: NODE_FOLDER_RESTORE + - type: NODE_OS_SCAN + - type: NODE_SHUTDOWN + - type: NODE_STARTUP + - type: NODE_RESET + - type: NETWORK_ACL_ADDRULE + options: + target_router_hostname: router_1 + - type: NETWORK_ACL_REMOVERULE + options: + target_router_hostname: router_1 + - type: NETWORK_NIC_ENABLE + - type: NETWORK_NIC_DISABLE + - type: NODE_APPLICATION_INSTALL + - type: NODE_APPLICATION_REMOVE + - type: NODE_APPLICATION_EXECUTE + + action_map: + 0: + action: DONOTHING + options: {} + # scan webapp service + 1: + action: NODE_SERVICE_SCAN + options: + node_id: 1 + service_id: 0 + # stop webapp service + 2: + action: NODE_SERVICE_STOP + options: + node_id: 1 + service_id: 0 + # start webapp service + 3: + action: "NODE_SERVICE_START" + options: + node_id: 1 + service_id: 0 + 4: + action: "NODE_SERVICE_PAUSE" + options: + node_id: 1 + service_id: 0 + 5: + action: "NODE_SERVICE_RESUME" + options: + node_id: 1 + service_id: 0 + 6: + action: "NODE_SERVICE_RESTART" + options: + node_id: 1 + service_id: 0 + 7: + action: "NODE_SERVICE_DISABLE" + options: + node_id: 1 + service_id: 0 + 8: + action: "NODE_SERVICE_ENABLE" + options: + node_id: 1 + service_id: 0 + 9: # check database.db file + action: "NODE_FILE_SCAN" + options: + node_id: 2 + folder_id: 0 + file_id: 0 + 10: + action: "NODE_FILE_SCAN" # CHECKHASH replaced by SCAN - but the behaviour is the same in this context. + options: + node_id: 2 + folder_id: 0 + file_id: 0 + 11: + action: "NODE_FILE_DELETE" + options: + node_id: 2 + folder_id: 0 + file_id: 0 + 12: + action: "NODE_FILE_REPAIR" + options: + node_id: 2 + folder_id: 0 + file_id: 0 + 13: + action: "NODE_SERVICE_FIX" + options: + node_id: 2 + service_id: 0 + 14: + action: "NODE_FOLDER_SCAN" + options: + node_id: 2 + folder_id: 0 + 15: + action: "NODE_FOLDER_SCAN" # CHECKHASH replaced by SCAN - but the behaviour is the same in this context. + options: + node_id: 2 + folder_id: 0 + 16: + action: "NODE_FOLDER_REPAIR" + options: + node_id: 2 + folder_id: 0 + 17: + action: "NODE_FOLDER_RESTORE" + options: + node_id: 2 + folder_id: 0 + 18: + action: "NODE_OS_SCAN" + options: + node_id: 0 + 19: + action: "NODE_SHUTDOWN" + options: + node_id: 0 + 20: + action: NODE_STARTUP + options: + node_id: 0 + 21: + action: NODE_RESET + options: + node_id: 0 + 22: + action: "NODE_OS_SCAN" + options: + node_id: 1 + 23: + action: "NODE_SHUTDOWN" + options: + node_id: 1 + 24: + action: NODE_STARTUP + options: + node_id: 1 + 25: + action: NODE_RESET + options: + node_id: 1 + 26: # old action num: 18 + action: "NODE_OS_SCAN" + options: + node_id: 2 + 27: + action: "NODE_SHUTDOWN" + options: + node_id: 2 + 28: + action: NODE_STARTUP + options: + node_id: 2 + 29: + action: NODE_RESET + options: + node_id: 2 + 30: + action: "NODE_OS_SCAN" + options: + node_id: 3 + 31: + action: "NODE_SHUTDOWN" + options: + node_id: 3 + 32: + action: NODE_STARTUP + options: + node_id: 3 + 33: + action: NODE_RESET + options: + node_id: 3 + 34: + action: "NODE_OS_SCAN" + options: + node_id: 4 + 35: + action: "NODE_SHUTDOWN" + options: + node_id: 4 + 36: + action: NODE_STARTUP + options: + node_id: 4 + 37: + action: NODE_RESET + options: + node_id: 4 + 38: + action: "NODE_OS_SCAN" + options: + node_id: 5 + 39: # old action num: 19 # shutdown client 1 + action: "NODE_SHUTDOWN" + options: + node_id: 5 + 40: # old action num: 20 + action: NODE_STARTUP + options: + node_id: 5 + 41: # old action num: 21 + action: NODE_RESET + options: + node_id: 5 + 42: + action: "NODE_OS_SCAN" + options: + node_id: 6 + 43: + action: "NODE_SHUTDOWN" + options: + node_id: 6 + 44: + action: NODE_STARTUP + options: + node_id: 6 + 45: + action: NODE_RESET + options: + node_id: 6 + + 46: # old action num: 22 # "ACL: ADDRULE - Block outgoing traffic from client 1" + action: "NETWORK_ACL_ADDRULE" + options: + position: 1 + permission: 2 + source_ip_id: 7 # client 1 + dest_ip_id: 1 # ALL + source_port_id: 1 + dest_port_id: 1 + protocol_id: 1 + 47: # old action num: 23 # "ACL: ADDRULE - Block outgoing traffic from client 2" + action: "NETWORK_ACL_ADDRULE" + options: + position: 2 + permission: 2 + source_ip_id: 8 # client 2 + dest_ip_id: 1 # ALL + source_port_id: 1 + dest_port_id: 1 + protocol_id: 1 + 48: # old action num: 24 # block tcp traffic from client 1 to web app + action: "NETWORK_ACL_ADDRULE" + options: + position: 3 + permission: 2 + source_ip_id: 7 # client 1 + dest_ip_id: 3 # web server + source_port_id: 1 + dest_port_id: 1 + protocol_id: 3 + 49: # old action num: 25 # block tcp traffic from client 2 to web app + action: "NETWORK_ACL_ADDRULE" + options: + position: 4 + permission: 2 + source_ip_id: 8 # client 2 + dest_ip_id: 3 # web server + source_port_id: 1 + dest_port_id: 1 + protocol_id: 3 + 50: # old action num: 26 + action: "NETWORK_ACL_ADDRULE" + options: + position: 5 + permission: 2 + source_ip_id: 7 # client 1 + dest_ip_id: 4 # database + source_port_id: 1 + dest_port_id: 1 + protocol_id: 3 + 51: # old action num: 27 + action: "NETWORK_ACL_ADDRULE" + options: + position: 6 + permission: 2 + source_ip_id: 8 # client 2 + dest_ip_id: 4 # database + source_port_id: 1 + dest_port_id: 1 + protocol_id: 3 + 52: # old action num: 28 + action: "NETWORK_ACL_REMOVERULE" + options: + position: 0 + 53: # old action num: 29 + action: "NETWORK_ACL_REMOVERULE" + options: + position: 1 + 54: # old action num: 30 + action: "NETWORK_ACL_REMOVERULE" + options: + position: 2 + 55: # old action num: 31 + action: "NETWORK_ACL_REMOVERULE" + options: + position: 3 + 56: # old action num: 32 + action: "NETWORK_ACL_REMOVERULE" + options: + position: 4 + 57: # old action num: 33 + action: "NETWORK_ACL_REMOVERULE" + options: + position: 5 + 58: # old action num: 34 + action: "NETWORK_ACL_REMOVERULE" + options: + position: 6 + 59: # old action num: 35 + action: "NETWORK_ACL_REMOVERULE" + options: + position: 7 + 60: # old action num: 36 + action: "NETWORK_ACL_REMOVERULE" + options: + position: 8 + 61: # old action num: 37 + action: "NETWORK_ACL_REMOVERULE" + options: + position: 9 + 62: # old action num: 38 + action: "NETWORK_NIC_DISABLE" + options: + node_id: 0 + nic_id: 0 + 63: # old action num: 39 + action: "NETWORK_NIC_ENABLE" + options: + node_id: 0 + nic_id: 0 + 64: # old action num: 40 + action: "NETWORK_NIC_DISABLE" + options: + node_id: 1 + nic_id: 0 + 65: # old action num: 41 + action: "NETWORK_NIC_ENABLE" + options: + node_id: 1 + nic_id: 0 + 66: # old action num: 42 + action: "NETWORK_NIC_DISABLE" + options: + node_id: 2 + nic_id: 0 + 67: # old action num: 43 + action: "NETWORK_NIC_ENABLE" + options: + node_id: 2 + nic_id: 0 + 68: # old action num: 44 + action: "NETWORK_NIC_DISABLE" + options: + node_id: 3 + nic_id: 0 + 69: # old action num: 45 + action: "NETWORK_NIC_ENABLE" + options: + node_id: 3 + nic_id: 0 + 70: # old action num: 46 + action: "NETWORK_NIC_DISABLE" + options: + node_id: 4 + nic_id: 0 + 71: # old action num: 47 + action: "NETWORK_NIC_ENABLE" + options: + node_id: 4 + nic_id: 0 + 72: # old action num: 48 + action: "NETWORK_NIC_DISABLE" + options: + node_id: 4 + nic_id: 1 + 73: # old action num: 49 + action: "NETWORK_NIC_ENABLE" + options: + node_id: 4 + nic_id: 1 + 74: # old action num: 50 + action: "NETWORK_NIC_DISABLE" + options: + node_id: 5 + nic_id: 0 + 75: # old action num: 51 + action: "NETWORK_NIC_ENABLE" + options: + node_id: 5 + nic_id: 0 + 76: # old action num: 52 + action: "NETWORK_NIC_DISABLE" + options: + node_id: 6 + nic_id: 0 + 77: # old action num: 53 + action: "NETWORK_NIC_ENABLE" + options: + node_id: 6 + nic_id: 0 + 78: + action: NODE_APPLICATION_INSTALL + options: + node_id: 0 + application_name: DoSBot + ip_address: 192.168.1.14 + 79: + action: NODE_APPLICATION_REMOVE + options: + node_id: 0 + application_name: DoSBot + 80: + action: NODE_APPLICATION_REMOVE + options: + node_id: 0 + application_name: WebBrowser + 81: + action: NODE_APPLICATION_EXECUTE + options: + node_id: 0 + application_id: 0 + + + + options: + nodes: + - node_name: domain_controller + applications: + - application_name: DoSBot + - node_name: web_server + applications: + - application_name: DatabaseClient + services: + - service_name: WebServer + - node_name: database_server + folders: + - folder_name: database + files: + - file_name: database.db + services: + - service_name: DatabaseService + - node_name: backup_server + - node_name: security_suite + - node_name: client_1 + - node_name: client_2 + + max_folders_per_node: 2 + max_files_per_folder: 2 + max_services_per_node: 2 + max_nics_per_node: 8 + max_acl_rules: 10 + ip_address_order: + - node_name: domain_controller + nic_num: 1 + - node_name: web_server + nic_num: 1 + - node_name: database_server + nic_num: 1 + - node_name: backup_server + nic_num: 1 + - node_name: security_suite + nic_num: 1 + - node_name: client_1 + nic_num: 1 + - node_name: client_2 + nic_num: 1 + - node_name: security_suite + nic_num: 2 + + + reward_function: + reward_components: + - type: DATABASE_FILE_INTEGRITY + weight: 0.40 + options: + node_hostname: database_server + folder_name: database + file_name: database.db + - type: SHARED_REWARD + weight: 1.0 + options: + agent_name: client_1_green_user + - type: SHARED_REWARD + weight: 1.0 + options: + agent_name: client_2_green_user + + + + agent_settings: + flatten_obs: true + + + + + +simulation: + network: + nmne_config: + capture_nmne: true + nmne_capture_keywords: + - DELETE + nodes: + + - ref: router_1 + hostname: router_1 + type: router + num_ports: 5 + ports: + 1: + ip_address: 192.168.1.1 + subnet_mask: 255.255.255.0 + 2: + ip_address: 192.168.10.1 + subnet_mask: 255.255.255.0 + acl: + 18: + action: PERMIT + src_port: POSTGRES_SERVER + dst_port: POSTGRES_SERVER + 19: + action: PERMIT + src_port: DNS + dst_port: DNS + 20: + action: PERMIT + src_port: FTP + dst_port: FTP + 21: + action: PERMIT + src_port: HTTP + dst_port: HTTP + 22: + action: PERMIT + src_port: ARP + dst_port: ARP + 23: + action: PERMIT + protocol: ICMP + + - ref: switch_1 + hostname: switch_1 + type: switch + num_ports: 8 + + - ref: switch_2 + hostname: switch_2 + type: switch + num_ports: 8 + + - ref: domain_controller + hostname: domain_controller + type: server + ip_address: 192.168.1.10 + subnet_mask: 255.255.255.0 + default_gateway: 192.168.1.1 + services: + - ref: domain_controller_dns_server + type: DNSServer + options: + domain_mapping: + arcd.com: 192.168.1.12 # web server + + - ref: web_server + hostname: web_server + type: server + ip_address: 192.168.1.12 + subnet_mask: 255.255.255.0 + default_gateway: 192.168.1.1 + dns_server: 192.168.1.10 + services: + - ref: web_server_web_service + type: WebServer + applications: + - ref: web_server_database_client + type: DatabaseClient + options: + db_server_ip: 192.168.1.14 + + + - ref: database_server + hostname: database_server + type: server + ip_address: 192.168.1.14 + subnet_mask: 255.255.255.0 + default_gateway: 192.168.1.1 + dns_server: 192.168.1.10 + services: + - ref: database_service + type: DatabaseService + options: + backup_server_ip: 192.168.1.16 + - ref: database_ftp_client + type: FTPClient + + - ref: backup_server + hostname: backup_server + type: server + ip_address: 192.168.1.16 + subnet_mask: 255.255.255.0 + default_gateway: 192.168.1.1 + dns_server: 192.168.1.10 + services: + - ref: backup_service + type: FTPServer + + - ref: security_suite + hostname: security_suite + type: server + ip_address: 192.168.1.110 + subnet_mask: 255.255.255.0 + default_gateway: 192.168.1.1 + dns_server: 192.168.1.10 + network_interfaces: + 2: # unfortunately this number is currently meaningless, they're just added in order and take up the next available slot + ip_address: 192.168.10.110 + subnet_mask: 255.255.255.0 + + - ref: client_1 + hostname: client_1 + type: computer + ip_address: 192.168.10.21 + subnet_mask: 255.255.255.0 + default_gateway: 192.168.10.1 + dns_server: 192.168.1.10 + applications: + - ref: data_manipulation_bot + type: DataManipulationBot + options: + port_scan_p_of_success: 0.8 + data_manipulation_p_of_success: 0.8 + payload: "DELETE" + server_ip: 192.168.1.14 + - ref: client_1_web_browser + type: WebBrowser + options: + target_url: http://arcd.com/users/ + - ref: client_1_database_client + type: DatabaseClient + options: + db_server_ip: 192.168.1.14 + services: + - ref: client_1_dns_client + type: DNSClient + + - ref: client_2 + hostname: client_2 + type: computer + ip_address: 192.168.10.22 + subnet_mask: 255.255.255.0 + default_gateway: 192.168.10.1 + dns_server: 192.168.1.10 + applications: + - ref: client_2_web_browser + type: WebBrowser + options: + target_url: http://arcd.com/users/ + - ref: data_manipulation_bot + type: DataManipulationBot + options: + port_scan_p_of_success: 0.8 + data_manipulation_p_of_success: 0.8 + payload: "DELETE" + server_ip: 192.168.1.14 + - ref: client_2_database_client + type: DatabaseClient + options: + db_server_ip: 192.168.1.14 + services: + - ref: client_2_dns_client + type: DNSClient + + + + links: + - ref: router_1___switch_1 + endpoint_a_ref: router_1 + endpoint_a_port: 1 + endpoint_b_ref: switch_1 + endpoint_b_port: 8 + - ref: router_1___switch_2 + endpoint_a_ref: router_1 + endpoint_a_port: 2 + endpoint_b_ref: switch_2 + endpoint_b_port: 8 + - ref: switch_1___domain_controller + endpoint_a_ref: switch_1 + endpoint_a_port: 1 + endpoint_b_ref: domain_controller + endpoint_b_port: 1 + - ref: switch_1___web_server + endpoint_a_ref: switch_1 + endpoint_a_port: 2 + endpoint_b_ref: web_server + endpoint_b_port: 1 + - ref: switch_1___database_server + endpoint_a_ref: switch_1 + endpoint_a_port: 3 + endpoint_b_ref: database_server + endpoint_b_port: 1 + - ref: switch_1___backup_server + endpoint_a_ref: switch_1 + endpoint_a_port: 4 + endpoint_b_ref: backup_server + endpoint_b_port: 1 + - ref: switch_1___security_suite + endpoint_a_ref: switch_1 + endpoint_a_port: 7 + endpoint_b_ref: security_suite + endpoint_b_port: 1 + - ref: switch_2___client_1 + endpoint_a_ref: switch_2 + endpoint_a_port: 1 + endpoint_b_ref: client_1 + endpoint_b_port: 1 + - ref: switch_2___client_2 + endpoint_a_ref: switch_2 + endpoint_a_port: 2 + endpoint_b_ref: client_2 + endpoint_b_port: 1 + - ref: switch_2___security_suite + endpoint_a_ref: switch_2 + endpoint_a_port: 7 + endpoint_b_ref: security_suite + endpoint_b_port: 2 diff --git a/tests/conftest.py b/tests/conftest.py index be76fc92..fd8727cb 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -480,8 +480,8 @@ def game_and_agent(): {"type": "NODE_APPLICATION_SCAN"}, {"type": "NODE_APPLICATION_CLOSE"}, {"type": "NODE_APPLICATION_FIX"}, - {"type": "NODE_APPLICATION_INSTALL", "options": {"application_name": "DoSBot", "ip_address": "192.168.1.14"}}, - {"type": "NODE_APPLICATION_REMOVE", "options": {"application_name": "DoSBot"}}, + {"type": "NODE_APPLICATION_INSTALL"}, + {"type": "NODE_APPLICATION_REMOVE"}, {"type": "NODE_FILE_SCAN"}, {"type": "NODE_FILE_CHECKHASH"}, {"type": "NODE_FILE_DELETE"}, diff --git a/tests/e2e_integration_tests/test_uc2_data_manipulation_scenario.py b/tests/e2e_integration_tests/test_uc2_data_manipulation_scenario.py index b68a887e..2fee561a 100644 --- a/tests/e2e_integration_tests/test_uc2_data_manipulation_scenario.py +++ b/tests/e2e_integration_tests/test_uc2_data_manipulation_scenario.py @@ -1,8 +1,13 @@ +import yaml + +from primaite.game.game import PrimaiteGame +from primaite.session.environment import PrimaiteGymEnv from primaite.simulator.network.hardware.nodes.host.computer import Computer from primaite.simulator.network.hardware.nodes.host.server import Server from primaite.simulator.system.applications.database_client import DatabaseClient from primaite.simulator.system.applications.red_applications.data_manipulation_bot import DataManipulationBot from primaite.simulator.system.services.database.database_service import DatabaseService +from tests import TEST_ASSETS_ROOT def test_data_manipulation(uc2_network): @@ -32,3 +37,27 @@ def test_data_manipulation(uc2_network): # Now check that the DB client on the web_server can successfully query the users table on the database assert db_client.query("SELECT") + + +def test_application_install_uninstall_on_uc2(): + """Test Application install and uninstall via agent actions mid episode.""" + with open(TEST_ASSETS_ROOT / "configs/test_application_install.yaml", "r") as f: + cfg = yaml.safe_load(f) + + env = PrimaiteGymEnv(game_config=cfg) + env.agent.flatten_obs = False + env.reset() + + _, _, _, _, _ = env.step(0) + domcon = env.game.simulation.network.get_node_by_hostname("domain_controller") + + _, _, _, _, _ = env.step(78) + assert "DoSBot" in domcon.software_manager.software + + _, _, _, _, _ = env.step(79) + + assert "DoSBot" not in domcon.software_manager.software + assert "WebBrowser" in domcon.software_manager.software + + _, _, _, _, _ = env.step(80) + assert "WebBrowser" not in domcon.software_manager.software diff --git a/tests/integration_tests/game_layer/test_actions.py b/tests/integration_tests/game_layer/test_actions.py index 5ba58ee5..96e3f390 100644 --- a/tests/integration_tests/game_layer/test_actions.py +++ b/tests/integration_tests/game_layer/test_actions.py @@ -470,13 +470,13 @@ def test_node_application_install_and_uninstall_integration(game_and_agent: Tupl assert client_1.software_manager.software.get("DoSBot") is None - action = ("NODE_APPLICATION_INSTALL", {"node_id": 0}) + action = ("NODE_APPLICATION_INSTALL", {"node_id": 0, "application_name": "DoSBot", "ip_address": "192.168.1.14"}) agent.store_action(action) game.step() assert client_1.software_manager.software.get("DoSBot") is not None - action = ("NODE_APPLICATION_REMOVE", {"node_id": 0}) + action = ("NODE_APPLICATION_REMOVE", {"node_id": 0, "application_name": "DoSBot"}) agent.store_action(action) game.step() From cfea38c5a727bfcfa42922dcbc5c285636f833e0 Mon Sep 17 00:00:00 2001 From: Cristian-VM2 Date: Thu, 28 Mar 2024 15:34:47 +0000 Subject: [PATCH 061/124] #2405 refactor e2e test, fix uninstalled apps not being removed from the request manager --- .../simulator/network/hardware/base.py | 6 +++-- .../test_uc2_data_manipulation_scenario.py | 22 +++++++++++++++---- 2 files changed, 22 insertions(+), 6 deletions(-) diff --git a/src/primaite/simulator/network/hardware/base.py b/src/primaite/simulator/network/hardware/base.py index 754c7a24..bfa547d2 100644 --- a/src/primaite/simulator/network/hardware/base.py +++ b/src/primaite/simulator/network/hardware/base.py @@ -1343,7 +1343,7 @@ class Node(SimComponent): else: pass - if application in self: + if application_instance.name in self.software_manager.software: return True else: return False @@ -1367,7 +1367,7 @@ class Node(SimComponent): application_instance = self.software_manager.software.get( str(application.__name__) ) # This works because we can't have two applications with the same name on the same node - self.uninstall_application(application_instance) + # self.uninstall_application(application_instance) self.software_manager.uninstall(application_instance.name) if application_instance.name not in self.software_manager.software: @@ -1406,4 +1406,6 @@ class Node(SimComponent): def __contains__(self, item: Any) -> bool: if isinstance(item, Service): return item.uuid in self.services + elif isinstance(item, Application): + return item.uuid in self.applications return None diff --git a/tests/e2e_integration_tests/test_uc2_data_manipulation_scenario.py b/tests/e2e_integration_tests/test_uc2_data_manipulation_scenario.py index 2fee561a..0b31a353 100644 --- a/tests/e2e_integration_tests/test_uc2_data_manipulation_scenario.py +++ b/tests/e2e_integration_tests/test_uc2_data_manipulation_scenario.py @@ -51,13 +51,27 @@ def test_application_install_uninstall_on_uc2(): _, _, _, _, _ = env.step(0) domcon = env.game.simulation.network.get_node_by_hostname("domain_controller") - _, _, _, _, _ = env.step(78) + # Test we cannot execute the DoSBot app as it is not installed yet + _, _, _, _, info = env.step(81) + assert info["agent_actions"]["defender"].response.status == "unreachable" + + # Test we can Install the DoSBot app + _, _, _, _, info = env.step(78) assert "DoSBot" in domcon.software_manager.software - _, _, _, _, _ = env.step(79) + # Test we can now execute the DoSBot app + _, _, _, _, info = env.step(81) + assert info["agent_actions"]["defender"].response.status == "success" + # Test we can Uninstall the DoSBot app + _, _, _, _, info = env.step(79) assert "DoSBot" not in domcon.software_manager.software - assert "WebBrowser" in domcon.software_manager.software - _, _, _, _, _ = env.step(80) + # Test we cannot execute the DoSBot app as it was uninstalled + _, _, _, _, info = env.step(81) + assert info["agent_actions"]["defender"].response.status == "unreachable" + + # Test we can uninstall one of the default apps (WebBrowser) + assert "WebBrowser" in domcon.software_manager.software + _, _, _, _, info = env.step(80) assert "WebBrowser" not in domcon.software_manager.software From 1ac3e1c6b412e68055dd47a689ea6baca564f302 Mon Sep 17 00:00:00 2001 From: Chris McCarthy Date: Thu, 28 Mar 2024 15:52:08 +0000 Subject: [PATCH 062/124] #2149 - Created a Router-specific version of SessionManager that looks at route table rather than default gateway when dst ip address isn't for a locally attached network. Carried these changes through to arp. Added test for this. Made some minor improvements to show functions in container and node that assist debugging. --- CHANGELOG.md | 1 + src/primaite/simulator/network/container.py | 6 +- .../simulator/network/hardware/base.py | 7 +- .../network/hardware/nodes/network/router.py | 159 +++++++++++++++++- .../simulator/system/services/arp/arp.py | 4 + .../integration_tests/network/test_routing.py | 11 ++ 6 files changed, 177 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c01f0139..f9667525 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -107,6 +107,7 @@ SessionManager. - Ability to add ``Router``/``Firewall`` ``ACLRule`` via config - NMNE capturing capabilities to `NetworkInterface` class for detecting and logging Malicious Network Events. - New `nmne_config` settings in the simulation configuration to enable NMNE capturing and specify keywords such as "DELETE". +- Router-specific SessionManager Implementation: Introduced a specialized version of the SessionManager tailored for router operations. This enhancement enables the SessionManager to determine the routing path by consulting the route table. ### Changed - Integrated the RouteTable into the Routers frame processing. diff --git a/src/primaite/simulator/network/container.py b/src/primaite/simulator/network/container.py index a4079fb8..92ee9f0d 100644 --- a/src/primaite/simulator/network/container.py +++ b/src/primaite/simulator/network/container.py @@ -170,7 +170,9 @@ class Network(SimComponent): print(table) if links: - table = PrettyTable(["Endpoint A", "Endpoint B", "is Up", "Bandwidth (MBits)", "Current Load"]) + table = PrettyTable( + ["Endpoint A", "A Port", "Endpoint B", "B Port", "is Up", "Bandwidth (MBits)", "Current Load"] + ) if markdown: table.set_style(MARKDOWN) table.align = "l" @@ -183,7 +185,9 @@ class Network(SimComponent): table.add_row( [ link.endpoint_a.parent.hostname, + str(link.endpoint_a), link.endpoint_b.parent.hostname, + str(link.endpoint_b), link.is_up, link.bandwidth, link.current_load_percent, diff --git a/src/primaite/simulator/network/hardware/base.py b/src/primaite/simulator/network/hardware/base.py index 38d20e1f..208185a3 100644 --- a/src/primaite/simulator/network/hardware/base.py +++ b/src/primaite/simulator/network/hardware/base.py @@ -889,8 +889,9 @@ class Node(SimComponent): table.align = "l" table.title = f"{self.hostname} Open Ports" for port in self.software_manager.get_open_ports(): - table.add_row([port.value, port.name]) - print(table) + if port.value > 0: + table.add_row([port.value, port.name]) + print(table.get_string(sortby="Port")) @property def has_enabled_network_interface(self) -> bool: @@ -918,7 +919,7 @@ class Node(SimComponent): table.add_row( [ port, - type(network_interface), + network_interface.__class__.__name__, network_interface.mac_address, f"{network_interface.ip_address}/{network_interface.ip_network.prefixlen}", network_interface.speed, diff --git a/src/primaite/simulator/network/hardware/nodes/network/router.py b/src/primaite/simulator/network/hardware/nodes/network/router.py index 102eb7dc..6571829a 100644 --- a/src/primaite/simulator/network/hardware/nodes/network/router.py +++ b/src/primaite/simulator/network/hardware/nodes/network/router.py @@ -18,6 +18,7 @@ from primaite.simulator.network.protocols.icmp import ICMPPacket, ICMPType from primaite.simulator.network.transmission.data_link_layer import Frame from primaite.simulator.network.transmission.network_layer import IPProtocol from primaite.simulator.network.transmission.transport_layer import Port +from primaite.simulator.system.core.session_manager import SessionManager from primaite.simulator.system.core.sys_log import SysLog from primaite.simulator.system.services.arp.arp import ARP from primaite.simulator.system.services.icmp.icmp import ICMP @@ -624,11 +625,12 @@ class RouteTable(SimComponent): """ pass + @validate_call() def add_route( self, - address: Union[IPv4Address, str], - subnet_mask: Union[IPv4Address, str], - next_hop_ip_address: Union[IPv4Address, str], + address: Union[IPV4Address, str], + subnet_mask: Union[IPV4Address, str], + next_hop_ip_address: Union[IPV4Address, str], metric: float = 0.0, ): """ @@ -647,7 +649,8 @@ class RouteTable(SimComponent): ) self.routes.append(route) - def set_default_route_next_hop_ip_address(self, ip_address: IPv4Address): + @validate_call() + def set_default_route_next_hop_ip_address(self, ip_address: IPV4Address): """ Sets the next-hop IP address for the default route in a routing table. @@ -660,7 +663,7 @@ class RouteTable(SimComponent): """ if not self.default_route: self.default_route = RouteEntry( - ip_address=IPv4Address("0.0.0.0"), + address=IPv4Address("0.0.0.0"), subnet_mask=IPv4Address("0.0.0.0"), next_hop_ip_address=ip_address, ) @@ -1016,6 +1019,144 @@ class RouterInterface(IPWiredNetworkInterface): return f"Port {self.port_name if self.port_name else self.port_num}: {self.mac_address}/{self.ip_address}" +class RouterSessionManager(SessionManager): + """ + Manages network sessions, including session creation, lookup, and communication with other components. + + The RouterSessionManager is a Router/Firewall specific implementation of SessionManager. It enables to resolve + outbound interface transmission details functions to leverage the route table instead of the default gateway. + + :param sys_log: A reference to the system log component. + :param arp_cache: A reference to the ARP cache component. + """ + + def resolve_outbound_network_interface(self, dst_ip_address: IPv4Address) -> Optional[RouterInterface]: + """ + Resolves the appropriate outbound network interface for a given destination IP address. + + This method determines the most suitable network interface for sending a packet to the specified + destination IP address. It considers only enabled network interfaces and checks if the destination + IP address falls within the subnet of each interface. If no suitable local network interface is found, + the method defaults to performing a route table look-up to determine if there is a dedicated route or a default + route it can use. + + The search process prioritises local network interfaces based on the IP network to which they belong. + If the destination IP address does not match any local subnet, the method assumes that the destination + is outside the local network and hence, routes the packet according to route table look-up. + + :param dst_ip_address: The destination IP address for which the outbound interface is to be resolved. + :type dst_ip_address: IPv4Address + :return: The network interface through which the packet should be sent to reach the destination IP address, + or the default gateway's network interface if the destination is not within any local subnet. + :rtype: Optional[RouterInterface] + """ + network_interface = super().resolve_outbound_network_interface(dst_ip_address) + if not network_interface: + route = self.node.route_table.find_best_route(dst_ip_address) + if not route: + return None + network_interface = super().resolve_outbound_network_interface(route.next_hop_ip_address) + return network_interface + + def resolve_outbound_transmission_details( + self, + dst_ip_address: Optional[Union[IPv4Address, IPv4Network]] = None, + src_port: Optional[Port] = None, + dst_port: Optional[Port] = None, + protocol: Optional[IPProtocol] = None, + session_id: Optional[str] = None, + ) -> Tuple[ + Optional[RouterInterface], + Optional[str], + IPv4Address, + Optional[Port], + Optional[Port], + Optional[IPProtocol], + bool, + ]: + """ + Resolves the necessary details for outbound transmission based on the provided parameters. + + This method determines whether the payload should be broadcast or unicast based on the destination IP address + and resolves the outbound network interface and destination MAC address accordingly. + + The method first checks if `session_id` is provided and uses the session details if available. For broadcast + transmissions, it finds a suitable network interface and uses a broadcast MAC address. For unicast + transmissions, it attempts to resolve the destination MAC address using ARP and finds the appropriate + outbound network interface. If the destination IP address is outside the local network and no specific MAC + address is resolved, it defaults to performing a route table look-up to determine if there is a dedicated route + or a default route it can use. + + :param dst_ip_address: The destination IP address or network. If an IPv4Network is provided, the method + treats the transmission as a broadcast to that network. Optional. + :type dst_ip_address: Optional[Union[IPv4Address, IPv4Network]] + :param src_port: The source port number for the transmission. Optional. + :type src_port: Optional[Port] + :param dst_port: The destination port number for the transmission. Optional. + :type dst_port: Optional[Port] + :param protocol: The IP protocol to be used for the transmission. Optional. + :type protocol: Optional[IPProtocol] + :param session_id: The session ID associated with the transmission. If provided, the session details override + other parameters. Optional. + :type session_id: Optional[str] + :return: A tuple containing the resolved outbound network interface, destination MAC address, destination IP + address, source port, destination port, protocol, and a boolean indicating whether the transmission is a + broadcast. + :rtype: Tuple[Optional[RouterInterface], Optional[str], IPv4Address, Optional[Port], Optional[Port], + Optional[IPProtocol], bool] + """ + if dst_ip_address and not isinstance(dst_ip_address, (IPv4Address, IPv4Network)): + dst_ip_address = IPv4Address(dst_ip_address) + is_broadcast = False + outbound_network_interface = None + dst_mac_address = None + + # Use session details if session_id is provided + if session_id: + session = self.sessions_by_uuid[session_id] + + dst_ip_address = session.with_ip_address + protocol = session.protocol + src_port = session.src_port + dst_port = session.dst_port + + # Determine if the payload is for broadcast or unicast + + # Handle broadcast transmission + if isinstance(dst_ip_address, IPv4Network): + is_broadcast = True + dst_ip_address = dst_ip_address.broadcast_address + if dst_ip_address: + # Find a suitable NIC for the broadcast + for network_interface in self.node.network_interfaces.values(): + if dst_ip_address in network_interface.ip_network and network_interface.enabled: + dst_mac_address = "ff:ff:ff:ff:ff:ff" + outbound_network_interface = network_interface + break + else: + # Resolve MAC address for unicast transmission + use_route_table = True + for network_interface in self.node.network_interfaces.values(): + if dst_ip_address in network_interface.ip_network and network_interface.enabled: + dst_mac_address = self.software_manager.arp.get_arp_cache_mac_address(dst_ip_address) + break + + if dst_mac_address: + use_route_table = False + outbound_network_interface = self.software_manager.arp.get_arp_cache_network_interface(dst_ip_address) + + if use_route_table: + route = self.node.route_table.find_best_route(dst_ip_address) + if not route: + raise Exception("cannot use route to resolve outbound details") + + dst_mac_address = self.software_manager.arp.get_arp_cache_mac_address(route.next_hop_ip_address) + outbound_network_interface = self.software_manager.arp.get_arp_cache_network_interface( + route.next_hop_ip_address + ) + return outbound_network_interface, dst_mac_address, dst_ip_address, src_port, dst_port, protocol, is_broadcast + + class Router(NetworkNode): """ Represents a network router, managing routing and forwarding of IP packets across network interfaces. @@ -1049,6 +1190,10 @@ class Router(NetworkNode): if not kwargs.get("route_table"): kwargs["route_table"] = RouteTable(sys_log=kwargs["sys_log"]) super().__init__(hostname=hostname, num_ports=num_ports, **kwargs) + self.session_manager = RouterSessionManager(sys_log=self.sys_log) + self.session_manager.node = self + self.software_manager.session_manager = self.session_manager + self.session_manager.software_manager = self.software_manager for i in range(1, self.num_ports + 1): network_interface = RouterInterface(ip_address="127.0.0.1", subnet_mask="255.0.0.0", gateway="0.0.0.0") self.connect_nic(network_interface) @@ -1418,7 +1563,7 @@ class Router(NetworkNode): :return: Configured router. :rtype: Router """ - router = cls( + router = Router( hostname=cfg["hostname"], num_ports=int(cfg.get("num_ports", "5")), operating_state=NodeOperatingState.ON @@ -1440,8 +1585,8 @@ class Router(NetworkNode): dst_port=None if not (p := r_cfg.get("dst_port")) else Port[p], protocol=None if not (p := r_cfg.get("protocol")) else IPProtocol[p], src_ip_address=r_cfg.get("src_ip"), - dst_ip_address=r_cfg.get("dst_ip"), src_wildcard_mask=r_cfg.get("src_wildcard_mask"), + dst_ip_address=r_cfg.get("dst_ip"), dst_wildcard_mask=r_cfg.get("dst_wildcard_mask"), position=r_num, ) diff --git a/src/primaite/simulator/system/services/arp/arp.py b/src/primaite/simulator/system/services/arp/arp.py index ca5b7619..75bb03ae 100644 --- a/src/primaite/simulator/system/services/arp/arp.py +++ b/src/primaite/simulator/system/services/arp/arp.py @@ -65,6 +65,10 @@ class ARP(Service): """Clears the arp cache.""" self.arp.clear() + def get_default_gateway_network_interface(self) -> Optional[NetworkInterface]: + """Not used at the parent ARP level. Should return None when there is no override by child class.""" + return None + def add_arp_cache_entry( self, ip_address: IPV4Address, mac_address: str, network_interface: NetworkInterface, override: bool = False ): diff --git a/tests/integration_tests/network/test_routing.py b/tests/integration_tests/network/test_routing.py index 4ada807f..869b27be 100644 --- a/tests/integration_tests/network/test_routing.py +++ b/tests/integration_tests/network/test_routing.py @@ -152,6 +152,17 @@ def test_with_routes_can_ping(multi_hop_network): assert pc_a.ping(pc_b.network_interface[1].ip_address) +def test_ping_router_port_multi_hop(multi_hop_network): + pc_a = multi_hop_network.get_node_by_hostname("pc_a") + router_2 = multi_hop_network.get_node_by_hostname("router_2") + + router_2.route_table.add_route( + address="192.168.0.0", subnet_mask="255.255.255.0", next_hop_ip_address="192.168.1.1" + ) + + assert pc_a.ping(router_2.network_interface[1].ip_address) + + def test_routing_services(multi_hop_network): pc_a = multi_hop_network.get_node_by_hostname("pc_a") From f88b4c0f97716ff03344ae22d732252733749c58 Mon Sep 17 00:00:00 2001 From: Marek Wolan Date: Thu, 28 Mar 2024 17:40:27 +0000 Subject: [PATCH 063/124] #2417 more observations --- .../agent/observations/node_observations.py | 539 +++++++++++------- 1 file changed, 322 insertions(+), 217 deletions(-) diff --git a/src/primaite/game/agent/observations/node_observations.py b/src/primaite/game/agent/observations/node_observations.py index 42bdb749..5d46b743 100644 --- a/src/primaite/game/agent/observations/node_observations.py +++ b/src/primaite/game/agent/observations/node_observations.py @@ -1,4 +1,6 @@ +# TODO: make sure when config options are being passed down from higher-level observations to lower-level, but the lower-level also defines that option, don't overwrite. from __future__ import annotations +from ipaddress import IPv4Address from typing import Any, Dict, Iterable, List, Literal, Optional, Tuple, TYPE_CHECKING, Union from gymnasium import spaces @@ -163,7 +165,7 @@ class FolderObservation(AbstractObservation, identifier="FOLDER"): } ) @classmethod - def from_config(cls, config: ConfigSchema, parent_where: WhereType = [] ) -> FileObservation: + def from_config(cls, config: ConfigSchema, parent_where: WhereType = [] ) -> FolderObservation: where = parent_where + ["folders", config.folder_name] #pass down shared/common config items @@ -220,7 +222,7 @@ class NICObservation(AbstractObservation, identifier="NETWORK_INTERFACE"): return space @classmethod - def from_config(cls, config: ConfigSchema, parent_where: WhereType = [] ) -> ServiceObservation: + def from_config(cls, config: ConfigSchema, parent_where: WhereType = [] ) -> NICObservation: return cls(where = parent_where+["NICs", config.nic_num], include_nmne=config.include_nmne) @@ -333,7 +335,7 @@ class HostObservation(AbstractObservation, identifier="HOST"): return spaces.Dict(shape) @classmethod - def from_config(cls, config: ConfigSchema, parent_where: WhereType = None ) -> ServiceObservation: + def from_config(cls, config: ConfigSchema, parent_where: WhereType = None ) -> HostObservation: if parent_where is None: where = ["network", "nodes", config.hostname] else: @@ -369,78 +371,282 @@ class HostObservation(AbstractObservation, identifier="HOST"): class PortObservation(AbstractObservation, identifier="PORT"): class ConfigSchema(AbstractObservation.ConfigSchema): - pass + port_id : int def __init__(self, where: WhereType)->None: - pass + self.where = where + self.default_observation: ObsType = {"operating_status" : 0} def observe(self, state: Dict) -> Any: - pass + port_state = access_from_nested_dict(state, self.where) + if port_state is NOT_PRESENT_IN_STATE: + return self.default_observation + return {"operating_status": 1 if port_state["enabled"] else 2 } @property def space(self) -> spaces.Space: - pass + return spaces.Dict({"operating_status": spaces.Discrete(3)}) @classmethod - def from_config(cls, config: ConfigSchema, parent_where: WhereType = [] ) -> ServiceObservation: - pass + def from_config(cls, config: ConfigSchema, parent_where: WhereType = [] ) -> PortObservation: + return cls(where = parent_where + ["NICs", config.port_id]) class ACLObservation(AbstractObservation, identifier="ACL"): class ConfigSchema(AbstractObservation.ConfigSchema): - pass + ip_list: List[IPv4Address] + port_list: List[int] + protocol_list: List[str] + num_rules: int - def __init__(self, where: WhereType)->None: - pass + def __init__(self, where: WhereType, num_rules: int, ip_list: List[IPv4Address], port_list: List[int],protocol_list: List[str])->None: + self.where = where + self.num_rules: int = num_rules + self.ip_to_id: Dict[str, int] = {i+2:p for i,p in enumerate(ip_list)} + self.port_to_id: Dict[int, int] = {i+2:p for i,p in enumerate(port_list)} + self.protocol_to_id: Dict[str, int] = {i+2:p for i,p in enumerate(protocol_list)} + self.default_observation: Dict = { + i + + 1: { + "position": i, + "permission": 0, + "source_node_id": 0, + "source_port": 0, + "dest_node_id": 0, + "dest_port": 0, + "protocol": 0, + } + for i in range(self.num_rules) + } def observe(self, state: Dict) -> Any: - pass + acl_state: Dict = access_from_nested_dict(state, self.where) + if acl_state is NOT_PRESENT_IN_STATE: + return self.default_observation + obs = {} + acl_items = dict(acl_state.items()) + i = 1 # don't show rule 0 for compatibility reasons. + while i < self.num_rules + 1: + rule_state = acl_items[i] + if rule_state is None: + obs[i] = { + "position": i - 1, + "permission": 0, + "source_node_id": 0, + "source_port": 0, + "dest_node_id": 0, + "dest_port": 0, + "protocol": 0, + } + else: + src_ip = rule_state["src_ip_address"] + src_node_id = 1 if src_ip is None else self.node_to_id[IPv4Address(src_ip)] + dst_ip = rule_state["dst_ip_address"] + dst_node_ip = 1 if dst_ip is None else self.node_to_id[IPv4Address(dst_ip)] + src_port = rule_state["src_port"] + src_port_id = 1 if src_port is None else self.port_to_id[src_port] + dst_port = rule_state["dst_port"] + dst_port_id = 1 if dst_port is None else self.port_to_id[dst_port] + protocol = rule_state["protocol"] + protocol_id = 1 if protocol is None else self.protocol_to_id[protocol] + obs[i] = { + "position": i - 1, + "permission": rule_state["action"], + "source_node_id": src_node_id, + "source_port": src_port_id, + "dest_node_id": dst_node_ip, + "dest_port": dst_port_id, + "protocol": protocol_id, + } + i += 1 + return obs @property def space(self) -> spaces.Space: - pass + raise NotImplementedError("TODO: need to add wildcard id.") + return spaces.Dict( + { + i + + 1: spaces.Dict( + { + "position": spaces.Discrete(self.num_rules), + "permission": spaces.Discrete(3), + # adding two to lengths is to account for reserved values 0 (unused) and 1 (any) + "source_node_id": spaces.Discrete(len(set(self.node_to_id.values())) + 2), + "source_port": spaces.Discrete(len(self.port_to_id) + 2), + "dest_node_id": spaces.Discrete(len(set(self.node_to_id.values())) + 2), + "dest_port": spaces.Discrete(len(self.port_to_id) + 2), + "protocol": spaces.Discrete(len(self.protocol_to_id) + 2), + } + ) + for i in range(self.num_rules) + } + ) + @classmethod - def from_config(cls, config: ConfigSchema, parent_where: WhereType = [] ) -> ServiceObservation: - pass + def from_config(cls, config: ConfigSchema, parent_where: WhereType = [] ) -> ACLObservation: + return cls( + where = parent_where+["acl", "acl"], + num_rules = config.num_rules, + ip_list = config.ip_list, + ports = config.port_list, + protocols = config.protocol_list + ) class RouterObservation(AbstractObservation, identifier="ROUTER"): class ConfigSchema(AbstractObservation.ConfigSchema): hostname: str ports: List[PortObservation.ConfigSchema] + num_ports: int + acl: ACLObservation.ConfigSchema + ip_list: List[str] + port_list: List[int] + protocol_list: List[str] + num_rules: int + def __init__(self, + where: WhereType, + ports:List[PortObservation], + num_ports: int, + acl: ACLObservation, + )->None: + self.where: WhereType = where + self.ports: List[PortObservation] = ports + self.acl: ACLObservation = acl + self.num_ports:int = num_ports - def __init__(self, where: WhereType)->None: - pass + while len(self.ports) < num_ports: + self.ports.append(PortObservation(where=None)) + while len(self.ports) > num_ports: + self.ports.pop() + msg = f"Too many ports in router observation. Truncating." + _LOGGER.warning(msg) + + self.default_observation = { + "PORTS": {i+1:p.default_observation for i,p in enumerate(self.ports)}, + "ACL": self.acl.default_observation + } def observe(self, state: Dict) -> Any: - pass + router_state = access_from_nested_dict(state, self.where) + if router_state is NOT_PRESENT_IN_STATE: + return self.default_observation + + obs = {} + obs["PORTS"] = {i+1:p.observe(state) for i,p in enumerate(self.ports)} + obs["ACL"] = self.acl.observe(state) + return obs @property def space(self) -> spaces.Space: - pass + return spaces.Dict({ + "PORTS": {i+1:p.space for i,p in self.ports}, + "ACL": self.acl.space + }) @classmethod - def from_config(cls, config: ConfigSchema, parent_where: WhereType = [] ) -> ServiceObservation: - pass + def from_config(cls, config: ConfigSchema, parent_where: WhereType = [] ) -> RouterObservation: + where = parent_where + ["nodes", config.hostname] + + if config.acl.num_rules is None: + config.acl.num_rules = config.num_rules + if config.acl.ip_list is None: + config.acl.ip_list = config.ip_list + if config.acl.port_list is None: + config.acl.port_list = config.port_list + if config.acl.protocol_list is None: + config.acl.protocol_list = config.protocol_list + + ports = [PortObservation.from_config(config=c, parent_where=where) for c in config.ports] + acl = ACLObservation.from_config(config=config.acl, parent_where=where) + return cls(where=where, ports=ports, num_ports=config.num_ports, acl=acl) class FirewallObservation(AbstractObservation, identifier="FIREWALL"): class ConfigSchema(AbstractObservation.ConfigSchema): hostname: str - ports: List[PortObservation.ConfigSchema] = [] + ip_list: List[str] + port_list: List[int] + protocol_list: List[str] + num_rules: int - def __init__(self, where: WhereType)->None: - pass + + def __init__(self, + where: WhereType, + ip_list: List[str], + port_list: List[int], + protocol_list: List[str], + num_rules: int, + )->None: + self.where: WhereType = where + + self.ports: List[PortObservation] = [PortObservation(where=[self.where+["port", port_num]]) for port_num in (1,2,3) ] + #TODO: check what the port nums are for firewall. + + self.internal_inbound_acl = ACLObservation(where = self.where+["acl","internal","inbound"], num_rules= num_rules, ip_list=ip_list, port_list=port_list, protocol_list=protocol_list) + self.internal_outbound_acl = ACLObservation(where = self.where+["acl","internal","outbound"], num_rules= num_rules, ip_list=ip_list, port_list=port_list, protocol_list=protocol_list) + self.dmz_inbound_acl = ACLObservation(where = self.where+["acl","dmz","inbound"], num_rules= num_rules, ip_list=ip_list, port_list=port_list, protocol_list=protocol_list) + self.dmz_outbound_acl = ACLObservation(where = self.where+["acl","dmz","outbound"], num_rules= num_rules, ip_list=ip_list, port_list=port_list, protocol_list=protocol_list) + self.external_inbound_acl = ACLObservation(where = self.where+["acl","external","inbound"], num_rules= num_rules, ip_list=ip_list, port_list=port_list, protocol_list=protocol_list) + self.external_outbound_acl = ACLObservation(where = self.where+["acl","external","outbound"], num_rules= num_rules, ip_list=ip_list, port_list=port_list, protocol_list=protocol_list) + + + self.default_observation = { + "PORTS": {i+1:p.default_observation for i,p in enumerate(self.ports)}, + "INTERNAL": { + "INBOUND": self.internal_inbound_acl.default_observation, + "OUTBOUND": self.internal_outbound_acl.default_observation, + }, + "DMZ": { + "INBOUND": self.dmz_inbound_acl.default_observation, + "OUTBOUND": self.dmz_outbound_acl.default_observation, + }, + "EXTERNAL": { + "INBOUND": self.external_inbound_acl.default_observation, + "OUTBOUND": self.external_outbound_acl.default_observation, + }, + } def observe(self, state: Dict) -> Any: - pass + obs = { + "PORTS": {i+1:p.observe(state) for i,p in enumerate(self.ports)}, + "INTERNAL": { + "INBOUND": self.internal_inbound_acl.observe(state), + "OUTBOUND": self.internal_outbound_acl.observe(state), + }, + "DMZ": { + "INBOUND": self.dmz_inbound_acl.observe(state), + "OUTBOUND": self.dmz_outbound_acl.observe(state), + }, + "EXTERNAL": { + "INBOUND": self.external_inbound_acl.observe(state), + "OUTBOUND": self.external_outbound_acl.observe(state), + }, + } + return obs @property def space(self) -> spaces.Space: - pass + space =spaces.Dict({ + "PORTS": spaces.Dict({i+1:p.space for i,p in enumerate(self.ports)}), + "INTERNAL": spaces.Dict({ + "INBOUND": self.internal_inbound_acl.space, + "OUTBOUND": self.internal_outbound_acl.space, + }), + "DMZ": spaces.Dict({ + "INBOUND": self.dmz_inbound_acl.space, + "OUTBOUND": self.dmz_outbound_acl.space, + }), + "EXTERNAL": spaces.Dict({ + "INBOUND": self.external_inbound_acl.space, + "OUTBOUND": self.external_outbound_acl.space, + }), + }) + return space @classmethod - def from_config(cls, config: ConfigSchema, parent_where: WhereType = [] ) -> ServiceObservation: - pass + def from_config(cls, config: ConfigSchema, parent_where: WhereType = [] ) -> FirewallObservation: + where = parent_where+["nodes", config.hostname] + return cls(where=where, ip_list=config.ip_list, port_list=config.port_list, protocol_list=config.protocol_list, num_rules=config.num_rules) class NodesObservation(AbstractObservation, identifier="NODES"): class ConfigSchema(AbstractObservation.ConfigSchema): @@ -448,205 +654,104 @@ class NodesObservation(AbstractObservation, identifier="NODES"): hosts: List[HostObservation.ConfigSchema] = [] routers: List[RouterObservation.ConfigSchema] = [] firewalls: List[FirewallObservation.ConfigSchema] = [] - num_services: int = 1 + + num_services: int + num_applications: int + num_folders: int + num_files: int + num_nics: int + include_nmne: bool + include_num_access: bool + + ip_list: List[str] + port_list: List[int] + protocol_list: List[str] + num_rules: int - def __init__(self, where: WhereType)->None: - pass + def __init__(self, where: WhereType, hosts:List[HostObservation], routers:List[RouterObservation], firewalls:List[FirewallObservation])->None: + self.where :WhereType = where + + self.hosts: List[HostObservation] = hosts + self.routers: List[RouterObservation] = routers + self.firewalls: List[FirewallObservation] = firewalls + + self.default_observation = { + **{f"HOST{i}":host.default_observation for i,host in enumerate(self.hosts)}, + **{f"ROUTER{i}":router.default_observation for i,router in enumerate(self.routers)}, + **{f"FIREWALL{i}":firewall.default_observation for i,firewall in enumerate(self.firewalls)}, + } def observe(self, state: Dict) -> Any: - pass - - @property - def space(self) -> spaces.Space: - pass - - @classmethod - def from_config(cls, config: ConfigSchema, parent_where: WhereType = [] ) -> ServiceObservation: - pass - -############################ OLD - -class NodeObservation(AbstractObservation, identifier= "OLD"): - """Observation of a node in the network. Includes services, folders and NICs.""" - - def __init__( - self, - where: Optional[Tuple[str]] = None, - services: List[ServiceObservation] = [], - folders: List[FolderObservation] = [], - network_interfaces: List[NicObservation] = [], - logon_status: bool = False, - num_services_per_node: int = 2, - num_folders_per_node: int = 2, - num_files_per_folder: int = 2, - num_nics_per_node: int = 2, - ) -> None: - """ - Configurable observation for a node in the simulation. - - :param where: Where in the simulation state dictionary for find relevant information for this observation. - A typical location for a node looks like this: - ['network','nodes',]. If empty list, a default null observation will be output, defaults to [] - :type where: List[str], optional - :param services: Mapping between position in observation space and service name, defaults to {} - :type services: Dict[int,str], optional - :param max_services: Max number of services that can be presented in observation space for this node - , defaults to 2 - :type max_services: int, optional - :param folders: Mapping between position in observation space and folder name, defaults to {} - :type folders: Dict[int,str], optional - :param max_folders: Max number of folders in this node's obs space, defaults to 2 - :type max_folders: int, optional - :param network_interfaces: Mapping between position in observation space and NIC idx, defaults to {} - :type network_interfaces: Dict[int,str], optional - :param max_nics: Max number of network interfaces in this node's obs space, defaults to 5 - :type max_nics: int, optional - """ - super().__init__() - self.where: Optional[Tuple[str]] = where - - self.services: List[ServiceObservation] = services - while len(self.services) < num_services_per_node: - # add empty service observation without `where` parameter so it always returns default (blank) observation - self.services.append(ServiceObservation()) - while len(self.services) > num_services_per_node: - truncated_service = self.services.pop() - msg = f"Too many services in Node observation space for node. Truncating service {truncated_service.where}" - _LOGGER.warning(msg) - # truncate service list - - self.folders: List[FolderObservation] = folders - # add empty folder observation without `where` parameter that will always return default (blank) observations - while len(self.folders) < num_folders_per_node: - self.folders.append(FolderObservation(num_files_per_folder=num_files_per_folder)) - while len(self.folders) > num_folders_per_node: - truncated_folder = self.folders.pop() - msg = f"Too many folders in Node observation for node. Truncating service {truncated_folder.where[-1]}" - _LOGGER.warning(msg) - - self.network_interfaces: List[NicObservation] = network_interfaces - while len(self.network_interfaces) < num_nics_per_node: - self.network_interfaces.append(NicObservation()) - while len(self.network_interfaces) > num_nics_per_node: - truncated_nic = self.network_interfaces.pop() - msg = f"Too many NICs in Node observation for node. Truncating service {truncated_nic.where[-1]}" - _LOGGER.warning(msg) - - self.logon_status: bool = logon_status - - self.default_observation: Dict = { - "SERVICES": {i + 1: s.default_observation for i, s in enumerate(self.services)}, - "FOLDERS": {i + 1: f.default_observation for i, f in enumerate(self.folders)}, - "NICS": {i + 1: n.default_observation for i, n in enumerate(self.network_interfaces)}, - "operating_status": 0, + obs = { + **{f"HOST{i}":host.observe(state) for i,host in enumerate(self.hosts)}, + **{f"ROUTER{i}":router.observe(state) for i,router in enumerate(self.routers)}, + **{f"FIREWALL{i}":firewall.observe(state) for i,firewall in enumerate(self.firewalls)}, } - if self.logon_status: - self.default_observation["logon_status"] = 0 - - def observe(self, state: Dict) -> Dict: - """Generate observation based on the current state of the simulation. - - :param state: Simulation state dictionary - :type state: Dict - :return: Observation - :rtype: Dict - """ - if self.where is None: - return self.default_observation - - node_state = access_from_nested_dict(state, self.where) - if node_state is NOT_PRESENT_IN_STATE: - return self.default_observation - - obs = {} - obs["SERVICES"] = {i + 1: service.observe(state) for i, service in enumerate(self.services)} - obs["FOLDERS"] = {i + 1: folder.observe(state) for i, folder in enumerate(self.folders)} - obs["operating_status"] = node_state["operating_state"] - obs["NICS"] = { - i + 1: network_interface.observe(state) for i, network_interface in enumerate(self.network_interfaces) - } - - if self.logon_status: - obs["logon_status"] = 0 - return obs @property def space(self) -> spaces.Space: - """Gymnasium space object describing the observation space shape.""" - space_shape = { - "SERVICES": spaces.Dict({i + 1: service.space for i, service in enumerate(self.services)}), - "FOLDERS": spaces.Dict({i + 1: folder.space for i, folder in enumerate(self.folders)}), - "operating_status": spaces.Discrete(5), - "NICS": spaces.Dict( - {i + 1: network_interface.space for i, network_interface in enumerate(self.network_interfaces)} - ), - } - if self.logon_status: - space_shape["logon_status"] = spaces.Discrete(3) - - return spaces.Dict(space_shape) + space = spaces.Dict({ + **{f"HOST{i}":host.space for i,host in enumerate(self.hosts)}, + **{f"ROUTER{i}":router.space for i,router in enumerate(self.routers)}, + **{f"FIREWALL{i}":firewall.space for i,firewall in enumerate(self.firewalls)}, + }) + return space @classmethod - def from_config( - cls, - config: Dict, - game: "PrimaiteGame", - parent_where: Optional[List[str]] = None, - num_services_per_node: int = 2, - num_folders_per_node: int = 2, - num_files_per_folder: int = 2, - num_nics_per_node: int = 2, - ) -> "NodeObservation": - """Create node observation from a config. Also creates child service, folder and NIC observations. - - :param config: Dictionary containing the configuration for this node observation. - :type config: Dict - :param game: Reference to the PrimaiteGame object that spawned this observation. - :type game: PrimaiteGame - :param parent_where: Where in the simulation state dictionary to find the information about this node's parent - network. A typical location for it would be: ['network',] - :type parent_where: Optional[List[str]] - :param num_services_per_node: How many spaces for services are in this node observation (to preserve static - observation size) , defaults to 2 - :type num_services_per_node: int, optional - :param num_folders_per_node: How many spaces for folders are in this node observation (to preserve static - observation size) , defaults to 2 - :type num_folders_per_node: int, optional - :param num_files_per_folder: How many spaces for files are in the folder observations (to preserve static - observation size) , defaults to 2 - :type num_files_per_folder: int, optional - :return: Constructed node observation - :rtype: NodeObservation - """ - node_hostname = config["node_hostname"] + def from_config(cls, config: ConfigSchema, parent_where: WhereType = [] ) -> ServiceObservation: if parent_where is None: - where = ["network", "nodes", node_hostname] + where = ["network", "nodes"] else: - where = parent_where + ["nodes", node_hostname] + where = parent_where + ["nodes"] - svc_configs = config.get("services", {}) - services = [ServiceObservation.from_config(config=c, game=game, parent_where=where) for c in svc_configs] - folder_configs = config.get("folders", {}) - folders = [ - FolderObservation.from_config( - config=c, game=game, parent_where=where + ["file_system"], num_files_per_folder=num_files_per_folder - ) - for c in folder_configs - ] - # create some configs for the NIC observation in the format {"nic_num":1}, {"nic_num":2}, {"nic_num":3}, etc. - nic_configs = [{"nic_num": i for i in range(num_nics_per_node)}] - network_interfaces = [NicObservation.from_config(config=c, game=game, parent_where=where) for c in nic_configs] - logon_status = config.get("logon_status", False) - return cls( - where=where, - services=services, - folders=folders, - network_interfaces=network_interfaces, - logon_status=logon_status, - num_services_per_node=num_services_per_node, - num_folders_per_node=num_folders_per_node, - num_files_per_folder=num_files_per_folder, - num_nics_per_node=num_nics_per_node, - ) + for host_config in config.hosts: + if host_config.num_services is None: + host_config.num_services = config.num_services + if host_config.num_applications is None: + host_config.num_application = config.num_applications + if host_config.num_folders is None: + host_config.num_folder = config.num_folders + if host_config.num_files is None: + host_config.num_file = config.num_files + if host_config.num_nics is None: + host_config.num_nic = config.num_nics + if host_config.include_nmne is None: + host_config.include_nmne = config.include_nmne + if host_config.include_num_access is None: + host_config.include_num_access = config.include_num_access + + for router_config in config.routers: + if router_config.num_ports is None: + router_config.num_ports = config.num_ports + if router_config.ip_list is None: + router_config.ip_list = config.ip_list + + if router_config.port_list is None: + router_config.port_list = config.port_list + + if router_config.protocol_list is None: + router_config.protocol_list = config.protocol_list + + if router_config.num_rules is None: + router_config.num_rules = config.num_rules + + for firewall_config in config.firewalls: + if firewall_config.ip_list is None: + firewall_config.ip_list = config.ip_list + + if firewall_config.port_list is None: + firewall_config.port_list = config.port_list + + if firewall_config.protocol_list is None: + firewall_config.protocol_list = config.protocol_list + + if firewall_config.num_rules is None: + firewall_config.num_rules = config.num_rules + + hosts = [HostObservation.from_config(config=c, parent_where=where) for c in config.hosts] + routers = [RouterObservation.from_config(config=c, parent_where=where) for c in config.routers] + firewalls = [FirewallObservation.from_config(config=c, parent_where=where) for c in config.firewalls] + + cls(where=where, hosts=hosts, routers=routers, firewalls=firewalls) From 2eb900746b24959eb69d3bedf0a9f83d089e8eeb Mon Sep 17 00:00:00 2001 From: Cristian-VM2 Date: Fri, 29 Mar 2024 11:34:43 +0000 Subject: [PATCH 064/124] #2402 rename network_acl actions to router_acl and refactor how router_name is given --- .../_package_data/data_manipulation.yaml | 56 +++++---- .../_package_data/data_manipulation_marl.yaml | 112 +++++++++++------- src/primaite/game/agent/actions.py | 28 ++--- .../hardware/nodes/network/firewall.py | 61 ++++++++++ .../assets/configs/bad_primaite_session.yaml | 56 +++++---- .../configs/eval_only_primaite_session.yaml | 56 +++++---- tests/assets/configs/multi_agent_session.yaml | 112 +++++++++++------- tests/assets/configs/shared_rewards.yaml | 56 +++++---- .../assets/configs/test_primaite_session.yaml | 56 +++++---- .../configs/train_only_primaite_session.yaml | 56 +++++---- tests/conftest.py | 4 +- .../game_layer/test_actions.py | 17 +-- 12 files changed, 426 insertions(+), 244 deletions(-) diff --git a/src/primaite/config/_package_data/data_manipulation.yaml b/src/primaite/config/_package_data/data_manipulation.yaml index 12f60b63..ad3c02cc 100644 --- a/src/primaite/config/_package_data/data_manipulation.yaml +++ b/src/primaite/config/_package_data/data_manipulation.yaml @@ -258,12 +258,8 @@ agents: - type: NODE_SHUTDOWN - type: NODE_STARTUP - type: NODE_RESET - - type: NETWORK_ACL_ADDRULE - options: - target_router_hostname: router_1 - - type: NETWORK_ACL_REMOVERULE - options: - target_router_hostname: router_1 + - type: ROUTER_ACL_ADDRULE + - type: ROUTER_ACL_REMOVERULE - type: NETWORK_NIC_ENABLE - type: NETWORK_NIC_DISABLE @@ -477,8 +473,9 @@ agents: node_id: 6 46: # old action num: 22 # "ACL: ADDRULE - Block outgoing traffic from client 1" - action: "NETWORK_ACL_ADDRULE" + action: "ROUTER_ACL_ADDRULE" options: + target_router_nodename: router_1 position: 1 permission: 2 source_ip_id: 7 # client 1 @@ -487,8 +484,9 @@ agents: dest_port_id: 1 protocol_id: 1 47: # old action num: 23 # "ACL: ADDRULE - Block outgoing traffic from client 2" - action: "NETWORK_ACL_ADDRULE" + action: "ROUTER_ACL_ADDRULE" options: + target_router_nodename: router_1 position: 2 permission: 2 source_ip_id: 8 # client 2 @@ -497,8 +495,9 @@ agents: dest_port_id: 1 protocol_id: 1 48: # old action num: 24 # block tcp traffic from client 1 to web app - action: "NETWORK_ACL_ADDRULE" + action: "ROUTER_ACL_ADDRULE" options: + target_router_nodename: router_1 position: 3 permission: 2 source_ip_id: 7 # client 1 @@ -507,8 +506,9 @@ agents: dest_port_id: 1 protocol_id: 3 49: # old action num: 25 # block tcp traffic from client 2 to web app - action: "NETWORK_ACL_ADDRULE" + action: "ROUTER_ACL_ADDRULE" options: + target_router_nodename: router_1 position: 4 permission: 2 source_ip_id: 8 # client 2 @@ -517,8 +517,9 @@ agents: dest_port_id: 1 protocol_id: 3 50: # old action num: 26 - action: "NETWORK_ACL_ADDRULE" + action: "ROUTER_ACL_ADDRULE" options: + target_router_nodename: router_1 position: 5 permission: 2 source_ip_id: 7 # client 1 @@ -527,8 +528,9 @@ agents: dest_port_id: 1 protocol_id: 3 51: # old action num: 27 - action: "NETWORK_ACL_ADDRULE" + action: "ROUTER_ACL_ADDRULE" options: + target_router_nodename: router_1 position: 6 permission: 2 source_ip_id: 8 # client 2 @@ -537,44 +539,54 @@ agents: dest_port_id: 1 protocol_id: 3 52: # old action num: 28 - action: "NETWORK_ACL_REMOVERULE" + action: "ROUTER_ACL_REMOVERULE" options: + target_router_nodename: router_1 position: 0 53: # old action num: 29 - action: "NETWORK_ACL_REMOVERULE" + action: "ROUTER_ACL_REMOVERULE" options: + target_router_nodename: router_1 position: 1 54: # old action num: 30 - action: "NETWORK_ACL_REMOVERULE" + action: "ROUTER_ACL_REMOVERULE" options: + target_router_nodename: router_1 position: 2 55: # old action num: 31 - action: "NETWORK_ACL_REMOVERULE" + action: "ROUTER_ACL_REMOVERULE" options: + target_router_nodename: router_1 position: 3 56: # old action num: 32 - action: "NETWORK_ACL_REMOVERULE" + action: "ROUTER_ACL_REMOVERULE" options: + target_router_nodename: router_1 position: 4 57: # old action num: 33 - action: "NETWORK_ACL_REMOVERULE" + action: "ROUTER_ACL_REMOVERULE" options: + target_router_nodename: router_1 position: 5 58: # old action num: 34 - action: "NETWORK_ACL_REMOVERULE" + action: "ROUTER_ACL_REMOVERULE" options: + target_router_nodename: router_1 position: 6 59: # old action num: 35 - action: "NETWORK_ACL_REMOVERULE" + action: "ROUTER_ACL_REMOVERULE" options: + target_router_nodename: router_1 position: 7 60: # old action num: 36 - action: "NETWORK_ACL_REMOVERULE" + action: "ROUTER_ACL_REMOVERULE" options: + target_router_nodename: router_1 position: 8 61: # old action num: 37 - action: "NETWORK_ACL_REMOVERULE" + action: "ROUTER_ACL_REMOVERULE" options: + target_router_nodename: router_1 position: 9 62: # old action num: 38 action: "NETWORK_NIC_DISABLE" diff --git a/src/primaite/config/_package_data/data_manipulation_marl.yaml b/src/primaite/config/_package_data/data_manipulation_marl.yaml index b632f626..2a788b73 100644 --- a/src/primaite/config/_package_data/data_manipulation_marl.yaml +++ b/src/primaite/config/_package_data/data_manipulation_marl.yaml @@ -260,12 +260,8 @@ agents: - type: NODE_SHUTDOWN - type: NODE_STARTUP - type: NODE_RESET - - type: NETWORK_ACL_ADDRULE - options: - target_router_hostname: router_1 - - type: NETWORK_ACL_REMOVERULE - options: - target_router_hostname: router_1 + - type: ROUTER_ACL_ADDRULE + - type: ROUTER_ACL_REMOVERULE - type: NETWORK_NIC_ENABLE - type: NETWORK_NIC_DISABLE @@ -479,8 +475,9 @@ agents: node_id: 6 46: # old action num: 22 # "ACL: ADDRULE - Block outgoing traffic from client 1" - action: "NETWORK_ACL_ADDRULE" + action: "ROUTER_ACL_ADDRULE" options: + target_router_nodename: router_1 position: 1 permission: 2 source_ip_id: 7 # client 1 @@ -489,8 +486,9 @@ agents: dest_port_id: 1 protocol_id: 1 47: # old action num: 23 # "ACL: ADDRULE - Block outgoing traffic from client 2" - action: "NETWORK_ACL_ADDRULE" + action: "ROUTER_ACL_ADDRULE" options: + target_router_nodename: router_1 position: 2 permission: 2 source_ip_id: 8 # client 2 @@ -499,8 +497,9 @@ agents: dest_port_id: 1 protocol_id: 1 48: # old action num: 24 # block tcp traffic from client 1 to web app - action: "NETWORK_ACL_ADDRULE" + action: "ROUTER_ACL_ADDRULE" options: + target_router_nodename: router_1 position: 3 permission: 2 source_ip_id: 7 # client 1 @@ -509,8 +508,9 @@ agents: dest_port_id: 1 protocol_id: 3 49: # old action num: 25 # block tcp traffic from client 2 to web app - action: "NETWORK_ACL_ADDRULE" + action: "ROUTER_ACL_ADDRULE" options: + target_router_nodename: router_1 position: 4 permission: 2 source_ip_id: 8 # client 2 @@ -519,8 +519,9 @@ agents: dest_port_id: 1 protocol_id: 3 50: # old action num: 26 - action: "NETWORK_ACL_ADDRULE" + action: "ROUTER_ACL_ADDRULE" options: + target_router_nodename: router_1 position: 5 permission: 2 source_ip_id: 7 # client 1 @@ -529,8 +530,9 @@ agents: dest_port_id: 1 protocol_id: 3 51: # old action num: 27 - action: "NETWORK_ACL_ADDRULE" + action: "ROUTER_ACL_ADDRULE" options: + target_router_nodename: router_1 position: 6 permission: 2 source_ip_id: 8 # client 2 @@ -539,44 +541,54 @@ agents: dest_port_id: 1 protocol_id: 3 52: # old action num: 28 - action: "NETWORK_ACL_REMOVERULE" + action: "ROUTER_ACL_REMOVERULE" options: + target_router_nodename: router_1 position: 0 53: # old action num: 29 - action: "NETWORK_ACL_REMOVERULE" + action: "ROUTER_ACL_REMOVERULE" options: + target_router_nodename: router_1 position: 1 54: # old action num: 30 - action: "NETWORK_ACL_REMOVERULE" + action: "ROUTER_ACL_REMOVERULE" options: + target_router_nodename: router_1 position: 2 55: # old action num: 31 - action: "NETWORK_ACL_REMOVERULE" + action: "ROUTER_ACL_REMOVERULE" options: + target_router_nodename: router_1 position: 3 56: # old action num: 32 - action: "NETWORK_ACL_REMOVERULE" + action: "ROUTER_ACL_REMOVERULE" options: + target_router_nodename: router_1 position: 4 57: # old action num: 33 - action: "NETWORK_ACL_REMOVERULE" + action: "ROUTER_ACL_REMOVERULE" options: + target_router_nodename: router_1 position: 5 58: # old action num: 34 - action: "NETWORK_ACL_REMOVERULE" + action: "ROUTER_ACL_REMOVERULE" options: + target_router_nodename: router_1 position: 6 59: # old action num: 35 - action: "NETWORK_ACL_REMOVERULE" + action: "ROUTER_ACL_REMOVERULE" options: + target_router_nodename: router_1 position: 7 60: # old action num: 36 - action: "NETWORK_ACL_REMOVERULE" + action: "ROUTER_ACL_REMOVERULE" options: + target_router_nodename: router_1 position: 8 61: # old action num: 37 - action: "NETWORK_ACL_REMOVERULE" + action: "ROUTER_ACL_REMOVERULE" options: + target_router_nodename: router_1 position: 9 62: # old action num: 38 action: "NETWORK_NIC_DISABLE" @@ -811,12 +823,12 @@ agents: - type: NODE_SHUTDOWN - type: NODE_STARTUP - type: NODE_RESET - - type: NETWORK_ACL_ADDRULE + - type: ROUTER_ACL_ADDRULE options: - target_router_hostname: router_1 - - type: NETWORK_ACL_REMOVERULE + target_router_nodename: router_1 + - type: ROUTER_ACL_REMOVERULE options: - target_router_hostname: router_1 + target_router_nodename: router_1 - type: NETWORK_NIC_ENABLE - type: NETWORK_NIC_DISABLE @@ -1030,8 +1042,9 @@ agents: node_id: 6 46: # old action num: 22 # "ACL: ADDRULE - Block outgoing traffic from client 1" - action: "NETWORK_ACL_ADDRULE" + action: "ROUTER_ACL_ADDRULE" options: + target_router_nodename: router_1 position: 1 permission: 2 source_ip_id: 7 # client 1 @@ -1040,8 +1053,9 @@ agents: dest_port_id: 1 protocol_id: 1 47: # old action num: 23 # "ACL: ADDRULE - Block outgoing traffic from client 2" - action: "NETWORK_ACL_ADDRULE" + action: "ROUTER_ACL_ADDRULE" options: + target_router_nodename: router_1 position: 2 permission: 2 source_ip_id: 8 # client 2 @@ -1050,8 +1064,9 @@ agents: dest_port_id: 1 protocol_id: 1 48: # old action num: 24 # block tcp traffic from client 1 to web app - action: "NETWORK_ACL_ADDRULE" + action: "ROUTER_ACL_ADDRULE" options: + target_router_nodename: router_1 position: 3 permission: 2 source_ip_id: 7 # client 1 @@ -1060,8 +1075,9 @@ agents: dest_port_id: 1 protocol_id: 3 49: # old action num: 25 # block tcp traffic from client 2 to web app - action: "NETWORK_ACL_ADDRULE" + action: "ROUTER_ACL_ADDRULE" options: + target_router_nodename: router_1 position: 4 permission: 2 source_ip_id: 8 # client 2 @@ -1070,8 +1086,9 @@ agents: dest_port_id: 1 protocol_id: 3 50: # old action num: 26 - action: "NETWORK_ACL_ADDRULE" + action: "ROUTER_ACL_ADDRULE" options: + target_router_nodename: router_1 position: 5 permission: 2 source_ip_id: 7 # client 1 @@ -1080,8 +1097,9 @@ agents: dest_port_id: 1 protocol_id: 3 51: # old action num: 27 - action: "NETWORK_ACL_ADDRULE" + action: "ROUTER_ACL_ADDRULE" options: + target_router_nodename: router_1 position: 6 permission: 2 source_ip_id: 8 # client 2 @@ -1090,44 +1108,54 @@ agents: dest_port_id: 1 protocol_id: 3 52: # old action num: 28 - action: "NETWORK_ACL_REMOVERULE" + action: "ROUTER_ACL_REMOVERULE" options: + target_router_nodename: router_1 position: 0 53: # old action num: 29 - action: "NETWORK_ACL_REMOVERULE" + action: "ROUTER_ACL_REMOVERULE" options: + target_router_nodename: router_1 position: 1 54: # old action num: 30 - action: "NETWORK_ACL_REMOVERULE" + action: "ROUTER_ACL_REMOVERULE" options: + target_router_nodename: router_1 position: 2 55: # old action num: 31 - action: "NETWORK_ACL_REMOVERULE" + action: "ROUTER_ACL_REMOVERULE" options: + target_router_nodename: router_1 position: 3 56: # old action num: 32 - action: "NETWORK_ACL_REMOVERULE" + action: "ROUTER_ACL_REMOVERULE" options: + target_router_nodename: router_1 position: 4 57: # old action num: 33 - action: "NETWORK_ACL_REMOVERULE" + action: "ROUTER_ACL_REMOVERULE" options: + target_router_nodename: router_1 position: 5 58: # old action num: 34 - action: "NETWORK_ACL_REMOVERULE" + action: "ROUTER_ACL_REMOVERULE" options: + target_router_nodename: router_1 position: 6 59: # old action num: 35 - action: "NETWORK_ACL_REMOVERULE" + action: "ROUTER_ACL_REMOVERULE" options: + target_router_nodename: router_1 position: 7 60: # old action num: 36 - action: "NETWORK_ACL_REMOVERULE" + action: "ROUTER_ACL_REMOVERULE" options: + target_router_nodename: router_1 position: 8 61: # old action num: 37 - action: "NETWORK_ACL_REMOVERULE" + action: "ROUTER_ACL_REMOVERULE" options: + target_router_nodename: router_1 position: 9 62: # old action num: 38 action: "NETWORK_NIC_DISABLE" diff --git a/src/primaite/game/agent/actions.py b/src/primaite/game/agent/actions.py index b79fc985..d585273d 100644 --- a/src/primaite/game/agent/actions.py +++ b/src/primaite/game/agent/actions.py @@ -405,25 +405,22 @@ class NodeResetAction(NodeAbstractAction): self.verb: str = "reset" -class NetworkACLAddRuleAction(AbstractAction): +class RouterACLAddRuleAction(AbstractAction): """Action which adds a rule to a router's ACL.""" def __init__( self, manager: "ActionManager", - target_router_hostname: str, max_acl_rules: int, num_ips: int, num_ports: int, num_protocols: int, **kwargs, ) -> None: - """Init method for NetworkACLAddRuleAction. + """Init method for RouterACLAddRuleAction. :param manager: Reference to the ActionManager which created this action. :type manager: ActionManager - :param target_router_hostname: hostname of the router to which the ACL rule should be added. - :type target_router_hostname: str :param max_acl_rules: Maximum number of ACL rules that can be added to the router. :type max_acl_rules: int :param num_ips: Number of IP addresses in the simulation. @@ -444,10 +441,10 @@ class NetworkACLAddRuleAction(AbstractAction): "dest_port_id": num_ports, "protocol_id": num_protocols, } - self.target_router_name: str = target_router_hostname def form_request( self, + target_router_nodename: str, position: int, permission: int, source_ip_id: int, @@ -511,7 +508,7 @@ class NetworkACLAddRuleAction(AbstractAction): return [ "network", "node", - self.target_router_name, + target_router_nodename, "acl", "add_rule", permission_str, @@ -524,26 +521,23 @@ class NetworkACLAddRuleAction(AbstractAction): ] -class NetworkACLRemoveRuleAction(AbstractAction): +class RouterACLRemoveRuleAction(AbstractAction): """Action which removes a rule from a router's ACL.""" - def __init__(self, manager: "ActionManager", target_router_hostname: str, max_acl_rules: int, **kwargs) -> None: - """Init method for NetworkACLRemoveRuleAction. + def __init__(self, manager: "ActionManager", max_acl_rules: int, **kwargs) -> None: + """Init method for RouterACLRemoveRuleAction. :param manager: Reference to the ActionManager which created this action. :type manager: ActionManager - :param target_router_hostname: Hostname of the router from which the ACL rule should be removed. - :type target_router_hostname: str :param max_acl_rules: Maximum number of ACL rules that can be added to the router. :type max_acl_rules: int """ super().__init__(manager=manager) self.shape: Dict[str, int] = {"position": max_acl_rules} - self.target_router_name: str = target_router_hostname - def form_request(self, position: int) -> List[str]: + def form_request(self, target_router_nodename: str, position: int) -> List[str]: """Return the action formatted as a request which can be ingested by the PrimAITE simulation.""" - return ["network", "node", self.target_router_name, "acl", "remove_rule", position] + return ["network", "node", target_router_nodename, "acl", "remove_rule", position] class NetworkNICAbstractAction(AbstractAction): @@ -672,8 +666,8 @@ class ActionManager: "NODE_SHUTDOWN": NodeShutdownAction, "NODE_STARTUP": NodeStartupAction, "NODE_RESET": NodeResetAction, - "NETWORK_ACL_ADDRULE": NetworkACLAddRuleAction, - "NETWORK_ACL_REMOVERULE": NetworkACLRemoveRuleAction, + "ROUTER_ACL_ADDRULE": RouterACLAddRuleAction, + "ROUTER_ACL_REMOVERULE": RouterACLRemoveRuleAction, "NETWORK_NIC_ENABLE": NetworkNICEnableAction, "NETWORK_NIC_DISABLE": NetworkNICDisableAction, "NETWORK_PORT_ENABLE": NetworkPortEnableAction, diff --git a/src/primaite/simulator/network/hardware/nodes/network/firewall.py b/src/primaite/simulator/network/hardware/nodes/network/firewall.py index d7b1dfd9..ea353b2f 100644 --- a/src/primaite/simulator/network/hardware/nodes/network/firewall.py +++ b/src/primaite/simulator/network/hardware/nodes/network/firewall.py @@ -4,6 +4,7 @@ from typing import Dict, Final, Optional, Union from prettytable import MARKDOWN, PrettyTable from pydantic import validate_call +# from primaite.simulator.core import RequestManager, RequestType from primaite.simulator.network.hardware.node_operating_state import NodeOperatingState from primaite.simulator.network.hardware.nodes.network.router import ( AccessControlList, @@ -123,6 +124,66 @@ class Firewall(Router): sys_log=kwargs["sys_log"], implicit_action=ACLAction.PERMIT, name=f"{hostname} - External Outbound" ) + # def _init_request_manager(self) -> RequestManager: + # """ + # Initialise the request manager. + + # More information in user guide and docstring for SimComponent._init_request_manager. + # """ + # rm = super()._init_request_manager() + # self._internal_acl_request_manager = RequestManager() + # rm.add_request("internal", RequestType(func=self._internal_acl_request_manager)) + + # self._dmz_acl_request_manager = RequestManager() + # rm.add_request("dmz", RequestType(func=self._dmz_acl_request_manager)) + + # self._external_acl_request_manager = RequestManager() + # rm.add_request("external", RequestType(func=self._external_acl_request_manager)) + + # self._internal_inbound_acl_request_manager = RequestManager() + # self._internal_outbound_acl_request_manager = RequestManager() + # self._internal_acl_request_manager.add_request( + # "inbound", RequestType(func=self._internal_inbound_acl_request_manager) + # ) + # self._internal_acl_request_manager.add_request( + # "outbound", RequestType(func=self._internal_outbound_acl_request_manager) + # ) + + # self.dmz_inbound_acl_request_manager = RequestManager() + # self.dmz_outbound_acl_request_manager = RequestManager() + # self._dmz_acl_request_manager.add_request("inbound", RequestType(func=self.dmz_inbound_acl_request_manager)) + # self._dmz_acl_request_manager.add_request("outbound", RequestType(func=self.dmz_outbound_acl_request_manager)) + + # self.external_inbound_acl_request_manager = RequestManager() + # self.external_outbound_acl_request_manager = RequestManager() + # self._external_acl_request_manager.add_request( + # "inbound", RequestType(func=self.external_inbound_acl_request_manager) + # ) + # self._external_acl_request_manager.add_request( + # "outbound", RequestType(func=self.external_outbound_acl_request_manager) + # ) + + # self._internal_inbound_acl_request_manager.add_request( + # "acl", RequestType(func=self.internal_inbound_acl._request_manager) + # ) + # self._internal_outbound_acl_request_manager.add_request( + # "acl", RequestType(func=self.internal_outbound_acl._request_manager) + # ) + + # self.dmz_inbound_acl_request_manager.add_request("acl", RequestType(func=self.dmz_inbound_acl._request_manager)) + # self.dmz_outbound_acl_request_manager.add_request( + # "acl", RequestType(func=self.dmz_outbound_acl._request_manager) + # ) + + # self.external_inbound_acl_request_manager.add_request( + # "acl", RequestType(func=self.external_inbound_acl._request_manager) + # ) + # self.external_outbound_acl_request_manager.add_request( + # "acl", RequestType(func=self.external_outbound_acl._request_manager) + # ) + + # return rm + def describe_state(self) -> Dict: """ Describes the current state of the Firewall. diff --git a/tests/assets/configs/bad_primaite_session.yaml b/tests/assets/configs/bad_primaite_session.yaml index e599ee7e..743d2bba 100644 --- a/tests/assets/configs/bad_primaite_session.yaml +++ b/tests/assets/configs/bad_primaite_session.yaml @@ -169,12 +169,8 @@ agents: - type: NODE_SHUTDOWN - type: NODE_STARTUP - type: NODE_RESET - - type: NETWORK_ACL_ADDRULE - options: - target_router_hostname: router_1 - - type: NETWORK_ACL_REMOVERULE - options: - target_router_hostname: router_1 + - type: ROUTER_ACL_ADDRULE + - type: ROUTER_ACL_REMOVERULE - type: NETWORK_NIC_ENABLE - type: NETWORK_NIC_DISABLE @@ -291,8 +287,9 @@ agents: options: node_id: 5 22: # "ACL: ADDRULE - Block outgoing traffic from client 1" (not supported in Primaite) - action: "NETWORK_ACL_ADDRULE" + action: "ROUTER_ACL_ADDRULE" options: + target_router_nodename: router_1 position: 1 permission: 2 source_ip_id: 7 # client 1 @@ -301,8 +298,9 @@ agents: dest_port_id: 1 protocol_id: 1 23: # "ACL: ADDRULE - Block outgoing traffic from client 2" (not supported in Primaite) - action: "NETWORK_ACL_ADDRULE" + action: "ROUTER_ACL_ADDRULE" options: + target_router_nodename: router_1 position: 2 permission: 2 source_ip_id: 8 # client 2 @@ -311,8 +309,9 @@ agents: dest_port_id: 1 protocol_id: 1 24: # block tcp traffic from client 1 to web app - action: "NETWORK_ACL_ADDRULE" + action: "ROUTER_ACL_ADDRULE" options: + target_router_nodename: router_1 position: 3 permission: 2 source_ip_id: 7 # client 1 @@ -321,8 +320,9 @@ agents: dest_port_id: 1 protocol_id: 3 25: # block tcp traffic from client 2 to web app - action: "NETWORK_ACL_ADDRULE" + action: "ROUTER_ACL_ADDRULE" options: + target_router_nodename: router_1 position: 4 permission: 2 source_ip_id: 8 # client 2 @@ -331,8 +331,9 @@ agents: dest_port_id: 1 protocol_id: 3 26: - action: "NETWORK_ACL_ADDRULE" + action: "ROUTER_ACL_ADDRULE" options: + target_router_nodename: router_1 position: 5 permission: 2 source_ip_id: 7 # client 1 @@ -341,8 +342,9 @@ agents: dest_port_id: 1 protocol_id: 3 27: - action: "NETWORK_ACL_ADDRULE" + action: "ROUTER_ACL_ADDRULE" options: + target_router_nodename: router_1 position: 6 permission: 2 source_ip_id: 8 # client 2 @@ -351,44 +353,54 @@ agents: dest_port_id: 1 protocol_id: 3 28: - action: "NETWORK_ACL_REMOVERULE" + action: "ROUTER_ACL_REMOVERULE" options: + target_router_nodename: router_1 position: 0 29: - action: "NETWORK_ACL_REMOVERULE" + action: "ROUTER_ACL_REMOVERULE" options: + target_router_nodename: router_1 position: 1 30: - action: "NETWORK_ACL_REMOVERULE" + action: "ROUTER_ACL_REMOVERULE" options: + target_router_nodename: router_1 position: 2 31: - action: "NETWORK_ACL_REMOVERULE" + action: "ROUTER_ACL_REMOVERULE" options: + target_router_nodename: router_1 position: 3 32: - action: "NETWORK_ACL_REMOVERULE" + action: "ROUTER_ACL_REMOVERULE" options: + target_router_nodename: router_1 position: 4 33: - action: "NETWORK_ACL_REMOVERULE" + action: "ROUTER_ACL_REMOVERULE" options: + target_router_nodename: router_1 position: 5 34: - action: "NETWORK_ACL_REMOVERULE" + action: "ROUTER_ACL_REMOVERULE" options: + target_router_nodename: router_1 position: 6 35: - action: "NETWORK_ACL_REMOVERULE" + action: "ROUTER_ACL_REMOVERULE" options: + target_router_nodename: router_1 position: 7 36: - action: "NETWORK_ACL_REMOVERULE" + action: "ROUTER_ACL_REMOVERULE" options: + target_router_nodename: router_1 position: 8 37: - action: "NETWORK_ACL_REMOVERULE" + action: "ROUTER_ACL_REMOVERULE" options: + target_router_nodename: router_1 position: 9 38: action: "NETWORK_NIC_DISABLE" diff --git a/tests/assets/configs/eval_only_primaite_session.yaml b/tests/assets/configs/eval_only_primaite_session.yaml index 9d1404d8..525f7bb0 100644 --- a/tests/assets/configs/eval_only_primaite_session.yaml +++ b/tests/assets/configs/eval_only_primaite_session.yaml @@ -173,12 +173,8 @@ agents: - type: NODE_SHUTDOWN - type: NODE_STARTUP - type: NODE_RESET - - type: NETWORK_ACL_ADDRULE - options: - target_router_hostname: router_1 - - type: NETWORK_ACL_REMOVERULE - options: - target_router_hostname: router_1 + - type: ROUTER_ACL_ADDRULE + - type: ROUTER_ACL_REMOVERULE - type: NETWORK_NIC_ENABLE - type: NETWORK_NIC_DISABLE @@ -295,8 +291,9 @@ agents: options: node_id: 5 22: # "ACL: ADDRULE - Block outgoing traffic from client 1" (not supported in Primaite) - action: "NETWORK_ACL_ADDRULE" + action: "ROUTER_ACL_ADDRULE" options: + target_router_nodename: router_1 position: 1 permission: 2 source_ip_id: 7 # client 1 @@ -305,8 +302,9 @@ agents: dest_port_id: 1 protocol_id: 1 23: # "ACL: ADDRULE - Block outgoing traffic from client 2" (not supported in Primaite) - action: "NETWORK_ACL_ADDRULE" + action: "ROUTER_ACL_ADDRULE" options: + target_router_nodename: router_1 position: 2 permission: 2 source_ip_id: 8 # client 2 @@ -315,8 +313,9 @@ agents: dest_port_id: 1 protocol_id: 1 24: # block tcp traffic from client 1 to web app - action: "NETWORK_ACL_ADDRULE" + action: "ROUTER_ACL_ADDRULE" options: + target_router_nodename: router_1 position: 3 permission: 2 source_ip_id: 7 # client 1 @@ -325,8 +324,9 @@ agents: dest_port_id: 1 protocol_id: 3 25: # block tcp traffic from client 2 to web app - action: "NETWORK_ACL_ADDRULE" + action: "ROUTER_ACL_ADDRULE" options: + target_router_nodename: router_1 position: 4 permission: 2 source_ip_id: 8 # client 2 @@ -335,8 +335,9 @@ agents: dest_port_id: 1 protocol_id: 3 26: - action: "NETWORK_ACL_ADDRULE" + action: "ROUTER_ACL_ADDRULE" options: + target_router_nodename: router_1 position: 5 permission: 2 source_ip_id: 7 # client 1 @@ -345,8 +346,9 @@ agents: dest_port_id: 1 protocol_id: 3 27: - action: "NETWORK_ACL_ADDRULE" + action: "ROUTER_ACL_ADDRULE" options: + target_router_nodename: router_1 position: 6 permission: 2 source_ip_id: 8 # client 2 @@ -355,44 +357,54 @@ agents: dest_port_id: 1 protocol_id: 3 28: - action: "NETWORK_ACL_REMOVERULE" + action: "ROUTER_ACL_REMOVERULE" options: + target_router_nodename: router_1 position: 0 29: - action: "NETWORK_ACL_REMOVERULE" + action: "ROUTER_ACL_REMOVERULE" options: + target_router_nodename: router_1 position: 1 30: - action: "NETWORK_ACL_REMOVERULE" + action: "ROUTER_ACL_REMOVERULE" options: + target_router_nodename: router_1 position: 2 31: - action: "NETWORK_ACL_REMOVERULE" + action: "ROUTER_ACL_REMOVERULE" options: + target_router_nodename: router_1 position: 3 32: - action: "NETWORK_ACL_REMOVERULE" + action: "ROUTER_ACL_REMOVERULE" options: + target_router_nodename: router_1 position: 4 33: - action: "NETWORK_ACL_REMOVERULE" + action: "ROUTER_ACL_REMOVERULE" options: + target_router_nodename: router_1 position: 5 34: - action: "NETWORK_ACL_REMOVERULE" + action: "ROUTER_ACL_REMOVERULE" options: + target_router_nodename: router_1 position: 6 35: - action: "NETWORK_ACL_REMOVERULE" + action: "ROUTER_ACL_REMOVERULE" options: + target_router_nodename: router_1 position: 7 36: - action: "NETWORK_ACL_REMOVERULE" + action: "ROUTER_ACL_REMOVERULE" options: + target_router_nodename: router_1 position: 8 37: - action: "NETWORK_ACL_REMOVERULE" + action: "ROUTER_ACL_REMOVERULE" options: + target_router_nodename: router_1 position: 9 38: action: "NETWORK_NIC_DISABLE" diff --git a/tests/assets/configs/multi_agent_session.yaml b/tests/assets/configs/multi_agent_session.yaml index acb62c96..77a17459 100644 --- a/tests/assets/configs/multi_agent_session.yaml +++ b/tests/assets/configs/multi_agent_session.yaml @@ -180,12 +180,8 @@ agents: - type: NODE_SHUTDOWN - type: NODE_STARTUP - type: NODE_RESET - - type: NETWORK_ACL_ADDRULE - options: - target_router_hostname: router_1 - - type: NETWORK_ACL_REMOVERULE - options: - target_router_hostname: router_1 + - type: ROUTER_ACL_ADDRULE + - type: ROUTER_ACL_REMOVERULE - type: NETWORK_NIC_ENABLE - type: NETWORK_NIC_DISABLE @@ -302,8 +298,9 @@ agents: options: node_id: 5 22: # "ACL: ADDRULE - Block outgoing traffic from client 1" (not supported in Primaite) - action: "NETWORK_ACL_ADDRULE" + action: "ROUTER_ACL_ADDRULE" options: + target_router_nodename: router_1 position: 1 permission: 2 source_ip_id: 7 # client 1 @@ -312,8 +309,9 @@ agents: dest_port_id: 1 protocol_id: 1 23: # "ACL: ADDRULE - Block outgoing traffic from client 2" (not supported in Primaite) - action: "NETWORK_ACL_ADDRULE" + action: "ROUTER_ACL_ADDRULE" options: + target_router_nodename: router_1 position: 2 permission: 2 source_ip_id: 8 # client 2 @@ -322,8 +320,9 @@ agents: dest_port_id: 1 protocol_id: 1 24: # block tcp traffic from client 1 to web app - action: "NETWORK_ACL_ADDRULE" + action: "ROUTER_ACL_ADDRULE" options: + target_router_nodename: router_1 position: 3 permission: 2 source_ip_id: 7 # client 1 @@ -332,8 +331,9 @@ agents: dest_port_id: 1 protocol_id: 3 25: # block tcp traffic from client 2 to web app - action: "NETWORK_ACL_ADDRULE" + action: "ROUTER_ACL_ADDRULE" options: + target_router_nodename: router_1 position: 4 permission: 2 source_ip_id: 8 # client 2 @@ -342,8 +342,9 @@ agents: dest_port_id: 1 protocol_id: 3 26: - action: "NETWORK_ACL_ADDRULE" + action: "ROUTER_ACL_ADDRULE" options: + target_router_nodename: router_1 position: 5 permission: 2 source_ip_id: 7 # client 1 @@ -352,8 +353,9 @@ agents: dest_port_id: 1 protocol_id: 3 27: - action: "NETWORK_ACL_ADDRULE" + action: "ROUTER_ACL_ADDRULE" options: + target_router_nodename: router_1 position: 6 permission: 2 source_ip_id: 8 # client 2 @@ -362,44 +364,54 @@ agents: dest_port_id: 1 protocol_id: 3 28: - action: "NETWORK_ACL_REMOVERULE" + action: "ROUTER_ACL_REMOVERULE" options: + target_router_nodename: router_1 position: 0 29: - action: "NETWORK_ACL_REMOVERULE" + action: "ROUTER_ACL_REMOVERULE" options: + target_router_nodename: router_1 position: 1 30: - action: "NETWORK_ACL_REMOVERULE" + action: "ROUTER_ACL_REMOVERULE" options: + target_router_nodename: router_1 position: 2 31: - action: "NETWORK_ACL_REMOVERULE" + action: "ROUTER_ACL_REMOVERULE" options: + target_router_nodename: router_1 position: 3 32: - action: "NETWORK_ACL_REMOVERULE" + action: "ROUTER_ACL_REMOVERULE" options: + target_router_nodename: router_1 position: 4 33: - action: "NETWORK_ACL_REMOVERULE" + action: "ROUTER_ACL_REMOVERULE" options: + target_router_nodename: router_1 position: 5 34: - action: "NETWORK_ACL_REMOVERULE" + action: "ROUTER_ACL_REMOVERULE" options: + target_router_nodename: router_1 position: 6 35: - action: "NETWORK_ACL_REMOVERULE" + action: "ROUTER_ACL_REMOVERULE" options: + target_router_nodename: router_1 position: 7 36: - action: "NETWORK_ACL_REMOVERULE" + action: "ROUTER_ACL_REMOVERULE" options: + target_router_nodename: router_1 position: 8 37: - action: "NETWORK_ACL_REMOVERULE" + action: "ROUTER_ACL_REMOVERULE" options: + target_router_nodename: router_1 position: 9 38: action: "NETWORK_NIC_DISABLE" @@ -624,12 +636,8 @@ agents: - type: NODE_SHUTDOWN - type: NODE_STARTUP - type: NODE_RESET - - type: NETWORK_ACL_ADDRULE - options: - target_router_hostname: router_1 - - type: NETWORK_ACL_REMOVERULE - options: - target_router_hostname: router_1 + - type: ROUTER_ACL_ADDRULE + - type: ROUTER_ACL_REMOVERULE - type: NETWORK_NIC_ENABLE - type: NETWORK_NIC_DISABLE @@ -746,8 +754,9 @@ agents: options: node_id: 5 22: # "ACL: ADDRULE - Block outgoing traffic from client 1" (not supported in Primaite) - action: "NETWORK_ACL_ADDRULE" + action: "ROUTER_ACL_ADDRULE" options: + target_router_nodename: router_1 position: 1 permission: 2 source_ip_id: 7 # client 1 @@ -756,8 +765,9 @@ agents: dest_port_id: 1 protocol_id: 1 23: # "ACL: ADDRULE - Block outgoing traffic from client 2" (not supported in Primaite) - action: "NETWORK_ACL_ADDRULE" + action: "ROUTER_ACL_ADDRULE" options: + target_router_nodename: router_1 position: 2 permission: 2 source_ip_id: 8 # client 2 @@ -766,8 +776,9 @@ agents: dest_port_id: 1 protocol_id: 1 24: # block tcp traffic from client 1 to web app - action: "NETWORK_ACL_ADDRULE" + action: "ROUTER_ACL_ADDRULE" options: + target_router_nodename: router_1 position: 3 permission: 2 source_ip_id: 7 # client 1 @@ -776,8 +787,9 @@ agents: dest_port_id: 1 protocol_id: 3 25: # block tcp traffic from client 2 to web app - action: "NETWORK_ACL_ADDRULE" + action: "ROUTER_ACL_ADDRULE" options: + target_router_nodename: router_1 position: 4 permission: 2 source_ip_id: 8 # client 2 @@ -786,8 +798,9 @@ agents: dest_port_id: 1 protocol_id: 3 26: - action: "NETWORK_ACL_ADDRULE" + action: "ROUTER_ACL_ADDRULE" options: + target_router_nodename: router_1 position: 5 permission: 2 source_ip_id: 7 # client 1 @@ -796,8 +809,9 @@ agents: dest_port_id: 1 protocol_id: 3 27: - action: "NETWORK_ACL_ADDRULE" + action: "ROUTER_ACL_ADDRULE" options: + target_router_nodename: router_1 position: 6 permission: 2 source_ip_id: 8 # client 2 @@ -806,44 +820,54 @@ agents: dest_port_id: 1 protocol_id: 3 28: - action: "NETWORK_ACL_REMOVERULE" + action: "ROUTER_ACL_REMOVERULE" options: + target_router_nodename: router_1 position: 0 29: - action: "NETWORK_ACL_REMOVERULE" + action: "ROUTER_ACL_REMOVERULE" options: + target_router_nodename: router_1 position: 1 30: - action: "NETWORK_ACL_REMOVERULE" + action: "ROUTER_ACL_REMOVERULE" options: + target_router_nodename: router_1 position: 2 31: - action: "NETWORK_ACL_REMOVERULE" + action: "ROUTER_ACL_REMOVERULE" options: + target_router_nodename: router_1 position: 3 32: - action: "NETWORK_ACL_REMOVERULE" + action: "ROUTER_ACL_REMOVERULE" options: + target_router_nodename: router_1 position: 4 33: - action: "NETWORK_ACL_REMOVERULE" + action: "ROUTER_ACL_REMOVERULE" options: + target_router_nodename: router_1 position: 5 34: - action: "NETWORK_ACL_REMOVERULE" + action: "ROUTER_ACL_REMOVERULE" options: + target_router_nodename: router_1 position: 6 35: - action: "NETWORK_ACL_REMOVERULE" + action: "ROUTER_ACL_REMOVERULE" options: + target_router_nodename: router_1 position: 7 36: - action: "NETWORK_ACL_REMOVERULE" + action: "ROUTER_ACL_REMOVERULE" options: + target_router_nodename: router_1 position: 8 37: - action: "NETWORK_ACL_REMOVERULE" + action: "ROUTER_ACL_REMOVERULE" options: + target_router_nodename: router_1 position: 9 38: action: "NETWORK_NIC_DISABLE" diff --git a/tests/assets/configs/shared_rewards.yaml b/tests/assets/configs/shared_rewards.yaml index 10feba9d..e7226b5f 100644 --- a/tests/assets/configs/shared_rewards.yaml +++ b/tests/assets/configs/shared_rewards.yaml @@ -258,12 +258,8 @@ agents: - type: NODE_SHUTDOWN - type: NODE_STARTUP - type: NODE_RESET - - type: NETWORK_ACL_ADDRULE - options: - target_router_hostname: router_1 - - type: NETWORK_ACL_REMOVERULE - options: - target_router_hostname: router_1 + - type: ROUTER_ACL_ADDRULE + - type: ROUTER_ACL_REMOVERULE - type: NETWORK_NIC_ENABLE - type: NETWORK_NIC_DISABLE @@ -477,8 +473,9 @@ agents: node_id: 6 46: # old action num: 22 # "ACL: ADDRULE - Block outgoing traffic from client 1" - action: "NETWORK_ACL_ADDRULE" + action: "ROUTER_ACL_ADDRULE" options: + target_router_nodename: router_1 position: 1 permission: 2 source_ip_id: 7 # client 1 @@ -487,8 +484,9 @@ agents: dest_port_id: 1 protocol_id: 1 47: # old action num: 23 # "ACL: ADDRULE - Block outgoing traffic from client 2" - action: "NETWORK_ACL_ADDRULE" + action: "ROUTER_ACL_ADDRULE" options: + target_router_nodename: router_1 position: 2 permission: 2 source_ip_id: 8 # client 2 @@ -497,8 +495,9 @@ agents: dest_port_id: 1 protocol_id: 1 48: # old action num: 24 # block tcp traffic from client 1 to web app - action: "NETWORK_ACL_ADDRULE" + action: "ROUTER_ACL_ADDRULE" options: + target_router_nodename: router_1 position: 3 permission: 2 source_ip_id: 7 # client 1 @@ -507,8 +506,9 @@ agents: dest_port_id: 1 protocol_id: 3 49: # old action num: 25 # block tcp traffic from client 2 to web app - action: "NETWORK_ACL_ADDRULE" + action: "ROUTER_ACL_ADDRULE" options: + target_router_nodename: router_1 position: 4 permission: 2 source_ip_id: 8 # client 2 @@ -517,8 +517,9 @@ agents: dest_port_id: 1 protocol_id: 3 50: # old action num: 26 - action: "NETWORK_ACL_ADDRULE" + action: "ROUTER_ACL_ADDRULE" options: + target_router_nodename: router_1 position: 5 permission: 2 source_ip_id: 7 # client 1 @@ -527,8 +528,9 @@ agents: dest_port_id: 1 protocol_id: 3 51: # old action num: 27 - action: "NETWORK_ACL_ADDRULE" + action: "ROUTER_ACL_ADDRULE" options: + target_router_nodename: router_1 position: 6 permission: 2 source_ip_id: 8 # client 2 @@ -537,44 +539,54 @@ agents: dest_port_id: 1 protocol_id: 3 52: # old action num: 28 - action: "NETWORK_ACL_REMOVERULE" + action: "ROUTER_ACL_REMOVERULE" options: + target_router_nodename: router_1 position: 0 53: # old action num: 29 - action: "NETWORK_ACL_REMOVERULE" + action: "ROUTER_ACL_REMOVERULE" options: + target_router_nodename: router_1 position: 1 54: # old action num: 30 - action: "NETWORK_ACL_REMOVERULE" + action: "ROUTER_ACL_REMOVERULE" options: + target_router_nodename: router_1 position: 2 55: # old action num: 31 - action: "NETWORK_ACL_REMOVERULE" + action: "ROUTER_ACL_REMOVERULE" options: + target_router_nodename: router_1 position: 3 56: # old action num: 32 - action: "NETWORK_ACL_REMOVERULE" + action: "ROUTER_ACL_REMOVERULE" options: + target_router_nodename: router_1 position: 4 57: # old action num: 33 - action: "NETWORK_ACL_REMOVERULE" + action: "ROUTER_ACL_REMOVERULE" options: + target_router_nodename: router_1 position: 5 58: # old action num: 34 - action: "NETWORK_ACL_REMOVERULE" + action: "ROUTER_ACL_REMOVERULE" options: + target_router_nodename: router_1 position: 6 59: # old action num: 35 - action: "NETWORK_ACL_REMOVERULE" + action: "ROUTER_ACL_REMOVERULE" options: + target_router_nodename: router_1 position: 7 60: # old action num: 36 - action: "NETWORK_ACL_REMOVERULE" + action: "ROUTER_ACL_REMOVERULE" options: + target_router_nodename: router_1 position: 8 61: # old action num: 37 - action: "NETWORK_ACL_REMOVERULE" + action: "ROUTER_ACL_REMOVERULE" options: + target_router_nodename: router_1 position: 9 62: # old action num: 38 action: "NETWORK_NIC_DISABLE" diff --git a/tests/assets/configs/test_primaite_session.yaml b/tests/assets/configs/test_primaite_session.yaml index b131c1b7..0cb371d5 100644 --- a/tests/assets/configs/test_primaite_session.yaml +++ b/tests/assets/configs/test_primaite_session.yaml @@ -183,12 +183,8 @@ agents: - type: NODE_SHUTDOWN - type: NODE_STARTUP - type: NODE_RESET - - type: NETWORK_ACL_ADDRULE - options: - target_router_hostname: router_1 - - type: NETWORK_ACL_REMOVERULE - options: - target_router_hostname: router_1 + - type: ROUTER_ACL_ADDRULE + - type: ROUTER_ACL_REMOVERULE - type: NETWORK_NIC_ENABLE - type: NETWORK_NIC_DISABLE @@ -305,8 +301,9 @@ agents: options: node_id: 5 22: # "ACL: ADDRULE - Block outgoing traffic from client 1" (not supported in Primaite) - action: "NETWORK_ACL_ADDRULE" + action: "ROUTER_ACL_ADDRULE" options: + target_router_nodename: router_1 position: 1 permission: 2 source_ip_id: 7 # client 1 @@ -315,8 +312,9 @@ agents: dest_port_id: 1 protocol_id: 1 23: # "ACL: ADDRULE - Block outgoing traffic from client 2" (not supported in Primaite) - action: "NETWORK_ACL_ADDRULE" + action: "ROUTER_ACL_ADDRULE" options: + target_router_nodename: router_1 position: 2 permission: 2 source_ip_id: 8 # client 2 @@ -325,8 +323,9 @@ agents: dest_port_id: 1 protocol_id: 1 24: # block tcp traffic from client 1 to web app - action: "NETWORK_ACL_ADDRULE" + action: "ROUTER_ACL_ADDRULE" options: + target_router_nodename: router_1 position: 3 permission: 2 source_ip_id: 7 # client 1 @@ -335,8 +334,9 @@ agents: dest_port_id: 1 protocol_id: 3 25: # block tcp traffic from client 2 to web app - action: "NETWORK_ACL_ADDRULE" + action: "ROUTER_ACL_ADDRULE" options: + target_router_nodename: router_1 position: 4 permission: 2 source_ip_id: 8 # client 2 @@ -345,8 +345,9 @@ agents: dest_port_id: 1 protocol_id: 3 26: - action: "NETWORK_ACL_ADDRULE" + action: "ROUTER_ACL_ADDRULE" options: + target_router_nodename: router_1 position: 5 permission: 2 source_ip_id: 7 # client 1 @@ -355,8 +356,9 @@ agents: dest_port_id: 1 protocol_id: 3 27: - action: "NETWORK_ACL_ADDRULE" + action: "ROUTER_ACL_ADDRULE" options: + target_router_nodename: router_1 position: 6 permission: 2 source_ip_id: 8 # client 2 @@ -365,44 +367,54 @@ agents: dest_port_id: 1 protocol_id: 3 28: - action: "NETWORK_ACL_REMOVERULE" + action: "ROUTER_ACL_REMOVERULE" options: + target_router_nodename: router_1 position: 0 29: - action: "NETWORK_ACL_REMOVERULE" + action: "ROUTER_ACL_REMOVERULE" options: + target_router_nodename: router_1 position: 1 30: - action: "NETWORK_ACL_REMOVERULE" + action: "ROUTER_ACL_REMOVERULE" options: + target_router_nodename: router_1 position: 2 31: - action: "NETWORK_ACL_REMOVERULE" + action: "ROUTER_ACL_REMOVERULE" options: + target_router_nodename: router_1 position: 3 32: - action: "NETWORK_ACL_REMOVERULE" + action: "ROUTER_ACL_REMOVERULE" options: + target_router_nodename: router_1 position: 4 33: - action: "NETWORK_ACL_REMOVERULE" + action: "ROUTER_ACL_REMOVERULE" options: + target_router_nodename: router_1 position: 5 34: - action: "NETWORK_ACL_REMOVERULE" + action: "ROUTER_ACL_REMOVERULE" options: + target_router_nodename: router_1 position: 6 35: - action: "NETWORK_ACL_REMOVERULE" + action: "ROUTER_ACL_REMOVERULE" options: + target_router_nodename: router_1 position: 7 36: - action: "NETWORK_ACL_REMOVERULE" + action: "ROUTER_ACL_REMOVERULE" options: + target_router_nodename: router_1 position: 8 37: - action: "NETWORK_ACL_REMOVERULE" + action: "ROUTER_ACL_REMOVERULE" options: + target_router_nodename: router_1 position: 9 38: action: "NETWORK_NIC_DISABLE" diff --git a/tests/assets/configs/train_only_primaite_session.yaml b/tests/assets/configs/train_only_primaite_session.yaml index d0cbaab3..619b7a23 100644 --- a/tests/assets/configs/train_only_primaite_session.yaml +++ b/tests/assets/configs/train_only_primaite_session.yaml @@ -181,12 +181,8 @@ agents: - type: NODE_SHUTDOWN - type: NODE_STARTUP - type: NODE_RESET - - type: NETWORK_ACL_ADDRULE - options: - target_router_hostname: router_1 - - type: NETWORK_ACL_REMOVERULE - options: - target_router_hostname: router_1 + - type: ROUTER_ACL_ADDRULE + - type: ROUTER_ACL_REMOVERULE - type: NETWORK_NIC_ENABLE - type: NETWORK_NIC_DISABLE @@ -303,8 +299,9 @@ agents: options: node_id: 5 22: # "ACL: ADDRULE - Block outgoing traffic from client 1" (not supported in Primaite) - action: "NETWORK_ACL_ADDRULE" + action: "ROUTER_ACL_ADDRULE" options: + target_router_nodename: router_1 position: 1 permission: 2 source_ip_id: 7 # client 1 @@ -313,8 +310,9 @@ agents: dest_port_id: 1 protocol_id: 1 23: # "ACL: ADDRULE - Block outgoing traffic from client 2" (not supported in Primaite) - action: "NETWORK_ACL_ADDRULE" + action: "ROUTER_ACL_ADDRULE" options: + target_router_nodename: router_1 position: 2 permission: 2 source_ip_id: 8 # client 2 @@ -323,8 +321,9 @@ agents: dest_port_id: 1 protocol_id: 1 24: # block tcp traffic from client 1 to web app - action: "NETWORK_ACL_ADDRULE" + action: "ROUTER_ACL_ADDRULE" options: + target_router_nodename: router_1 position: 3 permission: 2 source_ip_id: 7 # client 1 @@ -333,8 +332,9 @@ agents: dest_port_id: 1 protocol_id: 3 25: # block tcp traffic from client 2 to web app - action: "NETWORK_ACL_ADDRULE" + action: "ROUTER_ACL_ADDRULE" options: + target_router_nodename: router_1 position: 4 permission: 2 source_ip_id: 8 # client 2 @@ -343,8 +343,9 @@ agents: dest_port_id: 1 protocol_id: 3 26: - action: "NETWORK_ACL_ADDRULE" + action: "ROUTER_ACL_ADDRULE" options: + target_router_nodename: router_1 position: 5 permission: 2 source_ip_id: 7 # client 1 @@ -353,8 +354,9 @@ agents: dest_port_id: 1 protocol_id: 3 27: - action: "NETWORK_ACL_ADDRULE" + action: "ROUTER_ACL_ADDRULE" options: + target_router_nodename: router_1 position: 6 permission: 2 source_ip_id: 8 # client 2 @@ -363,44 +365,54 @@ agents: dest_port_id: 1 protocol_id: 3 28: - action: "NETWORK_ACL_REMOVERULE" + action: "ROUTER_ACL_REMOVERULE" options: + target_router_nodename: router_1 position: 0 29: - action: "NETWORK_ACL_REMOVERULE" + action: "ROUTER_ACL_REMOVERULE" options: + target_router_nodename: router_1 position: 1 30: - action: "NETWORK_ACL_REMOVERULE" + action: "ROUTER_ACL_REMOVERULE" options: + target_router_nodename: router_1 position: 2 31: - action: "NETWORK_ACL_REMOVERULE" + action: "ROUTER_ACL_REMOVERULE" options: + target_router_nodename: router_1 position: 3 32: - action: "NETWORK_ACL_REMOVERULE" + action: "ROUTER_ACL_REMOVERULE" options: + target_router_nodename: router_1 position: 4 33: - action: "NETWORK_ACL_REMOVERULE" + action: "ROUTER_ACL_REMOVERULE" options: + target_router_nodename: router_1 position: 5 34: - action: "NETWORK_ACL_REMOVERULE" + action: "ROUTER_ACL_REMOVERULE" options: + target_router_nodename: router_1 position: 6 35: - action: "NETWORK_ACL_REMOVERULE" + action: "ROUTER_ACL_REMOVERULE" options: + target_router_nodename: router_1 position: 7 36: - action: "NETWORK_ACL_REMOVERULE" + action: "ROUTER_ACL_REMOVERULE" options: + target_router_nodename: router_1 position: 8 37: - action: "NETWORK_ACL_REMOVERULE" + action: "ROUTER_ACL_REMOVERULE" options: + target_router_nodename: router_1 position: 9 38: action: "NETWORK_NIC_DISABLE" diff --git a/tests/conftest.py b/tests/conftest.py index 078a78bd..05b8e925 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -494,8 +494,8 @@ def game_and_agent(): {"type": "NODE_SHUTDOWN"}, {"type": "NODE_STARTUP"}, {"type": "NODE_RESET"}, - {"type": "NETWORK_ACL_ADDRULE", "options": {"target_router_hostname": "router"}}, - {"type": "NETWORK_ACL_REMOVERULE", "options": {"target_router_hostname": "router"}}, + {"type": "ROUTER_ACL_ADDRULE"}, + {"type": "ROUTER_ACL_REMOVERULE"}, {"type": "NETWORK_NIC_ENABLE"}, {"type": "NETWORK_NIC_DISABLE"}, {"type": "NETWORK_PORT_ENABLE"}, diff --git a/tests/integration_tests/game_layer/test_actions.py b/tests/integration_tests/game_layer/test_actions.py index b3a52cd8..7bb8930c 100644 --- a/tests/integration_tests/game_layer/test_actions.py +++ b/tests/integration_tests/game_layer/test_actions.py @@ -93,9 +93,9 @@ def test_node_service_fix_integration(game_and_agent: Tuple[PrimaiteGame, ProxyA assert svc.health_state_actual == SoftwareHealthState.GOOD -def test_network_acl_addrule_integration(game_and_agent: Tuple[PrimaiteGame, ProxyAgent]): +def test_router_acl_addrule_integration(game_and_agent: Tuple[PrimaiteGame, ProxyAgent]): """ - Test that the NetworkACLAddRuleAction can form a request and that it is accepted by the simulation. + Test that the RouterACLAddRuleAction can form a request and that it is accepted by the simulation. The ACL starts off with 4 rules, and we add a rule, and check that the ACL now has 5 rules. """ @@ -112,8 +112,9 @@ def test_network_acl_addrule_integration(game_and_agent: Tuple[PrimaiteGame, Pro # 2: Add a rule to block client 1 from reaching server 2 on router action = ( - "NETWORK_ACL_ADDRULE", + "ROUTER_ACL_ADDRULE", { + "target_router_nodename": "router", "position": 4, # 4th rule "permission": 2, # DENY "source_ip_id": 3, # 10.0.1.2 (client_1) @@ -136,8 +137,9 @@ def test_network_acl_addrule_integration(game_and_agent: Tuple[PrimaiteGame, Pro # 4: Add a rule to block server_1 from reaching server_2 on router (this should not affect comms as they are on same subnet) action = ( - "NETWORK_ACL_ADDRULE", + "ROUTER_ACL_ADDRULE", { + "target_router_nodename": "router", "position": 5, # 5th rule "permission": 2, # DENY "source_ip_id": 5, # 10.0.2.2 (server_1) @@ -155,8 +157,8 @@ def test_network_acl_addrule_integration(game_and_agent: Tuple[PrimaiteGame, Pro assert server_1.ping("10.0.2.3") # Can ping server_2 -def test_network_acl_removerule_integration(game_and_agent: Tuple[PrimaiteGame, ProxyAgent]): - """Test that the NetworkACLRemoveRuleAction can form a request and that it is accepted by the simulation.""" +def test_router_acl_removerule_integration(game_and_agent: Tuple[PrimaiteGame, ProxyAgent]): + """Test that the RouterACLRemoveRuleAction can form a request and that it is accepted by the simulation.""" game, agent = game_and_agent # 1: Check that http traffic is going across the network nicely. @@ -171,8 +173,9 @@ def test_network_acl_removerule_integration(game_and_agent: Tuple[PrimaiteGame, # 2: Remove rule that allows HTTP traffic across the network action = ( - "NETWORK_ACL_REMOVERULE", + "ROUTER_ACL_REMOVERULE", { + "target_router_nodename": "router", "position": 3, # 4th rule }, ) From d8a66104f50c2c9f41b4522d99bbf4988513ef80 Mon Sep 17 00:00:00 2001 From: Marek Wolan Date: Fri, 29 Mar 2024 11:55:22 +0000 Subject: [PATCH 065/124] Fixed observations --- .../agent/observations/node_observations.py | 173 ++++++++++-------- .../network/hardware/nodes/network/router.py | 2 + 2 files changed, 102 insertions(+), 73 deletions(-) diff --git a/src/primaite/game/agent/observations/node_observations.py b/src/primaite/game/agent/observations/node_observations.py index 5d46b743..b51ea1f2 100644 --- a/src/primaite/game/agent/observations/node_observations.py +++ b/src/primaite/game/agent/observations/node_observations.py @@ -82,7 +82,7 @@ class ApplicationObservation(AbstractObservation, identifier="APPLICATION"): class FileObservation(AbstractObservation, identifier="FILE"): class ConfigSchema(AbstractObservation.ConfigSchema): file_name: str - include_num_access : bool = False + include_num_access: Optional[bool] = None def __init__(self, where: WhereType, include_num_access: bool)->None: self.where: WhereType = where @@ -118,8 +118,8 @@ class FolderObservation(AbstractObservation, identifier="FOLDER"): class ConfigSchema(AbstractObservation.ConfigSchema): folder_name: str files: List[FileObservation.ConfigSchema] = [] - num_files : int = 0 - include_num_access : bool = False + num_files : Optional[int] = None + include_num_access : Optional[bool] = None def __init__(self, where: WhereType, files: Iterable[FileObservation], num_files: int, include_num_access: bool)->None: self.where: WhereType = where @@ -179,7 +179,7 @@ class FolderObservation(AbstractObservation, identifier="FOLDER"): class NICObservation(AbstractObservation, identifier="NETWORK_INTERFACE"): class ConfigSchema(AbstractObservation.ConfigSchema): nic_num: int - include_nmne: bool = False + include_nmne: Optional[bool] = None def __init__(self, where: WhereType, include_nmne: bool)->None: @@ -233,13 +233,13 @@ class HostObservation(AbstractObservation, identifier="HOST"): applications: List[ApplicationObservation.ConfigSchema] = [] folders: List[FolderObservation.ConfigSchema] = [] network_interfaces: List[NICObservation.ConfigSchema] = [] - num_services: int - num_applications: int - num_folders: int - num_files: int - num_nics: int - include_nmne: bool - include_num_access: bool + num_services: Optional[int] = None + num_applications: Optional[int] = None + num_folders: Optional[int] = None + num_files: Optional[int] = None + num_nics: Optional[int] = None + include_nmne: Optional[bool] = None + include_num_access: Optional[bool] = None def __init__(self, where: WhereType, @@ -296,6 +296,7 @@ class HostObservation(AbstractObservation, identifier="HOST"): self.default_observation: ObsType = { "SERVICES": {i + 1: s.default_observation for i, s in enumerate(self.services)}, + "APPLICATIONS": {i + 1: a.default_observation for i, a in enumerate(self.applications)}, "FOLDERS": {i + 1: f.default_observation for i, f in enumerate(self.folders)}, "NICS": {i + 1: n.default_observation for i, n in enumerate(self.network_interfaces)}, "operating_status": 0, @@ -311,6 +312,7 @@ class HostObservation(AbstractObservation, identifier="HOST"): obs = {} obs["SERVICES"] = {i + 1: service.observe(state) for i, service in enumerate(self.services)} + obs["APPLICATIONS"] = {i + 1: app.observe(state) for i, app in enumerate(self.applications)} obs["FOLDERS"] = {i + 1: folder.observe(state) for i, folder in enumerate(self.folders)} obs["operating_status"] = node_state["operating_state"] obs["NICS"] = { @@ -324,6 +326,7 @@ class HostObservation(AbstractObservation, identifier="HOST"): def space(self) -> spaces.Space: shape = { "SERVICES": spaces.Dict({i + 1: service.space for i, service in enumerate(self.services)}), + "APPLICATIONS": spaces.Dict({i + 1: app.space for i, app in enumerate(self.applications)}), "FOLDERS": spaces.Dict({i + 1: folder.space for i, folder in enumerate(self.folders)}), "operating_status": spaces.Discrete(5), "NICS": spaces.Dict( @@ -393,15 +396,17 @@ class PortObservation(AbstractObservation, identifier="PORT"): class ACLObservation(AbstractObservation, identifier="ACL"): class ConfigSchema(AbstractObservation.ConfigSchema): - ip_list: List[IPv4Address] - port_list: List[int] - protocol_list: List[str] - num_rules: int + ip_list: Optional[List[IPv4Address]] = None + wildcard_list: Optional[List[str]] = None + port_list: Optional[List[int]] = None + protocol_list: Optional[List[str]] = None + num_rules: Optional[int] = None - def __init__(self, where: WhereType, num_rules: int, ip_list: List[IPv4Address], port_list: List[int],protocol_list: List[str])->None: + def __init__(self, where: WhereType, num_rules: int, ip_list: List[IPv4Address], wildcard_list: List[str], port_list: List[int],protocol_list: List[str])->None: self.where = where self.num_rules: int = num_rules self.ip_to_id: Dict[str, int] = {i+2:p for i,p in enumerate(ip_list)} + self.wildcard_to_id: Dict[str, int] = {i+2:p for i,p in enumerate(wildcard_list)} self.port_to_id: Dict[int, int] = {i+2:p for i,p in enumerate(port_list)} self.protocol_to_id: Dict[str, int] = {i+2:p for i,p in enumerate(protocol_list)} self.default_observation: Dict = { @@ -409,10 +414,12 @@ class ACLObservation(AbstractObservation, identifier="ACL"): + 1: { "position": i, "permission": 0, - "source_node_id": 0, - "source_port": 0, - "dest_node_id": 0, - "dest_port": 0, + "source_ip_id": 0, + "source_wildcard_id": 0, + "source_port_id": 0, + "dest_ip_id": 0, + "dest_wildcard_id": 0, + "dest_port_id": 0, "protocol": 0, } for i in range(self.num_rules) @@ -431,30 +438,38 @@ class ACLObservation(AbstractObservation, identifier="ACL"): obs[i] = { "position": i - 1, "permission": 0, - "source_node_id": 0, - "source_port": 0, - "dest_node_id": 0, - "dest_port": 0, + "source_ip_id": 0, + "source_wildcard_id": 0, + "source_port_id": 0, + "dest_ip_id": 0, + "dest_wildcard_id": 0, + "dest_port_id": 0, "protocol": 0, } else: src_ip = rule_state["src_ip_address"] - src_node_id = 1 if src_ip is None else self.node_to_id[IPv4Address(src_ip)] + src_node_id = self.ip_to_id.get(src_ip, 1) dst_ip = rule_state["dst_ip_address"] - dst_node_ip = 1 if dst_ip is None else self.node_to_id[IPv4Address(dst_ip)] - src_port = rule_state["src_port"] - src_port_id = 1 if src_port is None else self.port_to_id[src_port] - dst_port = rule_state["dst_port"] - dst_port_id = 1 if dst_port is None else self.port_to_id[dst_port] + dst_node_ip = self.ip_to_id.get(dst_ip, 1) + src_wildcard = rule_state["source_wildcard_id"] + src_wildcard_id = self.wildcard_to_id.get(src_wildcard, 1) + dst_wildcard = rule_state["dest_wildcard_id"] + dst_wildcard_id = self.wildcard_to_id.get(dst_wildcard, 1) + src_port = rule_state["source_port_id"] + src_port_id = self.port_to_id.get(src_port, 1) + dst_port = rule_state["dest_port_id"] + dst_port_id = self.port_to_id.get(dst_port, 1) protocol = rule_state["protocol"] - protocol_id = 1 if protocol is None else self.protocol_to_id[protocol] + protocol_id = self.protocol_to_id.get(protocol, 1) obs[i] = { "position": i - 1, "permission": rule_state["action"], - "source_node_id": src_node_id, - "source_port": src_port_id, - "dest_node_id": dst_node_ip, - "dest_port": dst_port_id, + "source_ip_id": src_node_id, + "source_wildcard_id": src_wildcard_id, + "source_port_id": src_port_id, + "dest_ip_id": dst_node_ip, + "dest_wildcard_id": dst_wildcard_id, + "dest_port_id": dst_port_id, "protocol": protocol_id, } i += 1 @@ -462,7 +477,6 @@ class ACLObservation(AbstractObservation, identifier="ACL"): @property def space(self) -> spaces.Space: - raise NotImplementedError("TODO: need to add wildcard id.") return spaces.Dict( { i @@ -471,10 +485,12 @@ class ACLObservation(AbstractObservation, identifier="ACL"): "position": spaces.Discrete(self.num_rules), "permission": spaces.Discrete(3), # adding two to lengths is to account for reserved values 0 (unused) and 1 (any) - "source_node_id": spaces.Discrete(len(set(self.node_to_id.values())) + 2), - "source_port": spaces.Discrete(len(self.port_to_id) + 2), - "dest_node_id": spaces.Discrete(len(set(self.node_to_id.values())) + 2), - "dest_port": spaces.Discrete(len(self.port_to_id) + 2), + "source_ip_id": spaces.Discrete(len(self.ip_to_id) + 2), + "source_wildcard_id": spaces.Discrete(len(self.wildcard_to_id)+2), + "source_port_id": spaces.Discrete(len(self.port_to_id) + 2), + "dest_ip_id": spaces.Discrete(len(self.ip_to_id) + 2), + "dest_wildcard_id": spaces.Discrete(len(self.wildcard_to_id)+2), + "dest_port_id": spaces.Discrete(len(self.port_to_id) + 2), "protocol": spaces.Discrete(len(self.protocol_to_id) + 2), } ) @@ -489,20 +505,22 @@ class ACLObservation(AbstractObservation, identifier="ACL"): where = parent_where+["acl", "acl"], num_rules = config.num_rules, ip_list = config.ip_list, - ports = config.port_list, - protocols = config.protocol_list + wildcard_list = config.wildcard_list, + port_list = config.port_list, + protocol_list = config.protocol_list ) class RouterObservation(AbstractObservation, identifier="ROUTER"): class ConfigSchema(AbstractObservation.ConfigSchema): hostname: str - ports: List[PortObservation.ConfigSchema] - num_ports: int - acl: ACLObservation.ConfigSchema - ip_list: List[str] - port_list: List[int] - protocol_list: List[str] - num_rules: int + ports: Optional[List[PortObservation.ConfigSchema]] = None + num_ports: Optional[int] = None + acl: Optional[ACLObservation.ConfigSchema] = None + ip_list: Optional[List[str]] = None + wildcard_list: Optional[List[str]] = None + port_list: Optional[List[int]] = None + protocol_list: Optional[List[str]] = None + num_rules: Optional[int] = None def __init__(self, where: WhereType, @@ -540,7 +558,7 @@ class RouterObservation(AbstractObservation, identifier="ROUTER"): @property def space(self) -> spaces.Space: return spaces.Dict({ - "PORTS": {i+1:p.space for i,p in self.ports}, + "PORTS": spaces.Dict({i+1:p.space for i,p in enumerate(self.ports)}), "ACL": self.acl.space }) @@ -548,15 +566,22 @@ class RouterObservation(AbstractObservation, identifier="ROUTER"): def from_config(cls, config: ConfigSchema, parent_where: WhereType = [] ) -> RouterObservation: where = parent_where + ["nodes", config.hostname] + if config.acl is None: + config.acl = ACLObservation.ConfigSchema() if config.acl.num_rules is None: config.acl.num_rules = config.num_rules if config.acl.ip_list is None: config.acl.ip_list = config.ip_list + if config.acl.wildcard_list is None: + config.acl.wildcard_list = config.wildcard_list if config.acl.port_list is None: config.acl.port_list = config.port_list if config.acl.protocol_list is None: config.acl.protocol_list = config.protocol_list + if config.ports is None: + config.ports = [PortObservation.ConfigSchema(port_id=i+1) for i in range(config.num_ports)] + ports = [PortObservation.from_config(config=c, parent_where=where) for c in config.ports] acl = ACLObservation.from_config(config=config.acl, parent_where=where) return cls(where=where, ports=ports, num_ports=config.num_ports, acl=acl) @@ -564,30 +589,32 @@ class RouterObservation(AbstractObservation, identifier="ROUTER"): class FirewallObservation(AbstractObservation, identifier="FIREWALL"): class ConfigSchema(AbstractObservation.ConfigSchema): hostname: str - ip_list: List[str] - port_list: List[int] - protocol_list: List[str] - num_rules: int + ip_list: Optional[List[str]] = None + wildcard_list: Optional[List[str]] = None + port_list: Optional[List[int]] = None + protocol_list: Optional[List[str]] = None + num_rules: Optional[int] = None def __init__(self, where: WhereType, ip_list: List[str], + wildcard_list: List[str], port_list: List[int], protocol_list: List[str], num_rules: int, )->None: self.where: WhereType = where - self.ports: List[PortObservation] = [PortObservation(where=[self.where+["port", port_num]]) for port_num in (1,2,3) ] + self.ports: List[PortObservation] = [PortObservation(where=self.where+["port", port_num]) for port_num in (1,2,3) ] #TODO: check what the port nums are for firewall. - self.internal_inbound_acl = ACLObservation(where = self.where+["acl","internal","inbound"], num_rules= num_rules, ip_list=ip_list, port_list=port_list, protocol_list=protocol_list) - self.internal_outbound_acl = ACLObservation(where = self.where+["acl","internal","outbound"], num_rules= num_rules, ip_list=ip_list, port_list=port_list, protocol_list=protocol_list) - self.dmz_inbound_acl = ACLObservation(where = self.where+["acl","dmz","inbound"], num_rules= num_rules, ip_list=ip_list, port_list=port_list, protocol_list=protocol_list) - self.dmz_outbound_acl = ACLObservation(where = self.where+["acl","dmz","outbound"], num_rules= num_rules, ip_list=ip_list, port_list=port_list, protocol_list=protocol_list) - self.external_inbound_acl = ACLObservation(where = self.where+["acl","external","inbound"], num_rules= num_rules, ip_list=ip_list, port_list=port_list, protocol_list=protocol_list) - self.external_outbound_acl = ACLObservation(where = self.where+["acl","external","outbound"], num_rules= num_rules, ip_list=ip_list, port_list=port_list, protocol_list=protocol_list) + self.internal_inbound_acl = ACLObservation(where = self.where+["acl","internal","inbound"], num_rules= num_rules, ip_list=ip_list, wildcard_list=wildcard_list, port_list=port_list, protocol_list=protocol_list) + self.internal_outbound_acl = ACLObservation(where = self.where+["acl","internal","outbound"], num_rules= num_rules, ip_list=ip_list, wildcard_list=wildcard_list, port_list=port_list, protocol_list=protocol_list) + self.dmz_inbound_acl = ACLObservation(where = self.where+["acl","dmz","inbound"], num_rules= num_rules, ip_list=ip_list, wildcard_list=wildcard_list, port_list=port_list, protocol_list=protocol_list) + self.dmz_outbound_acl = ACLObservation(where = self.where+["acl","dmz","outbound"], num_rules= num_rules, ip_list=ip_list, wildcard_list=wildcard_list, port_list=port_list, protocol_list=protocol_list) + self.external_inbound_acl = ACLObservation(where = self.where+["acl","external","inbound"], num_rules= num_rules, ip_list=ip_list, wildcard_list=wildcard_list, port_list=port_list, protocol_list=protocol_list) + self.external_outbound_acl = ACLObservation(where = self.where+["acl","external","outbound"], num_rules= num_rules, ip_list=ip_list, wildcard_list=wildcard_list, port_list=port_list, protocol_list=protocol_list) self.default_observation = { @@ -646,7 +673,7 @@ class FirewallObservation(AbstractObservation, identifier="FIREWALL"): @classmethod def from_config(cls, config: ConfigSchema, parent_where: WhereType = [] ) -> FirewallObservation: where = parent_where+["nodes", config.hostname] - return cls(where=where, ip_list=config.ip_list, port_list=config.port_list, protocol_list=config.protocol_list, num_rules=config.num_rules) + return cls(where=where, ip_list=config.ip_list, wildcard_list=config.wildcard_list, port_list=config.port_list, protocol_list=config.protocol_list, num_rules=config.num_rules) class NodesObservation(AbstractObservation, identifier="NODES"): class ConfigSchema(AbstractObservation.ConfigSchema): @@ -663,7 +690,9 @@ class NodesObservation(AbstractObservation, identifier="NODES"): include_nmne: bool include_num_access: bool + num_ports: int ip_list: List[str] + wildcard_list: List[str] port_list: List[int] protocol_list: List[str] num_rules: int @@ -710,13 +739,13 @@ class NodesObservation(AbstractObservation, identifier="NODES"): if host_config.num_services is None: host_config.num_services = config.num_services if host_config.num_applications is None: - host_config.num_application = config.num_applications + host_config.num_applications = config.num_applications if host_config.num_folders is None: - host_config.num_folder = config.num_folders + host_config.num_folders = config.num_folders if host_config.num_files is None: - host_config.num_file = config.num_files + host_config.num_files = config.num_files if host_config.num_nics is None: - host_config.num_nic = config.num_nics + host_config.num_nics = config.num_nics if host_config.include_nmne is None: host_config.include_nmne = config.include_nmne if host_config.include_num_access is None: @@ -727,26 +756,24 @@ class NodesObservation(AbstractObservation, identifier="NODES"): router_config.num_ports = config.num_ports if router_config.ip_list is None: router_config.ip_list = config.ip_list - + if router_config.wildcard_list is None: + router_config.wildcard_list = config.wildcard_list if router_config.port_list is None: router_config.port_list = config.port_list - if router_config.protocol_list is None: router_config.protocol_list = config.protocol_list - if router_config.num_rules is None: router_config.num_rules = config.num_rules for firewall_config in config.firewalls: if firewall_config.ip_list is None: firewall_config.ip_list = config.ip_list - + if firewall_config.wildcard_list is None: + firewall_config.wildcard_list = config.wildcard_list if firewall_config.port_list is None: firewall_config.port_list = config.port_list - if firewall_config.protocol_list is None: firewall_config.protocol_list = config.protocol_list - if firewall_config.num_rules is None: firewall_config.num_rules = config.num_rules @@ -754,4 +781,4 @@ class NodesObservation(AbstractObservation, identifier="NODES"): routers = [RouterObservation.from_config(config=c, parent_where=where) for c in config.routers] firewalls = [FirewallObservation.from_config(config=c, parent_where=where) for c in config.firewalls] - cls(where=where, hosts=hosts, routers=routers, firewalls=firewalls) + return cls(where=where, hosts=hosts, routers=routers, firewalls=firewalls) diff --git a/src/primaite/simulator/network/hardware/nodes/network/router.py b/src/primaite/simulator/network/hardware/nodes/network/router.py index d2b47c1a..69ab6a82 100644 --- a/src/primaite/simulator/network/hardware/nodes/network/router.py +++ b/src/primaite/simulator/network/hardware/nodes/network/router.py @@ -147,8 +147,10 @@ class ACLRule(SimComponent): state["action"] = self.action.value state["protocol"] = self.protocol.name if self.protocol else None state["src_ip_address"] = str(self.src_ip_address) if self.src_ip_address else None + state["src_wildcard_mask"] = str(self.src_wildcard_mask) if self.src_wildcard_mask else None state["src_port"] = self.src_port.name if self.src_port else None state["dst_ip_address"] = str(self.dst_ip_address) if self.dst_ip_address else None + state["dst_wildcard_mask"] = str(self.dst_wildcard_mask) if self.dst_wildcard_mask else None state["dst_port"] = self.dst_port.name if self.dst_port else None state["match_count"] = self.match_count return state From 1751714d3d8f1f5e78a6b97f712765dbd23cc6fd Mon Sep 17 00:00:00 2001 From: Marek Wolan Date: Fri, 29 Mar 2024 12:21:52 +0000 Subject: [PATCH 066/124] Tidy up node observation file --- .../game/agent/observations/node_observations.py | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/src/primaite/game/agent/observations/node_observations.py b/src/primaite/game/agent/observations/node_observations.py index b51ea1f2..ed930265 100644 --- a/src/primaite/game/agent/observations/node_observations.py +++ b/src/primaite/game/agent/observations/node_observations.py @@ -1,17 +1,12 @@ -# TODO: make sure when config options are being passed down from higher-level observations to lower-level, but the lower-level also defines that option, don't overwrite. from __future__ import annotations from ipaddress import IPv4Address -from typing import Any, Dict, Iterable, List, Literal, Optional, Tuple, TYPE_CHECKING, Union +from typing import Any, Dict, Iterable, List, Optional from gymnasium import spaces from gymnasium.core import ObsType -from pydantic import BaseModel, ConfigDict from primaite import getLogger from primaite.game.agent.observations.observations import AbstractObservation -# from primaite.game.agent.observations.file_system_observations import FolderObservation -# from primaite.game.agent.observations.nic_observations import NicObservation -# from primaite.game.agent.observations.software_observation import ServiceObservation from primaite.game.agent.utils import access_from_nested_dict, NOT_PRESENT_IN_STATE _LOGGER = getLogger(__name__) @@ -420,7 +415,7 @@ class ACLObservation(AbstractObservation, identifier="ACL"): "dest_ip_id": 0, "dest_wildcard_id": 0, "dest_port_id": 0, - "protocol": 0, + "protocol_id": 0, } for i in range(self.num_rules) } @@ -444,7 +439,7 @@ class ACLObservation(AbstractObservation, identifier="ACL"): "dest_ip_id": 0, "dest_wildcard_id": 0, "dest_port_id": 0, - "protocol": 0, + "protocol_id": 0, } else: src_ip = rule_state["src_ip_address"] @@ -470,7 +465,7 @@ class ACLObservation(AbstractObservation, identifier="ACL"): "dest_ip_id": dst_node_ip, "dest_wildcard_id": dst_wildcard_id, "dest_port_id": dst_port_id, - "protocol": protocol_id, + "protocol_id": protocol_id, } i += 1 return obs @@ -491,7 +486,7 @@ class ACLObservation(AbstractObservation, identifier="ACL"): "dest_ip_id": spaces.Discrete(len(self.ip_to_id) + 2), "dest_wildcard_id": spaces.Discrete(len(self.wildcard_to_id)+2), "dest_port_id": spaces.Discrete(len(self.port_to_id) + 2), - "protocol": spaces.Discrete(len(self.protocol_to_id) + 2), + "protocol_id": spaces.Discrete(len(self.protocol_to_id) + 2), } ) for i in range(self.num_rules) From 9123aff592e952df7f9df5d9257dbbb5c9ef973a Mon Sep 17 00:00:00 2001 From: Marek Wolan Date: Fri, 29 Mar 2024 13:15:31 +0000 Subject: [PATCH 067/124] #2417 Add hella docstrings --- .../agent/observations/node_observations.py | 997 ++++++++++++++---- 1 file changed, 792 insertions(+), 205 deletions(-) diff --git a/src/primaite/game/agent/observations/node_observations.py b/src/primaite/game/agent/observations/node_observations.py index ed930265..c702f8e2 100644 --- a/src/primaite/game/agent/observations/node_observations.py +++ b/src/primaite/game/agent/observations/node_observations.py @@ -1,4 +1,5 @@ from __future__ import annotations + from ipaddress import IPv4Address from typing import Any, Dict, Iterable, List, Optional @@ -15,14 +16,34 @@ WhereType = Iterable[str | int] | None class ServiceObservation(AbstractObservation, identifier="SERVICE"): - class ConfigSchema(AbstractObservation.ConfigSchema): - service_name: str + """Service observation, shows status of a service in the simulation environment.""" - def __init__(self, where: WhereType)->None: + class ConfigSchema(AbstractObservation.ConfigSchema): + """Configuration schema for ServiceObservation.""" + + service_name: str + """Name of the service, used for querying simulation state dictionary""" + + def __init__(self, where: WhereType) -> None: + """ + Initialize a service observation instance. + + :param where: Where in the simulation state dictionary to find the relevant information for this service. + A typical location for a service might be ['network', 'nodes', , 'services', ]. + :type where: WhereType + """ self.where = where self.default_observation = {"operating_status": 0, "health_status": 0} - def observe(self, state: Dict) -> Any: + def observe(self, state: Dict) -> ObsType: + """ + Generate observation based on the current state of the simulation. + + :param state: Simulation state dictionary. + :type state: Dict + :return: Observation containing the operating status and health status of the service. + :rtype: Any + """ service_state = access_from_nested_dict(state, self.where) if service_state is NOT_PRESENT_IN_STATE: return self.default_observation @@ -33,24 +54,60 @@ class ServiceObservation(AbstractObservation, identifier="SERVICE"): @property def space(self) -> spaces.Space: - """Gymnasium space object describing the observation space shape.""" + """ + Gymnasium space object describing the observation space shape. + + :return: Gymnasium space representing the observation space for service status. + :rtype: spaces.Space + """ return spaces.Dict({"operating_status": spaces.Discrete(7), "health_status": spaces.Discrete(5)}) @classmethod - def from_config(cls, config: ConfigSchema, parent_where: WhereType = [] ) -> ServiceObservation: - return cls(where=parent_where+["services", config.service_name]) + def from_config(cls, config: ConfigSchema, parent_where: WhereType = []) -> ServiceObservation: + """ + Create a service observation from a configuration schema. + + :param config: Configuration schema containing the necessary information for the service observation. + :type config: ConfigSchema + :param parent_where: Where in the simulation state dictionary to find the information about this service's + parent node. A typical location for a node might be ['network', 'nodes', ]. + :type parent_where: WhereType, optional + :return: Constructed service observation instance. + :rtype: ServiceObservation + """ + return cls(where=parent_where + ["services", config.service_name]) class ApplicationObservation(AbstractObservation, identifier="APPLICATION"): - class ConfigSchema(AbstractObservation.ConfigSchema): - application_name: str + """Application observation, shows the status of an application within the simulation environment.""" - def __init__(self, where: WhereType)->None: + class ConfigSchema(AbstractObservation.ConfigSchema): + """Configuration schema for ApplicationObservation.""" + + application_name: str + """Name of the application, used for querying simulation state dictionary""" + + def __init__(self, where: WhereType) -> None: + """ + Initialise an application observation instance. + + :param where: Where in the simulation state dictionary to find the relevant information for this application. + A typical location for an application might be + ['network', 'nodes', , 'applications', ]. + :type where: WhereType + """ self.where = where self.default_observation = {"operating_status": 0, "health_status": 0, "num_executions": 0} def observe(self, state: Dict) -> Any: - # raise NotImplementedError("TODO NUM EXECUTIONS NEEDS TO BE CONVERTED TO A CATEGORICAL") + """ + Generate observation based on the current state of the simulation. + + :param state: Simulation state dictionary. + :type state: Dict + :return: Obs containing the operating status, health status, and number of executions of the application. + :rtype: Any + """ application_state = access_from_nested_dict(state, self.where) if application_state is NOT_PRESENT_IN_STATE: return self.default_observation @@ -62,32 +119,74 @@ class ApplicationObservation(AbstractObservation, identifier="APPLICATION"): @property def space(self) -> spaces.Space: - """Gymnasium space object describing the observation space shape.""" - return spaces.Dict({ - "operating_status": spaces.Discrete(7), - "health_status": spaces.Discrete(5), - "num_executions": spaces.Discrete(4) - }) + """ + Gymnasium space object describing the observation space shape. + + :return: Gymnasium space representing the observation space for application status. + :rtype: spaces.Space + """ + return spaces.Dict( + { + "operating_status": spaces.Discrete(7), + "health_status": spaces.Discrete(5), + "num_executions": spaces.Discrete(4), + } + ) @classmethod - def from_config(cls, config: ConfigSchema, parent_where: WhereType = [] ) -> ApplicationObservation: - return cls(where=parent_where+["applications", config.application_name]) + def from_config(cls, config: ConfigSchema, parent_where: WhereType = []) -> ApplicationObservation: + """ + Create an application observation from a configuration schema. + + :param config: Configuration schema containing the necessary information for the application observation. + :type config: ConfigSchema + :param parent_where: Where in the simulation state dictionary to find the information about this application's + parent node. A typical location for a node might be ['network', 'nodes', ]. + :type parent_where: WhereType, optional + :return: Constructed application observation instance. + :rtype: ApplicationObservation + """ + return cls(where=parent_where + ["applications", config.application_name]) class FileObservation(AbstractObservation, identifier="FILE"): - class ConfigSchema(AbstractObservation.ConfigSchema): - file_name: str - include_num_access: Optional[bool] = None + """File observation, provides status information about a file within the simulation environment.""" - def __init__(self, where: WhereType, include_num_access: bool)->None: + class ConfigSchema(AbstractObservation.ConfigSchema): + """Configuration schema for FileObservation.""" + + file_name: str + """Name of the file, used for querying simulation state dictionary.""" + include_num_access: Optional[bool] = None + """Whether to include the number of accesses to the file in the observation.""" + + def __init__(self, where: WhereType, include_num_access: bool) -> None: + """ + Initialize a file observation instance. + + :param where: Where in the simulation state dictionary to find the relevant information for this file. + A typical location for a file might be + ['network', 'nodes', , 'file_system', 'folder', , 'files', ]. + :type where: WhereType + :param include_num_access: Whether to include the number of accesses to the file in the observation. + :type include_num_access: bool + """ self.where: WhereType = where - self.include_num_access :bool = include_num_access + self.include_num_access: bool = include_num_access self.default_observation: ObsType = {"health_status": 0} if self.include_num_access: self.default_observation["num_access"] = 0 def observe(self, state: Dict) -> Any: + """ + Generate observation based on the current state of the simulation. + + :param state: Simulation state dictionary. + :type state: Dict + :return: Observation containing the health status of the file and optionally the number of accesses. + :rtype: Any + """ file_state = access_from_nested_dict(state, self.where) if file_state is NOT_PRESENT_IN_STATE: return self.default_observation @@ -99,29 +198,69 @@ class FileObservation(AbstractObservation, identifier="FILE"): @property def space(self) -> spaces.Space: + """ + Gymnasium space object describing the observation space shape. + + :return: Gymnasium space representing the observation space for file status. + :rtype: spaces.Space + """ space = {"health_status": spaces.Discrete(6)} if self.include_num_access: space["num_access"] = spaces.Discrete(4) return spaces.Dict(space) @classmethod - def from_config(cls, config: ConfigSchema, parent_where: WhereType = [] ) -> FileObservation: - return cls(where=parent_where+["files", config.file_name], include_num_access=config.include_num_access) + def from_config(cls, config: ConfigSchema, parent_where: WhereType = []) -> FileObservation: + """ + Create a file observation from a configuration schema. + + :param config: Configuration schema containing the necessary information for the file observation. + :type config: ConfigSchema + :param parent_where: Where in the simulation state dictionary to find the information about this file's + parent node. A typical location for a node might be ['network', 'nodes', ]. + :type parent_where: WhereType, optional + :return: Constructed file observation instance. + :rtype: FileObservation + """ + return cls(where=parent_where + ["files", config.file_name], include_num_access=config.include_num_access) class FolderObservation(AbstractObservation, identifier="FOLDER"): - class ConfigSchema(AbstractObservation.ConfigSchema): - folder_name: str - files: List[FileObservation.ConfigSchema] = [] - num_files : Optional[int] = None - include_num_access : Optional[bool] = None + """Folder observation, provides status information about a folder within the simulation environment.""" - def __init__(self, where: WhereType, files: Iterable[FileObservation], num_files: int, include_num_access: bool)->None: + class ConfigSchema(AbstractObservation.ConfigSchema): + """Configuration schema for FolderObservation.""" + + folder_name: str + """Name of the folder, used for querying simulation state dictionary.""" + files: List[FileObservation.ConfigSchema] = [] + """List of file configurations within the folder.""" + num_files: Optional[int] = None + """Number of spaces for file observations in this folder.""" + include_num_access: Optional[bool] = None + """Whether files in this folder should include the number of accesses in their observation.""" + + def __init__( + self, where: WhereType, files: Iterable[FileObservation], num_files: int, include_num_access: bool + ) -> None: + """ + Initialize a folder observation instance. + + :param where: Where in the simulation state dictionary to find the relevant information for this folder. + A typical location for a folder might be ['network', 'nodes', , 'folders', ]. + :type where: WhereType + :param files: List of file observation instances within the folder. + :type files: Iterable[FileObservation] + :param num_files: Number of files expected in the folder. + :type num_files: int + :param include_num_access: Whether to include the number of accesses to files in the observation. + :type include_num_access: bool + """ self.where: WhereType = where self.files: List[FileObservation] = files while len(self.files) < num_files: - self.files.append(FileObservation(where=None,include_num_access=include_num_access)) + self.files.append(FileObservation(where=None, include_num_access=include_num_access)) while len(self.files) > num_files: truncated_file = self.files.pop() msg = f"Too many files in folder observation. Truncating file {truncated_file}" @@ -133,6 +272,14 @@ class FolderObservation(AbstractObservation, identifier="FOLDER"): } def observe(self, state: Dict) -> Any: + """ + Generate observation based on the current state of the simulation. + + :param state: Simulation state dictionary. + :type state: Dict + :return: Observation containing the health status of the folder and status of files within the folder. + :rtype: Any + """ folder_state = access_from_nested_dict(state, self.where) if folder_state is NOT_PRESENT_IN_STATE: return self.default_observation @@ -148,9 +295,10 @@ class FolderObservation(AbstractObservation, identifier="FOLDER"): @property def space(self) -> spaces.Space: - """Gymnasium space object describing the observation space shape. + """ + Gymnasium space object describing the observation space shape. - :return: Gymnasium space + :return: Gymnasium space representing the observation space for folder status. :rtype: spaces.Space """ return spaces.Dict( @@ -159,34 +307,68 @@ class FolderObservation(AbstractObservation, identifier="FOLDER"): "FILES": spaces.Dict({i + 1: f.space for i, f in enumerate(self.files)}), } ) + @classmethod - def from_config(cls, config: ConfigSchema, parent_where: WhereType = [] ) -> FolderObservation: + def from_config(cls, config: ConfigSchema, parent_where: WhereType = []) -> FolderObservation: + """ + Create a folder observation from a configuration schema. + + :param config: Configuration schema containing the necessary information for the folder observation. + :type config: ConfigSchema + :param parent_where: Where in the simulation state dictionary to find the information about this folder's + parent node. A typical location for a node might be ['network', 'nodes', ]. + :type parent_where: WhereType, optional + :return: Constructed folder observation instance. + :rtype: FolderObservation + """ where = parent_where + ["folders", config.folder_name] - #pass down shared/common config items + # pass down shared/common config items for file_config in config.files: file_config.include_num_access = config.include_num_access - files = [FileObservation.from_config(config=f, parent_where = where) for f in config.files] + files = [FileObservation.from_config(config=f, parent_where=where) for f in config.files] return cls(where=where, files=files, num_files=config.num_files, include_num_access=config.include_num_access) class NICObservation(AbstractObservation, identifier="NETWORK_INTERFACE"): + """Status information about a network interface within the simulation environment.""" + class ConfigSchema(AbstractObservation.ConfigSchema): + """Configuration schema for NICObservation.""" + nic_num: int + """Number of the network interface.""" include_nmne: Optional[bool] = None + """Whether to include number of malicious network events (NMNE) in the observation.""" + def __init__(self, where: WhereType, include_nmne: bool) -> None: + """ + Initialize a network interface observation instance. - def __init__(self, where: WhereType, include_nmne: bool)->None: + :param where: Where in the simulation state dictionary to find the relevant information for this interface. + A typical location for a network interface might be + ['network', 'nodes', , 'NICs', ]. + :type where: WhereType + :param include_nmne: Flag to determine whether to include NMNE information in the observation. + :type include_nmne: bool + """ self.where = where - self.include_nmne : bool = include_nmne + self.include_nmne: bool = include_nmne self.default_observation: ObsType = {"nic_status": 0} if self.include_nmne: - self.default_observation.update({"NMNE":{"inbound":0, "outbound":0}}) + self.default_observation.update({"NMNE": {"inbound": 0, "outbound": 0}}) def observe(self, state: Dict) -> Any: - # raise NotImplementedError("TODO: CATEGORISATION") + """ + Generate observation based on the current state of the simulation. + + :param state: Simulation state dictionary. + :type state: Dict + :return: Observation containing the status of the network interface and optionally NMNE information. + :rtype: Any + """ nic_state = access_from_nested_dict(state, self.where) if nic_state is NOT_PRESENT_IN_STATE: @@ -206,9 +388,14 @@ class NICObservation(AbstractObservation, identifier="NETWORK_INTERFACE"): self.nmne_outbound_last_step = outbound_count return obs - @property def space(self) -> spaces.Space: + """ + Gymnasium space object describing the observation space shape. + + :return: Gymnasium space representing the observation space for network interface status and NMNE information. + :rtype: spaces.Space + """ space = spaces.Dict({"nic_status": spaces.Discrete(3)}) if self.include_nmne: @@ -217,43 +404,99 @@ class NICObservation(AbstractObservation, identifier="NETWORK_INTERFACE"): return space @classmethod - def from_config(cls, config: ConfigSchema, parent_where: WhereType = [] ) -> NICObservation: - return cls(where = parent_where+["NICs", config.nic_num], include_nmne=config.include_nmne) + def from_config(cls, config: ConfigSchema, parent_where: WhereType = []) -> NICObservation: + """ + Create a network interface observation from a configuration schema. + + :param config: Configuration schema containing the necessary information for the network interface observation. + :type config: ConfigSchema + :param parent_where: Where in the simulation state dictionary to find the information about this NIC's + parent node. A typical location for a node might be ['network', 'nodes', ]. + :type parent_where: WhereType, optional + :return: Constructed network interface observation instance. + :rtype: NICObservation + """ + return cls(where=parent_where + ["NICs", config.nic_num], include_nmne=config.include_nmne) class HostObservation(AbstractObservation, identifier="HOST"): + """Host observation, provides status information about a host within the simulation environment.""" + class ConfigSchema(AbstractObservation.ConfigSchema): + """Configuration schema for HostObservation.""" + hostname: str + """Hostname of the host, used for querying simulation state dictionary.""" services: List[ServiceObservation.ConfigSchema] = [] + """List of services to observe on the host.""" applications: List[ApplicationObservation.ConfigSchema] = [] + """List of applications to observe on the host.""" folders: List[FolderObservation.ConfigSchema] = [] + """List of folders to observe on the host.""" network_interfaces: List[NICObservation.ConfigSchema] = [] + """List of network interfaces to observe on the host.""" num_services: Optional[int] = None + """Number of spaces for service observations on this host.""" num_applications: Optional[int] = None + """Number of spaces for application observations on this host.""" num_folders: Optional[int] = None + """Number of spaces for folder observations on this host.""" num_files: Optional[int] = None + """Number of spaces for file observations on this host.""" num_nics: Optional[int] = None + """Number of spaces for network interface observations on this host.""" include_nmne: Optional[bool] = None + """Whether network interface observations should include number of malicious network events.""" include_num_access: Optional[bool] = None + """Whether to include the number of accesses to files observations on this host.""" - def __init__(self, - where: WhereType, - services:List[ServiceObservation], - applications:List[ApplicationObservation], - folders:List[FolderObservation], - network_interfaces:List[NICObservation], - num_services: int, - num_applications: int, - num_folders: int, - num_files: int, - num_nics: int, - include_nmne: bool, - include_num_access: bool - )->None: + def __init__( + self, + where: WhereType, + services: List[ServiceObservation], + applications: List[ApplicationObservation], + folders: List[FolderObservation], + network_interfaces: List[NICObservation], + num_services: int, + num_applications: int, + num_folders: int, + num_files: int, + num_nics: int, + include_nmne: bool, + include_num_access: bool, + ) -> None: + """ + Initialize a host observation instance. - self.where : WhereType = where + :param where: Where in the simulation state dictionary to find the relevant information for this host. + A typical location for a host might be ['network', 'nodes', ]. + :type where: WhereType + :param services: List of service observations on the host. + :type services: List[ServiceObservation] + :param applications: List of application observations on the host. + :type applications: List[ApplicationObservation] + :param folders: List of folder observations on the host. + :type folders: List[FolderObservation] + :param network_interfaces: List of network interface observations on the host. + :type network_interfaces: List[NICObservation] + :param num_services: Number of services to observe. + :type num_services: int + :param num_applications: Number of applications to observe. + :type num_applications: int + :param num_folders: Number of folders to observe. + :type num_folders: int + :param num_files: Number of files. + :type num_files: int + :param num_nics: Number of network interfaces. + :type num_nics: int + :param include_nmne: Flag to include network metrics and errors. + :type include_nmne: bool + :param include_num_access: Flag to include the number of accesses to files. + :type include_num_access: bool + """ + self.where: WhereType = where - # ensure service list has length equal to num_services by truncating or padding + # Ensure lists have lengths equal to specified counts by truncating or padding self.services: List[ServiceObservation] = services while len(self.services) < num_services: self.services.append(ServiceObservation(where=None)) @@ -262,31 +505,30 @@ class HostObservation(AbstractObservation, identifier="HOST"): msg = f"Too many services in Node observation space for node. Truncating service {truncated_service.where}" _LOGGER.warning(msg) - # ensure application list has length equal to num_applications by truncating or padding self.applications: List[ApplicationObservation] = applications while len(self.applications) < num_applications: self.applications.append(ApplicationObservation(where=None)) while len(self.applications) > num_applications: truncated_application = self.applications.pop() - msg = f"Too many applications in Node observation space for node. Truncating application {truncated_application.where}" + msg = f"Too many applications in Node observation space for node. Truncating {truncated_application.where}" _LOGGER.warning(msg) - # ensure folder list has length equal to num_folders by truncating or padding self.folders: List[FolderObservation] = folders while len(self.folders) < num_folders: - self.folders.append(FolderObservation(where = None, files= [], num_files=num_files, include_num_access=include_num_access)) + self.folders.append( + FolderObservation(where=None, files=[], num_files=num_files, include_num_access=include_num_access) + ) while len(self.folders) > num_folders: truncated_folder = self.folders.pop() msg = f"Too many folders in Node observation space for node. Truncating folder {truncated_folder.where}" _LOGGER.warning(msg) - # ensure network_interface list has length equal to num_network_interfaces by truncating or padding self.network_interfaces: List[NICObservation] = network_interfaces while len(self.network_interfaces) < num_nics: - self.network_interfaces.append(NICObservation(where = None, include_nmne=include_nmne)) + self.network_interfaces.append(NICObservation(where=None, include_nmne=include_nmne)) while len(self.network_interfaces) > num_nics: truncated_nic = self.network_interfaces.pop() - msg = f"Too many network_interfaces in Node observation space for node. Truncating {truncated_folder.where}" + msg = f"Too many network_interfaces in Node observation space for node. Truncating {truncated_nic.where}" _LOGGER.warning(msg) self.default_observation: ObsType = { @@ -299,8 +541,15 @@ class HostObservation(AbstractObservation, identifier="HOST"): "num_file_deletions": 0, } - def observe(self, state: Dict) -> Any: + """ + Generate observation based on the current state of the simulation. + + :param state: Simulation state dictionary. + :type state: Dict + :return: Observation containing the status information about the host. + :rtype: Any + """ node_state = access_from_nested_dict(state, self.where) if node_state is NOT_PRESENT_IN_STATE: return self.default_observation @@ -319,6 +568,12 @@ class HostObservation(AbstractObservation, identifier="HOST"): @property def space(self) -> spaces.Space: + """ + Gymnasium space object describing the observation space shape. + + :return: Gymnasium space representing the observation space for host status. + :rtype: spaces.Space + """ shape = { "SERVICES": spaces.Dict({i + 1: service.space for i, service in enumerate(self.services)}), "APPLICATIONS": spaces.Dict({i + 1: app.space for i, app in enumerate(self.applications)}), @@ -327,83 +582,165 @@ class HostObservation(AbstractObservation, identifier="HOST"): "NICS": spaces.Dict( {i + 1: network_interface.space for i, network_interface in enumerate(self.network_interfaces)} ), - "num_file_creations" : spaces.Discrete(4), - "num_file_deletions" : spaces.Discrete(4), + "num_file_creations": spaces.Discrete(4), + "num_file_deletions": spaces.Discrete(4), } return spaces.Dict(shape) @classmethod - def from_config(cls, config: ConfigSchema, parent_where: WhereType = None ) -> HostObservation: + def from_config(cls, config: ConfigSchema, parent_where: WhereType = None) -> HostObservation: + """ + Create a host observation from a configuration schema. + + :param config: Configuration schema containing the necessary information for the host observation. + :type config: ConfigSchema + :param parent_where: Where in the simulation state dictionary to find the information about this host. + A typical location might be ['network', 'nodes', ]. + :type parent_where: WhereType, optional + :return: Constructed host observation instance. + :rtype: HostObservation + """ if parent_where is None: where = ["network", "nodes", config.hostname] else: where = parent_where + ["nodes", config.hostname] - #pass down shared/common config items + # Pass down shared/common config items for folder_config in config.folders: folder_config.include_num_access = config.include_num_access folder_config.num_files = config.num_files for nic_config in config.network_interfaces: nic_config.include_nmne = config.include_nmne - services = [ServiceObservation.from_config(config=c,parent_where=where) for c in config.services] + services = [ServiceObservation.from_config(config=c, parent_where=where) for c in config.services] applications = [ApplicationObservation.from_config(config=c, parent_where=where) for c in config.applications] folders = [FolderObservation.from_config(config=c, parent_where=where) for c in config.folders] nics = [NICObservation.from_config(config=c, parent_where=where) for c in config.network_interfaces] return cls( - where = where, - services = services, - applications = applications, - folders = folders, - network_interfaces = nics, - num_services = config.num_services, - num_applications = config.num_applications, - num_folders = config.num_folders, - num_files = config.num_files, - num_nics = config.num_nics, - include_nmne = config.include_nmne, - include_num_access = config.include_num_access, + where=where, + services=services, + applications=applications, + folders=folders, + network_interfaces=nics, + num_services=config.num_services, + num_applications=config.num_applications, + num_folders=config.num_folders, + num_files=config.num_files, + num_nics=config.num_nics, + include_nmne=config.include_nmne, + include_num_access=config.include_num_access, ) class PortObservation(AbstractObservation, identifier="PORT"): - class ConfigSchema(AbstractObservation.ConfigSchema): - port_id : int + """Port observation, provides status information about a network port within the simulation environment.""" - def __init__(self, where: WhereType)->None: + class ConfigSchema(AbstractObservation.ConfigSchema): + """Configuration schema for PortObservation.""" + + port_id: int + """Identifier of the port, used for querying simulation state dictionary.""" + + def __init__(self, where: WhereType) -> None: + """ + Initialize a port observation instance. + + :param where: Where in the simulation state dictionary to find the relevant information for this port. + A typical location for a port might be ['network', 'nodes', , 'NICs', ]. + :type where: WhereType + """ self.where = where - self.default_observation: ObsType = {"operating_status" : 0} + self.default_observation: ObsType = {"operating_status": 0} def observe(self, state: Dict) -> Any: + """ + Generate observation based on the current state of the simulation. + + :param state: Simulation state dictionary. + :type state: Dict + :return: Observation containing the operating status of the port. + :rtype: Any + """ port_state = access_from_nested_dict(state, self.where) if port_state is NOT_PRESENT_IN_STATE: return self.default_observation - return {"operating_status": 1 if port_state["enabled"] else 2 } + return {"operating_status": 1 if port_state["enabled"] else 2} @property def space(self) -> spaces.Space: + """ + Gymnasium space object describing the observation space shape. + + :return: Gymnasium space representing the observation space for port status. + :rtype: spaces.Space + """ return spaces.Dict({"operating_status": spaces.Discrete(3)}) @classmethod - def from_config(cls, config: ConfigSchema, parent_where: WhereType = [] ) -> PortObservation: - return cls(where = parent_where + ["NICs", config.port_id]) + def from_config(cls, config: ConfigSchema, parent_where: WhereType = []) -> PortObservation: + """ + Create a port observation from a configuration schema. + + :param config: Configuration schema containing the necessary information for the port observation. + :type config: ConfigSchema + :param parent_where: Where in the simulation state dictionary to find the information about this port's + parent node. A typical location for a node might be ['network', 'nodes', ]. + :type parent_where: WhereType, optional + :return: Constructed port observation instance. + :rtype: PortObservation + """ + return cls(where=parent_where + ["NICs", config.port_id]) + class ACLObservation(AbstractObservation, identifier="ACL"): - class ConfigSchema(AbstractObservation.ConfigSchema): - ip_list: Optional[List[IPv4Address]] = None - wildcard_list: Optional[List[str]] = None - port_list: Optional[List[int]] = None - protocol_list: Optional[List[str]] = None - num_rules: Optional[int] = None + """ACL observation, provides information about access control lists within the simulation environment.""" - def __init__(self, where: WhereType, num_rules: int, ip_list: List[IPv4Address], wildcard_list: List[str], port_list: List[int],protocol_list: List[str])->None: + class ConfigSchema(AbstractObservation.ConfigSchema): + """Configuration schema for ACLObservation.""" + + ip_list: Optional[List[IPv4Address]] = None + """List of IP addresses.""" + wildcard_list: Optional[List[str]] = None + """List of wildcard strings.""" + port_list: Optional[List[int]] = None + """List of port numbers.""" + protocol_list: Optional[List[str]] = None + """List of protocol names.""" + num_rules: Optional[int] = None + """Number of ACL rules.""" + + def __init__( + self, + where: WhereType, + num_rules: int, + ip_list: List[IPv4Address], + wildcard_list: List[str], + port_list: List[int], + protocol_list: List[str], + ) -> None: + """ + Initialize an ACL observation instance. + + :param where: Where in the simulation state dictionary to find the relevant information for this ACL. + :type where: WhereType + :param num_rules: Number of ACL rules. + :type num_rules: int + :param ip_list: List of IP addresses. + :type ip_list: List[IPv4Address] + :param wildcard_list: List of wildcard strings. + :type wildcard_list: List[str] + :param port_list: List of port numbers. + :type port_list: List[int] + :param protocol_list: List of protocol names. + :type protocol_list: List[str] + """ self.where = where self.num_rules: int = num_rules - self.ip_to_id: Dict[str, int] = {i+2:p for i,p in enumerate(ip_list)} - self.wildcard_to_id: Dict[str, int] = {i+2:p for i,p in enumerate(wildcard_list)} - self.port_to_id: Dict[int, int] = {i+2:p for i,p in enumerate(port_list)} - self.protocol_to_id: Dict[str, int] = {i+2:p for i,p in enumerate(protocol_list)} + self.ip_to_id: Dict[str, int] = {i + 2: p for i, p in enumerate(ip_list)} + self.wildcard_to_id: Dict[str, int] = {i + 2: p for i, p in enumerate(wildcard_list)} + self.port_to_id: Dict[int, int] = {i + 2: p for i, p in enumerate(port_list)} + self.protocol_to_id: Dict[str, int] = {i + 2: p for i, p in enumerate(protocol_list)} self.default_observation: Dict = { i + 1: { @@ -421,6 +758,14 @@ class ACLObservation(AbstractObservation, identifier="ACL"): } def observe(self, state: Dict) -> Any: + """ + Generate observation based on the current state of the simulation. + + :param state: Simulation state dictionary. + :type state: Dict + :return: Observation containing ACL rules. + :rtype: Any + """ acl_state: Dict = access_from_nested_dict(state, self.where) if acl_state is NOT_PRESENT_IN_STATE: return self.default_observation @@ -472,6 +817,12 @@ class ACLObservation(AbstractObservation, identifier="ACL"): @property def space(self) -> spaces.Space: + """ + Gymnasium space object describing the observation space shape. + + :return: Gymnasium space representing the observation space for ACL rules. + :rtype: spaces.Space + """ return spaces.Dict( { i @@ -481,10 +832,10 @@ class ACLObservation(AbstractObservation, identifier="ACL"): "permission": spaces.Discrete(3), # adding two to lengths is to account for reserved values 0 (unused) and 1 (any) "source_ip_id": spaces.Discrete(len(self.ip_to_id) + 2), - "source_wildcard_id": spaces.Discrete(len(self.wildcard_to_id)+2), + "source_wildcard_id": spaces.Discrete(len(self.wildcard_to_id) + 2), "source_port_id": spaces.Discrete(len(self.port_to_id) + 2), "dest_ip_id": spaces.Discrete(len(self.ip_to_id) + 2), - "dest_wildcard_id": spaces.Discrete(len(self.wildcard_to_id)+2), + "dest_wildcard_id": spaces.Discrete(len(self.wildcard_to_id) + 2), "dest_port_id": spaces.Discrete(len(self.port_to_id) + 2), "protocol_id": spaces.Discrete(len(self.protocol_to_id) + 2), } @@ -493,72 +844,134 @@ class ACLObservation(AbstractObservation, identifier="ACL"): } ) - @classmethod - def from_config(cls, config: ConfigSchema, parent_where: WhereType = [] ) -> ACLObservation: + def from_config(cls, config: ConfigSchema, parent_where: WhereType = []) -> ACLObservation: + """ + Create an ACL observation from a configuration schema. + + :param config: Configuration schema containing the necessary information for the ACL observation. + :type config: ConfigSchema + :param parent_where: Where in the simulation state dictionary to find the information about this ACL's + parent node. A typical location for a node might be ['network', 'nodes', ]. + :type parent_where: WhereType, optional + :return: Constructed ACL observation instance. + :rtype: ACLObservation + """ return cls( - where = parent_where+["acl", "acl"], - num_rules = config.num_rules, - ip_list = config.ip_list, - wildcard_list = config.wildcard_list, - port_list = config.port_list, - protocol_list = config.protocol_list - ) + where=parent_where + ["acl", "acl"], + num_rules=config.num_rules, + ip_list=config.ip_list, + wildcard_list=config.wildcard_list, + port_list=config.port_list, + protocol_list=config.protocol_list, + ) + class RouterObservation(AbstractObservation, identifier="ROUTER"): - class ConfigSchema(AbstractObservation.ConfigSchema): - hostname: str - ports: Optional[List[PortObservation.ConfigSchema]] = None - num_ports: Optional[int] = None - acl: Optional[ACLObservation.ConfigSchema] = None - ip_list: Optional[List[str]] = None - wildcard_list: Optional[List[str]] = None - port_list: Optional[List[int]] = None - protocol_list: Optional[List[str]] = None - num_rules: Optional[int] = None + """Router observation, provides status information about a router within the simulation environment.""" - def __init__(self, - where: WhereType, - ports:List[PortObservation], - num_ports: int, - acl: ACLObservation, - )->None: + class ConfigSchema(AbstractObservation.ConfigSchema): + """Configuration schema for RouterObservation.""" + + hostname: str + """Hostname of the router, used for querying simulation state dictionary.""" + ports: Optional[List[PortObservation.ConfigSchema]] = None + """Configuration of port observations for this router.""" + num_ports: Optional[int] = None + """Number of port observations configured for this router.""" + acl: Optional[ACLObservation.ConfigSchema] = None + """Configuration of ACL observation on this router.""" + ip_list: Optional[List[str]] = None + """List of IP addresses for encoding ACLs.""" + wildcard_list: Optional[List[str]] = None + """List of IP wildcards for encoding ACLs.""" + port_list: Optional[List[int]] = None + """List of ports for encoding ACLs.""" + protocol_list: Optional[List[str]] = None + """List of protocols for encoding ACLs.""" + num_rules: Optional[int] = None + """Number of rules ACL rules to show.""" + + def __init__( + self, + where: WhereType, + ports: List[PortObservation], + num_ports: int, + acl: ACLObservation, + ) -> None: + """ + Initialize a router observation instance. + + :param where: Where in the simulation state dictionary to find the relevant information for this router. + A typical location for a router might be ['network', 'nodes', ]. + :type where: WhereType + :param ports: List of port observations representing the ports of the router. + :type ports: List[PortObservation] + :param num_ports: Number of ports for the router. + :type num_ports: int + :param acl: ACL observation representing the access control list of the router. + :type acl: ACLObservation + """ self.where: WhereType = where self.ports: List[PortObservation] = ports self.acl: ACLObservation = acl - self.num_ports:int = num_ports + self.num_ports: int = num_ports while len(self.ports) < num_ports: self.ports.append(PortObservation(where=None)) while len(self.ports) > num_ports: self.ports.pop() - msg = f"Too many ports in router observation. Truncating." + msg = "Too many ports in router observation. Truncating." _LOGGER.warning(msg) self.default_observation = { - "PORTS": {i+1:p.default_observation for i,p in enumerate(self.ports)}, - "ACL": self.acl.default_observation - } + "PORTS": {i + 1: p.default_observation for i, p in enumerate(self.ports)}, + "ACL": self.acl.default_observation, + } def observe(self, state: Dict) -> Any: + """ + Generate observation based on the current state of the simulation. + + :param state: Simulation state dictionary. + :type state: Dict + :return: Observation containing the status of ports and ACL configuration of the router. + :rtype: Any + """ router_state = access_from_nested_dict(state, self.where) if router_state is NOT_PRESENT_IN_STATE: return self.default_observation obs = {} - obs["PORTS"] = {i+1:p.observe(state) for i,p in enumerate(self.ports)} + obs["PORTS"] = {i + 1: p.observe(state) for i, p in enumerate(self.ports)} obs["ACL"] = self.acl.observe(state) return obs @property def space(self) -> spaces.Space: - return spaces.Dict({ - "PORTS": spaces.Dict({i+1:p.space for i,p in enumerate(self.ports)}), - "ACL": self.acl.space - }) + """ + Gymnasium space object describing the observation space shape. + + :return: Gymnasium space representing the observation space for router status. + :rtype: spaces.Space + """ + return spaces.Dict( + {"PORTS": spaces.Dict({i + 1: p.space for i, p in enumerate(self.ports)}), "ACL": self.acl.space} + ) @classmethod - def from_config(cls, config: ConfigSchema, parent_where: WhereType = [] ) -> RouterObservation: + def from_config(cls, config: ConfigSchema, parent_where: WhereType = []) -> RouterObservation: + """ + Create a router observation from a configuration schema. + + :param config: Configuration schema containing the necessary information for the router observation. + :type config: ConfigSchema + :param parent_where: Where in the simulation state dictionary to find the information about this router's + parent node. A typical location for a node might be ['network', 'nodes', ]. + :type parent_where: WhereType, optional + :return: Constructed router observation instance. + :rtype: RouterObservation + """ where = parent_where + ["nodes", config.hostname] if config.acl is None: @@ -575,156 +988,330 @@ class RouterObservation(AbstractObservation, identifier="ROUTER"): config.acl.protocol_list = config.protocol_list if config.ports is None: - config.ports = [PortObservation.ConfigSchema(port_id=i+1) for i in range(config.num_ports)] + config.ports = [PortObservation.ConfigSchema(port_id=i + 1) for i in range(config.num_ports)] ports = [PortObservation.from_config(config=c, parent_where=where) for c in config.ports] acl = ACLObservation.from_config(config=config.acl, parent_where=where) return cls(where=where, ports=ports, num_ports=config.num_ports, acl=acl) + class FirewallObservation(AbstractObservation, identifier="FIREWALL"): + """Firewall observation, provides status information about a firewall within the simulation environment.""" + class ConfigSchema(AbstractObservation.ConfigSchema): + """Configuration schema for FirewallObservation.""" + hostname: str + """Hostname of the firewall node, used for querying simulation state dictionary.""" ip_list: Optional[List[str]] = None + """List of IP addresses for encoding ACLs.""" wildcard_list: Optional[List[str]] = None + """List of IP wildcards for encoding ACLs.""" port_list: Optional[List[int]] = None + """List of ports for encoding ACLs.""" protocol_list: Optional[List[str]] = None + """List of protocols for encoding ACLs.""" num_rules: Optional[int] = None + """Number of rules ACL rules to show.""" + def __init__( + self, + where: WhereType, + ip_list: List[str], + wildcard_list: List[str], + port_list: List[int], + protocol_list: List[str], + num_rules: int, + ) -> None: + """ + Initialize a firewall observation instance. - def __init__(self, - where: WhereType, - ip_list: List[str], - wildcard_list: List[str], - port_list: List[int], - protocol_list: List[str], - num_rules: int, - )->None: + :param where: Where in the simulation state dictionary to find the relevant information for this firewall. + A typical location for a firewall might be ['network', 'nodes', ]. + :type where: WhereType + :param ip_list: List of IP addresses. + :type ip_list: List[str] + :param wildcard_list: List of wildcard rules. + :type wildcard_list: List[str] + :param port_list: List of port numbers. + :type port_list: List[int] + :param protocol_list: List of protocol types. + :type protocol_list: List[str] + :param num_rules: Number of rules configured in the firewall. + :type num_rules: int + """ self.where: WhereType = where - self.ports: List[PortObservation] = [PortObservation(where=self.where+["port", port_num]) for port_num in (1,2,3) ] - #TODO: check what the port nums are for firewall. - - self.internal_inbound_acl = ACLObservation(where = self.where+["acl","internal","inbound"], num_rules= num_rules, ip_list=ip_list, wildcard_list=wildcard_list, port_list=port_list, protocol_list=protocol_list) - self.internal_outbound_acl = ACLObservation(where = self.where+["acl","internal","outbound"], num_rules= num_rules, ip_list=ip_list, wildcard_list=wildcard_list, port_list=port_list, protocol_list=protocol_list) - self.dmz_inbound_acl = ACLObservation(where = self.where+["acl","dmz","inbound"], num_rules= num_rules, ip_list=ip_list, wildcard_list=wildcard_list, port_list=port_list, protocol_list=protocol_list) - self.dmz_outbound_acl = ACLObservation(where = self.where+["acl","dmz","outbound"], num_rules= num_rules, ip_list=ip_list, wildcard_list=wildcard_list, port_list=port_list, protocol_list=protocol_list) - self.external_inbound_acl = ACLObservation(where = self.where+["acl","external","inbound"], num_rules= num_rules, ip_list=ip_list, wildcard_list=wildcard_list, port_list=port_list, protocol_list=protocol_list) - self.external_outbound_acl = ACLObservation(where = self.where+["acl","external","outbound"], num_rules= num_rules, ip_list=ip_list, wildcard_list=wildcard_list, port_list=port_list, protocol_list=protocol_list) + self.ports: List[PortObservation] = [ + PortObservation(where=self.where + ["port", port_num]) for port_num in (1, 2, 3) + ] + # TODO: check what the port nums are for firewall. + self.internal_inbound_acl = ACLObservation( + where=self.where + ["acl", "internal", "inbound"], + num_rules=num_rules, + ip_list=ip_list, + wildcard_list=wildcard_list, + port_list=port_list, + protocol_list=protocol_list, + ) + self.internal_outbound_acl = ACLObservation( + where=self.where + ["acl", "internal", "outbound"], + num_rules=num_rules, + ip_list=ip_list, + wildcard_list=wildcard_list, + port_list=port_list, + protocol_list=protocol_list, + ) + self.dmz_inbound_acl = ACLObservation( + where=self.where + ["acl", "dmz", "inbound"], + num_rules=num_rules, + ip_list=ip_list, + wildcard_list=wildcard_list, + port_list=port_list, + protocol_list=protocol_list, + ) + self.dmz_outbound_acl = ACLObservation( + where=self.where + ["acl", "dmz", "outbound"], + num_rules=num_rules, + ip_list=ip_list, + wildcard_list=wildcard_list, + port_list=port_list, + protocol_list=protocol_list, + ) + self.external_inbound_acl = ACLObservation( + where=self.where + ["acl", "external", "inbound"], + num_rules=num_rules, + ip_list=ip_list, + wildcard_list=wildcard_list, + port_list=port_list, + protocol_list=protocol_list, + ) + self.external_outbound_acl = ACLObservation( + where=self.where + ["acl", "external", "outbound"], + num_rules=num_rules, + ip_list=ip_list, + wildcard_list=wildcard_list, + port_list=port_list, + protocol_list=protocol_list, + ) self.default_observation = { - "PORTS": {i+1:p.default_observation for i,p in enumerate(self.ports)}, + "PORTS": {i + 1: p.default_observation for i, p in enumerate(self.ports)}, "INTERNAL": { "INBOUND": self.internal_inbound_acl.default_observation, "OUTBOUND": self.internal_outbound_acl.default_observation, - }, + }, "DMZ": { "INBOUND": self.dmz_inbound_acl.default_observation, "OUTBOUND": self.dmz_outbound_acl.default_observation, - }, + }, "EXTERNAL": { "INBOUND": self.external_inbound_acl.default_observation, "OUTBOUND": self.external_outbound_acl.default_observation, - }, - } + }, + } def observe(self, state: Dict) -> Any: + """ + Generate observation based on the current state of the simulation. + + :param state: Simulation state dictionary. + :type state: Dict + :return: Observation containing the status of ports and ACLs for internal, DMZ, and external traffic. + :rtype: Any + """ obs = { - "PORTS": {i+1:p.observe(state) for i,p in enumerate(self.ports)}, + "PORTS": {i + 1: p.observe(state) for i, p in enumerate(self.ports)}, "INTERNAL": { "INBOUND": self.internal_inbound_acl.observe(state), "OUTBOUND": self.internal_outbound_acl.observe(state), - }, + }, "DMZ": { "INBOUND": self.dmz_inbound_acl.observe(state), "OUTBOUND": self.dmz_outbound_acl.observe(state), - }, + }, "EXTERNAL": { "INBOUND": self.external_inbound_acl.observe(state), "OUTBOUND": self.external_outbound_acl.observe(state), - }, - } + }, + } return obs @property def space(self) -> spaces.Space: - space =spaces.Dict({ - "PORTS": spaces.Dict({i+1:p.space for i,p in enumerate(self.ports)}), - "INTERNAL": spaces.Dict({ - "INBOUND": self.internal_inbound_acl.space, - "OUTBOUND": self.internal_outbound_acl.space, - }), - "DMZ": spaces.Dict({ - "INBOUND": self.dmz_inbound_acl.space, - "OUTBOUND": self.dmz_outbound_acl.space, - }), - "EXTERNAL": spaces.Dict({ - "INBOUND": self.external_inbound_acl.space, - "OUTBOUND": self.external_outbound_acl.space, - }), - }) + """ + Gymnasium space object describing the observation space shape. + + :return: Gymnasium space representing the observation space for firewall status. + :rtype: spaces.Space + """ + space = spaces.Dict( + { + "PORTS": spaces.Dict({i + 1: p.space for i, p in enumerate(self.ports)}), + "INTERNAL": spaces.Dict( + { + "INBOUND": self.internal_inbound_acl.space, + "OUTBOUND": self.internal_outbound_acl.space, + } + ), + "DMZ": spaces.Dict( + { + "INBOUND": self.dmz_inbound_acl.space, + "OUTBOUND": self.dmz_outbound_acl.space, + } + ), + "EXTERNAL": spaces.Dict( + { + "INBOUND": self.external_inbound_acl.space, + "OUTBOUND": self.external_outbound_acl.space, + } + ), + } + ) return space @classmethod - def from_config(cls, config: ConfigSchema, parent_where: WhereType = [] ) -> FirewallObservation: - where = parent_where+["nodes", config.hostname] - return cls(where=where, ip_list=config.ip_list, wildcard_list=config.wildcard_list, port_list=config.port_list, protocol_list=config.protocol_list, num_rules=config.num_rules) + def from_config(cls, config: ConfigSchema, parent_where: WhereType = []) -> FirewallObservation: + """ + Create a firewall observation from a configuration schema. + + :param config: Configuration schema containing the necessary information for the firewall observation. + :type config: ConfigSchema + :param parent_where: Where in the simulation state dictionary to find the information about this firewall's + parent node. A typical location for a node might be ['network', 'nodes', ]. + :type parent_where: WhereType, optional + :return: Constructed firewall observation instance. + :rtype: FirewallObservation + """ + where = parent_where + ["nodes", config.hostname] + return cls( + where=where, + ip_list=config.ip_list, + wildcard_list=config.wildcard_list, + port_list=config.port_list, + protocol_list=config.protocol_list, + num_rules=config.num_rules, + ) + class NodesObservation(AbstractObservation, identifier="NODES"): + """Nodes observation, provides status information about nodes within the simulation environment.""" + class ConfigSchema(AbstractObservation.ConfigSchema): - """Config""" + """Configuration schema for NodesObservation.""" + hosts: List[HostObservation.ConfigSchema] = [] + """List of configurations for host observations.""" routers: List[RouterObservation.ConfigSchema] = [] + """List of configurations for router observations.""" firewalls: List[FirewallObservation.ConfigSchema] = [] - + """List of configurations for firewall observations.""" num_services: int + """Number of services.""" num_applications: int + """Number of applications.""" num_folders: int + """Number of folders.""" num_files: int + """Number of files.""" num_nics: int + """Number of network interface cards (NICs).""" include_nmne: bool + """Flag to include nmne.""" include_num_access: bool - + """Flag to include the number of accesses.""" num_ports: int + """Number of ports.""" ip_list: List[str] + """List of IP addresses for encoding ACLs.""" wildcard_list: List[str] + """List of IP wildcards for encoding ACLs.""" port_list: List[int] + """List of ports for encoding ACLs.""" protocol_list: List[str] + """List of protocols for encoding ACLs.""" num_rules: int + """Number of rules ACL rules to show.""" + def __init__( + self, + where: WhereType, + hosts: List[HostObservation], + routers: List[RouterObservation], + firewalls: List[FirewallObservation], + ) -> None: + """ + Initialize a nodes observation instance. - def __init__(self, where: WhereType, hosts:List[HostObservation], routers:List[RouterObservation], firewalls:List[FirewallObservation])->None: - self.where :WhereType = where + :param where: Where in the simulation state dictionary to find the relevant information for nodes. + A typical location for nodes might be ['network', 'nodes']. + :type where: WhereType + :param hosts: List of host observations. + :type hosts: List[HostObservation] + :param routers: List of router observations. + :type routers: List[RouterObservation] + :param firewalls: List of firewall observations. + :type firewalls: List[FirewallObservation] + """ + self.where: WhereType = where self.hosts: List[HostObservation] = hosts self.routers: List[RouterObservation] = routers self.firewalls: List[FirewallObservation] = firewalls self.default_observation = { - **{f"HOST{i}":host.default_observation for i,host in enumerate(self.hosts)}, - **{f"ROUTER{i}":router.default_observation for i,router in enumerate(self.routers)}, - **{f"FIREWALL{i}":firewall.default_observation for i,firewall in enumerate(self.firewalls)}, + **{f"HOST{i}": host.default_observation for i, host in enumerate(self.hosts)}, + **{f"ROUTER{i}": router.default_observation for i, router in enumerate(self.routers)}, + **{f"FIREWALL{i}": firewall.default_observation for i, firewall in enumerate(self.firewalls)}, } def observe(self, state: Dict) -> Any: + """ + Generate observation based on the current state of the simulation. + + :param state: Simulation state dictionary. + :type state: Dict + :return: Observation containing status information about nodes. + :rtype: Any + """ obs = { - **{f"HOST{i}":host.observe(state) for i,host in enumerate(self.hosts)}, - **{f"ROUTER{i}":router.observe(state) for i,router in enumerate(self.routers)}, - **{f"FIREWALL{i}":firewall.observe(state) for i,firewall in enumerate(self.firewalls)}, + **{f"HOST{i}": host.observe(state) for i, host in enumerate(self.hosts)}, + **{f"ROUTER{i}": router.observe(state) for i, router in enumerate(self.routers)}, + **{f"FIREWALL{i}": firewall.observe(state) for i, firewall in enumerate(self.firewalls)}, } return obs @property def space(self) -> spaces.Space: - space = spaces.Dict({ - **{f"HOST{i}":host.space for i,host in enumerate(self.hosts)}, - **{f"ROUTER{i}":router.space for i,router in enumerate(self.routers)}, - **{f"FIREWALL{i}":firewall.space for i,firewall in enumerate(self.firewalls)}, - }) + """ + Gymnasium space object describing the observation space shape. + + :return: Gymnasium space representing the observation space for nodes. + :rtype: spaces.Space + """ + space = spaces.Dict( + { + **{f"HOST{i}": host.space for i, host in enumerate(self.hosts)}, + **{f"ROUTER{i}": router.space for i, router in enumerate(self.routers)}, + **{f"FIREWALL{i}": firewall.space for i, firewall in enumerate(self.firewalls)}, + } + ) return space @classmethod - def from_config(cls, config: ConfigSchema, parent_where: WhereType = [] ) -> ServiceObservation: + def from_config(cls, config: ConfigSchema, parent_where: WhereType = []) -> ServiceObservation: + """ + Create a nodes observation from a configuration schema. + + :param config: Configuration schema containing the necessary information for nodes observation. + :type config: ConfigSchema + :param parent_where: Where in the simulation state dictionary to find the information about nodes. + A typical location for nodes might be ['network', 'nodes']. + :type parent_where: WhereType, optional + :return: Constructed nodes observation instance. + :rtype: NodesObservation + """ if parent_where is None: where = ["network", "nodes"] else: From 22e1dfea2f4d92a812378e794c3cadd9c926cb50 Mon Sep 17 00:00:00 2001 From: Marek Wolan Date: Fri, 29 Mar 2024 14:14:03 +0000 Subject: [PATCH 068/124] #2417 Move classes to correct files --- .../agent/observations/acl_observation.py | 187 +++ .../agent/observations/agent_observations.py | 138 -- .../observations/file_system_observations.py | 207 +-- .../observations/firewall_observation.py | 213 +++ .../agent/observations/host_observations.py | 229 ++++ .../agent/observations/nic_observations.py | 273 ++-- .../agent/observations/node_observations.py | 1197 +---------------- .../game/agent/observations/observations.py | 467 +++---- .../agent/observations/router_observation.py | 142 ++ .../observations/software_observation.py | 192 ++- 10 files changed, 1332 insertions(+), 1913 deletions(-) create mode 100644 src/primaite/game/agent/observations/acl_observation.py delete mode 100644 src/primaite/game/agent/observations/agent_observations.py create mode 100644 src/primaite/game/agent/observations/firewall_observation.py create mode 100644 src/primaite/game/agent/observations/host_observations.py create mode 100644 src/primaite/game/agent/observations/router_observation.py diff --git a/src/primaite/game/agent/observations/acl_observation.py b/src/primaite/game/agent/observations/acl_observation.py new file mode 100644 index 00000000..2d29223d --- /dev/null +++ b/src/primaite/game/agent/observations/acl_observation.py @@ -0,0 +1,187 @@ +from __future__ import annotations + +from ipaddress import IPv4Address +from typing import Dict, List, Optional + +from gymnasium import spaces +from gymnasium.core import ObsType + +from primaite import getLogger +from primaite.game.agent.observations.observations import AbstractObservation, WhereType +from primaite.game.agent.utils import access_from_nested_dict, NOT_PRESENT_IN_STATE + +_LOGGER = getLogger(__name__) + + +class ACLObservation(AbstractObservation, identifier="ACL"): + """ACL observation, provides information about access control lists within the simulation environment.""" + + class ConfigSchema(AbstractObservation.ConfigSchema): + """Configuration schema for ACLObservation.""" + + ip_list: Optional[List[IPv4Address]] = None + """List of IP addresses.""" + wildcard_list: Optional[List[str]] = None + """List of wildcard strings.""" + port_list: Optional[List[int]] = None + """List of port numbers.""" + protocol_list: Optional[List[str]] = None + """List of protocol names.""" + num_rules: Optional[int] = None + """Number of ACL rules.""" + + def __init__( + self, + where: WhereType, + num_rules: int, + ip_list: List[IPv4Address], + wildcard_list: List[str], + port_list: List[int], + protocol_list: List[str], + ) -> None: + """ + Initialize an ACL observation instance. + + :param where: Where in the simulation state dictionary to find the relevant information for this ACL. + :type where: WhereType + :param num_rules: Number of ACL rules. + :type num_rules: int + :param ip_list: List of IP addresses. + :type ip_list: List[IPv4Address] + :param wildcard_list: List of wildcard strings. + :type wildcard_list: List[str] + :param port_list: List of port numbers. + :type port_list: List[int] + :param protocol_list: List of protocol names. + :type protocol_list: List[str] + """ + self.where = where + self.num_rules: int = num_rules + self.ip_to_id: Dict[str, int] = {i + 2: p for i, p in enumerate(ip_list)} + self.wildcard_to_id: Dict[str, int] = {i + 2: p for i, p in enumerate(wildcard_list)} + self.port_to_id: Dict[int, int] = {i + 2: p for i, p in enumerate(port_list)} + self.protocol_to_id: Dict[str, int] = {i + 2: p for i, p in enumerate(protocol_list)} + self.default_observation: Dict = { + i + + 1: { + "position": i, + "permission": 0, + "source_ip_id": 0, + "source_wildcard_id": 0, + "source_port_id": 0, + "dest_ip_id": 0, + "dest_wildcard_id": 0, + "dest_port_id": 0, + "protocol_id": 0, + } + for i in range(self.num_rules) + } + + def observe(self, state: Dict) -> ObsType: + """ + Generate observation based on the current state of the simulation. + + :param state: Simulation state dictionary. + :type state: Dict + :return: Observation containing ACL rules. + :rtype: ObsType + """ + acl_state: Dict = access_from_nested_dict(state, self.where) + if acl_state is NOT_PRESENT_IN_STATE: + return self.default_observation + obs = {} + acl_items = dict(acl_state.items()) + i = 1 # don't show rule 0 for compatibility reasons. + while i < self.num_rules + 1: + rule_state = acl_items[i] + if rule_state is None: + obs[i] = { + "position": i - 1, + "permission": 0, + "source_ip_id": 0, + "source_wildcard_id": 0, + "source_port_id": 0, + "dest_ip_id": 0, + "dest_wildcard_id": 0, + "dest_port_id": 0, + "protocol_id": 0, + } + else: + src_ip = rule_state["src_ip_address"] + src_node_id = self.ip_to_id.get(src_ip, 1) + dst_ip = rule_state["dst_ip_address"] + dst_node_ip = self.ip_to_id.get(dst_ip, 1) + src_wildcard = rule_state["source_wildcard_id"] + src_wildcard_id = self.wildcard_to_id.get(src_wildcard, 1) + dst_wildcard = rule_state["dest_wildcard_id"] + dst_wildcard_id = self.wildcard_to_id.get(dst_wildcard, 1) + src_port = rule_state["source_port_id"] + src_port_id = self.port_to_id.get(src_port, 1) + dst_port = rule_state["dest_port_id"] + dst_port_id = self.port_to_id.get(dst_port, 1) + protocol = rule_state["protocol"] + protocol_id = self.protocol_to_id.get(protocol, 1) + obs[i] = { + "position": i - 1, + "permission": rule_state["action"], + "source_ip_id": src_node_id, + "source_wildcard_id": src_wildcard_id, + "source_port_id": src_port_id, + "dest_ip_id": dst_node_ip, + "dest_wildcard_id": dst_wildcard_id, + "dest_port_id": dst_port_id, + "protocol_id": protocol_id, + } + i += 1 + return obs + + @property + def space(self) -> spaces.Space: + """ + Gymnasium space object describing the observation space shape. + + :return: Gymnasium space representing the observation space for ACL rules. + :rtype: spaces.Space + """ + return spaces.Dict( + { + i + + 1: spaces.Dict( + { + "position": spaces.Discrete(self.num_rules), + "permission": spaces.Discrete(3), + # adding two to lengths is to account for reserved values 0 (unused) and 1 (any) + "source_ip_id": spaces.Discrete(len(self.ip_to_id) + 2), + "source_wildcard_id": spaces.Discrete(len(self.wildcard_to_id) + 2), + "source_port_id": spaces.Discrete(len(self.port_to_id) + 2), + "dest_ip_id": spaces.Discrete(len(self.ip_to_id) + 2), + "dest_wildcard_id": spaces.Discrete(len(self.wildcard_to_id) + 2), + "dest_port_id": spaces.Discrete(len(self.port_to_id) + 2), + "protocol_id": spaces.Discrete(len(self.protocol_to_id) + 2), + } + ) + for i in range(self.num_rules) + } + ) + + @classmethod + def from_config(cls, config: ConfigSchema, parent_where: WhereType = []) -> ACLObservation: + """ + Create an ACL observation from a configuration schema. + + :param config: Configuration schema containing the necessary information for the ACL observation. + :type config: ConfigSchema + :param parent_where: Where in the simulation state dictionary to find the information about this ACL's + parent node. A typical location for a node might be ['network', 'nodes', ]. + :type parent_where: WhereType, optional + :return: Constructed ACL observation instance. + :rtype: ACLObservation + """ + return cls( + where=parent_where + ["acl", "acl"], + num_rules=config.num_rules, + ip_list=config.ip_list, + wildcard_list=config.wildcard_list, + port_list=config.port_list, + protocol_list=config.protocol_list, + ) diff --git a/src/primaite/game/agent/observations/agent_observations.py b/src/primaite/game/agent/observations/agent_observations.py deleted file mode 100644 index 10370660..00000000 --- a/src/primaite/game/agent/observations/agent_observations.py +++ /dev/null @@ -1,138 +0,0 @@ -from typing import Dict, List, Optional, Tuple, TYPE_CHECKING - -from gymnasium import spaces - -from primaite.game.agent.observations.node_observations import NodeObservation -from primaite.game.agent.observations.observations import ( - AbstractObservation, - AclObservation, - ICSObservation, - LinkObservation, - NullObservation, -) - -if TYPE_CHECKING: - from primaite.game.game import PrimaiteGame - - -class UC2BlueObservation(AbstractObservation): - """Container for all observations used by the blue agent in UC2. - - TODO: there's no real need for a UC2 blue container class, we should be able to simply use the observation handler - for the purpose of compiling several observation components. - """ - - def __init__( - self, - nodes: List[NodeObservation], - links: List[LinkObservation], - acl: AclObservation, - ics: ICSObservation, - where: Optional[List[str]] = None, - ) -> None: - """Initialise UC2 blue observation. - - :param nodes: List of node observations - :type nodes: List[NodeObservation] - :param links: List of link observations - :type links: List[LinkObservation] - :param acl: The Access Control List observation - :type acl: AclObservation - :param ics: The ICS observation - :type ics: ICSObservation - :param where: Where in the simulation state dict to find information. Not used in this particular observation - because it only compiles other observations and doesn't contribute any new information, defaults to None - :type where: Optional[List[str]], optional - """ - super().__init__() - self.where: Optional[Tuple[str]] = where - - self.nodes: List[NodeObservation] = nodes - self.links: List[LinkObservation] = links - self.acl: AclObservation = acl - self.ics: ICSObservation = ics - - self.default_observation: Dict = { - "NODES": {i + 1: n.default_observation for i, n in enumerate(self.nodes)}, - "LINKS": {i + 1: l.default_observation for i, l in enumerate(self.links)}, - "ACL": self.acl.default_observation, - "ICS": self.ics.default_observation, - } - - def observe(self, state: Dict) -> Dict: - """Generate observation based on the current state of the simulation. - - :param state: Simulation state dictionary - :type state: Dict - :return: Observation - :rtype: Dict - """ - if self.where is None: - return self.default_observation - - obs = {} - obs["NODES"] = {i + 1: node.observe(state) for i, node in enumerate(self.nodes)} - obs["LINKS"] = {i + 1: link.observe(state) for i, link in enumerate(self.links)} - obs["ACL"] = self.acl.observe(state) - obs["ICS"] = self.ics.observe(state) - - return obs - - @property - def space(self) -> spaces.Space: - """ - Gymnasium space object describing the observation space shape. - - :return: Space - :rtype: spaces.Space - """ - return spaces.Dict( - { - "NODES": spaces.Dict({i + 1: node.space for i, node in enumerate(self.nodes)}), - "LINKS": spaces.Dict({i + 1: link.space for i, link in enumerate(self.links)}), - "ACL": self.acl.space, - "ICS": self.ics.space, - } - ) - - @classmethod - def from_config(cls, config: Dict, game: "PrimaiteGame") -> "UC2BlueObservation": - """Create UC2 blue observation from a config. - - :param config: Dictionary containing the configuration for this UC2 blue observation. This includes the nodes, - links, ACL and ICS observations. - :type config: Dict - :param game: Reference to the PrimaiteGame object that spawned this observation. - :type game: PrimaiteGame - :return: Constructed UC2 blue observation - :rtype: UC2BlueObservation - """ - node_configs = config["nodes"] - - num_services_per_node = config["num_services_per_node"] - num_folders_per_node = config["num_folders_per_node"] - num_files_per_folder = config["num_files_per_folder"] - num_nics_per_node = config["num_nics_per_node"] - nodes = [ - NodeObservation.from_config( - config=n, - game=game, - num_services_per_node=num_services_per_node, - num_folders_per_node=num_folders_per_node, - num_files_per_folder=num_files_per_folder, - num_nics_per_node=num_nics_per_node, - ) - for n in node_configs - ] - - link_configs = config["links"] - links = [LinkObservation.from_config(config=link, game=game) for link in link_configs] - - acl_config = config["acl"] - acl = AclObservation.from_config(config=acl_config, game=game) - - ics_config = config["ics"] - ics = ICSObservation.from_config(config=ics_config, game=game) - new = cls(nodes=nodes, links=links, acl=acl, ics=ics, where=["network"]) - return new - diff --git a/src/primaite/game/agent/observations/file_system_observations.py b/src/primaite/game/agent/observations/file_system_observations.py index 277bc51f..a30bfc82 100644 --- a/src/primaite/game/agent/observations/file_system_observations.py +++ b/src/primaite/game/agent/observations/file_system_observations.py @@ -1,107 +1,130 @@ -from typing import Dict, List, Optional, Tuple, TYPE_CHECKING +from __future__ import annotations + +from typing import Dict, Iterable, List, Optional from gymnasium import spaces +from gymnasium.core import ObsType from primaite import getLogger -from primaite.game.agent.observations.observations import AbstractObservation +from primaite.game.agent.observations.observations import AbstractObservation, WhereType from primaite.game.agent.utils import access_from_nested_dict, NOT_PRESENT_IN_STATE _LOGGER = getLogger(__name__) -if TYPE_CHECKING: - from primaite.game.game import PrimaiteGame +class FileObservation(AbstractObservation, identifier="FILE"): + """File observation, provides status information about a file within the simulation environment.""" -class FileObservation(AbstractObservation): - """Observation of a file on a node in the network.""" + class ConfigSchema(AbstractObservation.ConfigSchema): + """Configuration schema for FileObservation.""" - def __init__(self, where: Optional[Tuple[str]] = None) -> None: + file_name: str + """Name of the file, used for querying simulation state dictionary.""" + include_num_access: Optional[bool] = None + """Whether to include the number of accesses to the file in the observation.""" + + def __init__(self, where: WhereType, include_num_access: bool) -> None: """ - Initialise file observation. + Initialize a file observation instance. - :param where: Store information about where in the simulation state dictionary to find the relevant information. - Optional. If None, this corresponds that the file does not exist and the observation will be populated with - zeroes. - - A typical location for a file looks like this: - ['network','nodes',,'file_system', 'folders',,'files',] - :type where: Optional[List[str]] + :param where: Where in the simulation state dictionary to find the relevant information for this file. + A typical location for a file might be + ['network', 'nodes', , 'file_system', 'folder', , 'files', ]. + :type where: WhereType + :param include_num_access: Whether to include the number of accesses to the file in the observation. + :type include_num_access: bool """ - super().__init__() - self.where: Optional[Tuple[str]] = where - self.default_observation: spaces.Space = {"health_status": 0} - "Default observation is what should be returned when the file doesn't exist, e.g. after it has been deleted." + self.where: WhereType = where + self.include_num_access: bool = include_num_access - def observe(self, state: Dict) -> Dict: - """Generate observation based on the current state of the simulation. + self.default_observation: ObsType = {"health_status": 0} + if self.include_num_access: + self.default_observation["num_access"] = 0 - :param state: Simulation state dictionary + def observe(self, state: Dict) -> ObsType: + """ + Generate observation based on the current state of the simulation. + + :param state: Simulation state dictionary. :type state: Dict - :return: Observation - :rtype: Dict + :return: Observation containing the health status of the file and optionally the number of accesses. + :rtype: ObsType """ - if self.where is None: - return self.default_observation file_state = access_from_nested_dict(state, self.where) if file_state is NOT_PRESENT_IN_STATE: return self.default_observation - return {"health_status": file_state["visible_status"]} + obs = {"health_status": file_state["visible_status"]} + if self.include_num_access: + obs["num_access"] = file_state["num_access"] + # raise NotImplementedError("TODO: need to fix num_access to use thresholds instead of raw value.") + return obs @property def space(self) -> spaces.Space: - """Gymnasium space object describing the observation space shape. + """ + Gymnasium space object describing the observation space shape. - :return: Gymnasium space + :return: Gymnasium space representing the observation space for file status. :rtype: spaces.Space """ - return spaces.Dict({"health_status": spaces.Discrete(6)}) + space = {"health_status": spaces.Discrete(6)} + if self.include_num_access: + space["num_access"] = spaces.Discrete(4) + return spaces.Dict(space) @classmethod - def from_config(cls, config: Dict, game: "PrimaiteGame", parent_where: List[str] = None) -> "FileObservation": - """Create file observation from a config. - - :param config: Dictionary containing the configuration for this file observation. - :type config: Dict - :param game: _description_ - :type game: PrimaiteGame - :param parent_where: _description_, defaults to None - :type parent_where: _type_, optional - :return: _description_ - :rtype: _type_ + def from_config(cls, config: ConfigSchema, parent_where: WhereType = []) -> FileObservation: """ - return cls(where=parent_where + ["files", config["file_name"]]) + Create a file observation from a configuration schema. + + :param config: Configuration schema containing the necessary information for the file observation. + :type config: ConfigSchema + :param parent_where: Where in the simulation state dictionary to find the information about this file's + parent node. A typical location for a node might be ['network', 'nodes', ]. + :type parent_where: WhereType, optional + :return: Constructed file observation instance. + :rtype: FileObservation + """ + return cls(where=parent_where + ["files", config.file_name], include_num_access=config.include_num_access) -class FolderObservation(AbstractObservation): - """Folder observation, including files inside of the folder.""" +class FolderObservation(AbstractObservation, identifier="FOLDER"): + """Folder observation, provides status information about a folder within the simulation environment.""" + + class ConfigSchema(AbstractObservation.ConfigSchema): + """Configuration schema for FolderObservation.""" + + folder_name: str + """Name of the folder, used for querying simulation state dictionary.""" + files: List[FileObservation.ConfigSchema] = [] + """List of file configurations within the folder.""" + num_files: Optional[int] = None + """Number of spaces for file observations in this folder.""" + include_num_access: Optional[bool] = None + """Whether files in this folder should include the number of accesses in their observation.""" def __init__( - self, where: Optional[Tuple[str]] = None, files: List[FileObservation] = [], num_files_per_folder: int = 2 + self, where: WhereType, files: Iterable[FileObservation], num_files: int, include_num_access: bool ) -> None: - """Initialise folder Observation, including files inside the folder. + """ + Initialize a folder observation instance. :param where: Where in the simulation state dictionary to find the relevant information for this folder. - A typical location for a file looks like this: - ['network','nodes',,'file_system', 'folders',] - :type where: Optional[List[str]] - :param max_files: As size of the space must remain static, define max files that can be in this folder - , defaults to 5 - :type max_files: int, optional - :param file_positions: Defines the positioning within the observation space of particular files. This ensures - that even if new files are created, the existing files will always occupy the same space in the observation - space. The keys must be between 1 and max_files. Providing file_positions will reserve a spot in the - observation space for a file with that name, even if it's temporarily deleted, if it reappears with the same - name, it will take the position defined in this dict. Defaults to {} - :type file_positions: Dict[int, str], optional + A typical location for a folder might be ['network', 'nodes', , 'folders', ]. + :type where: WhereType + :param files: List of file observation instances within the folder. + :type files: Iterable[FileObservation] + :param num_files: Number of files expected in the folder. + :type num_files: int + :param include_num_access: Whether to include the number of accesses to files in the observation. + :type include_num_access: bool """ - super().__init__() - - self.where: Optional[Tuple[str]] = where + self.where: WhereType = where self.files: List[FileObservation] = files - while len(self.files) < num_files_per_folder: - self.files.append(FileObservation()) - while len(self.files) > num_files_per_folder: + while len(self.files) < num_files: + self.files.append(FileObservation(where=None, include_num_access=include_num_access)) + while len(self.files) > num_files: truncated_file = self.files.pop() msg = f"Too many files in folder observation. Truncating file {truncated_file}" _LOGGER.warning(msg) @@ -111,16 +134,15 @@ class FolderObservation(AbstractObservation): "FILES": {i + 1: f.default_observation for i, f in enumerate(self.files)}, } - def observe(self, state: Dict) -> Dict: - """Generate observation based on the current state of the simulation. - - :param state: Simulation state dictionary - :type state: Dict - :return: Observation - :rtype: Dict + def observe(self, state: Dict) -> ObsType: + """ + Generate observation based on the current state of the simulation. + + :param state: Simulation state dictionary. + :type state: Dict + :return: Observation containing the health status of the folder and status of files within the folder. + :rtype: ObsType """ - if self.where is None: - return self.default_observation folder_state = access_from_nested_dict(state, self.where) if folder_state is NOT_PRESENT_IN_STATE: return self.default_observation @@ -136,9 +158,10 @@ class FolderObservation(AbstractObservation): @property def space(self) -> spaces.Space: - """Gymnasium space object describing the observation space shape. + """ + Gymnasium space object describing the observation space shape. - :return: Gymnasium space + :return: Gymnasium space representing the observation space for folder status. :rtype: spaces.Space """ return spaces.Dict( @@ -149,29 +172,23 @@ class FolderObservation(AbstractObservation): ) @classmethod - def from_config( - cls, config: Dict, game: "PrimaiteGame", parent_where: Optional[List[str]], num_files_per_folder: int = 2 - ) -> "FolderObservation": - """Create folder observation from a config. Also creates child file observations. + def from_config(cls, config: ConfigSchema, parent_where: WhereType = []) -> FolderObservation: + """ + Create a folder observation from a configuration schema. - :param config: Dictionary containing the configuration for this folder observation. Includes the name of the - folder and the files inside of it. - :type config: Dict - :param game: Reference to the PrimaiteGame object that spawned this observation. - :type game: PrimaiteGame + :param config: Configuration schema containing the necessary information for the folder observation. + :type config: ConfigSchema :param parent_where: Where in the simulation state dictionary to find the information about this folder's - parent node. A typical location for a node ``where`` can be: - ['network','nodes',,'file_system'] - :type parent_where: Optional[List[str]] - :param num_files_per_folder: How many spaces for files are in this folder observation (to preserve static - observation size) , defaults to 2 - :type num_files_per_folder: int, optional - :return: Constructed folder observation + parent node. A typical location for a node might be ['network', 'nodes', ]. + :type parent_where: WhereType, optional + :return: Constructed folder observation instance. :rtype: FolderObservation """ - where = parent_where + ["folders", config["folder_name"]] + where = parent_where + ["folders", config.folder_name] - file_configs = config["files"] - files = [FileObservation.from_config(config=f, game=game, parent_where=where) for f in file_configs] + # pass down shared/common config items + for file_config in config.files: + file_config.include_num_access = config.include_num_access - return cls(where=where, files=files, num_files_per_folder=num_files_per_folder) + files = [FileObservation.from_config(config=f, parent_where=where) for f in config.files] + return cls(where=where, files=files, num_files=config.num_files, include_num_access=config.include_num_access) diff --git a/src/primaite/game/agent/observations/firewall_observation.py b/src/primaite/game/agent/observations/firewall_observation.py new file mode 100644 index 00000000..6397d473 --- /dev/null +++ b/src/primaite/game/agent/observations/firewall_observation.py @@ -0,0 +1,213 @@ +from __future__ import annotations + +from typing import Dict, List, Optional + +from gymnasium import spaces +from gymnasium.core import ObsType + +from primaite import getLogger +from primaite.game.agent.observations.acl_observation import ACLObservation +from primaite.game.agent.observations.nic_observations import PortObservation +from primaite.game.agent.observations.observations import AbstractObservation, WhereType + +_LOGGER = getLogger(__name__) + + +class FirewallObservation(AbstractObservation, identifier="FIREWALL"): + """Firewall observation, provides status information about a firewall within the simulation environment.""" + + class ConfigSchema(AbstractObservation.ConfigSchema): + """Configuration schema for FirewallObservation.""" + + hostname: str + """Hostname of the firewall node, used for querying simulation state dictionary.""" + ip_list: Optional[List[str]] = None + """List of IP addresses for encoding ACLs.""" + wildcard_list: Optional[List[str]] = None + """List of IP wildcards for encoding ACLs.""" + port_list: Optional[List[int]] = None + """List of ports for encoding ACLs.""" + protocol_list: Optional[List[str]] = None + """List of protocols for encoding ACLs.""" + num_rules: Optional[int] = None + """Number of rules ACL rules to show.""" + + def __init__( + self, + where: WhereType, + ip_list: List[str], + wildcard_list: List[str], + port_list: List[int], + protocol_list: List[str], + num_rules: int, + ) -> None: + """ + Initialize a firewall observation instance. + + :param where: Where in the simulation state dictionary to find the relevant information for this firewall. + A typical location for a firewall might be ['network', 'nodes', ]. + :type where: WhereType + :param ip_list: List of IP addresses. + :type ip_list: List[str] + :param wildcard_list: List of wildcard rules. + :type wildcard_list: List[str] + :param port_list: List of port numbers. + :type port_list: List[int] + :param protocol_list: List of protocol types. + :type protocol_list: List[str] + :param num_rules: Number of rules configured in the firewall. + :type num_rules: int + """ + self.where: WhereType = where + + self.ports: List[PortObservation] = [ + PortObservation(where=self.where + ["port", port_num]) for port_num in (1, 2, 3) + ] + # TODO: check what the port nums are for firewall. + + self.internal_inbound_acl = ACLObservation( + where=self.where + ["acl", "internal", "inbound"], + num_rules=num_rules, + ip_list=ip_list, + wildcard_list=wildcard_list, + port_list=port_list, + protocol_list=protocol_list, + ) + self.internal_outbound_acl = ACLObservation( + where=self.where + ["acl", "internal", "outbound"], + num_rules=num_rules, + ip_list=ip_list, + wildcard_list=wildcard_list, + port_list=port_list, + protocol_list=protocol_list, + ) + self.dmz_inbound_acl = ACLObservation( + where=self.where + ["acl", "dmz", "inbound"], + num_rules=num_rules, + ip_list=ip_list, + wildcard_list=wildcard_list, + port_list=port_list, + protocol_list=protocol_list, + ) + self.dmz_outbound_acl = ACLObservation( + where=self.where + ["acl", "dmz", "outbound"], + num_rules=num_rules, + ip_list=ip_list, + wildcard_list=wildcard_list, + port_list=port_list, + protocol_list=protocol_list, + ) + self.external_inbound_acl = ACLObservation( + where=self.where + ["acl", "external", "inbound"], + num_rules=num_rules, + ip_list=ip_list, + wildcard_list=wildcard_list, + port_list=port_list, + protocol_list=protocol_list, + ) + self.external_outbound_acl = ACLObservation( + where=self.where + ["acl", "external", "outbound"], + num_rules=num_rules, + ip_list=ip_list, + wildcard_list=wildcard_list, + port_list=port_list, + protocol_list=protocol_list, + ) + + self.default_observation = { + "PORTS": {i + 1: p.default_observation for i, p in enumerate(self.ports)}, + "INTERNAL": { + "INBOUND": self.internal_inbound_acl.default_observation, + "OUTBOUND": self.internal_outbound_acl.default_observation, + }, + "DMZ": { + "INBOUND": self.dmz_inbound_acl.default_observation, + "OUTBOUND": self.dmz_outbound_acl.default_observation, + }, + "EXTERNAL": { + "INBOUND": self.external_inbound_acl.default_observation, + "OUTBOUND": self.external_outbound_acl.default_observation, + }, + } + + def observe(self, state: Dict) -> ObsType: + """ + Generate observation based on the current state of the simulation. + + :param state: Simulation state dictionary. + :type state: Dict + :return: Observation containing the status of ports and ACLs for internal, DMZ, and external traffic. + :rtype: ObsType + """ + obs = { + "PORTS": {i + 1: p.observe(state) for i, p in enumerate(self.ports)}, + "INTERNAL": { + "INBOUND": self.internal_inbound_acl.observe(state), + "OUTBOUND": self.internal_outbound_acl.observe(state), + }, + "DMZ": { + "INBOUND": self.dmz_inbound_acl.observe(state), + "OUTBOUND": self.dmz_outbound_acl.observe(state), + }, + "EXTERNAL": { + "INBOUND": self.external_inbound_acl.observe(state), + "OUTBOUND": self.external_outbound_acl.observe(state), + }, + } + return obs + + @property + def space(self) -> spaces.Space: + """ + Gymnasium space object describing the observation space shape. + + :return: Gymnasium space representing the observation space for firewall status. + :rtype: spaces.Space + """ + space = spaces.Dict( + { + "PORTS": spaces.Dict({i + 1: p.space for i, p in enumerate(self.ports)}), + "INTERNAL": spaces.Dict( + { + "INBOUND": self.internal_inbound_acl.space, + "OUTBOUND": self.internal_outbound_acl.space, + } + ), + "DMZ": spaces.Dict( + { + "INBOUND": self.dmz_inbound_acl.space, + "OUTBOUND": self.dmz_outbound_acl.space, + } + ), + "EXTERNAL": spaces.Dict( + { + "INBOUND": self.external_inbound_acl.space, + "OUTBOUND": self.external_outbound_acl.space, + } + ), + } + ) + return space + + @classmethod + def from_config(cls, config: ConfigSchema, parent_where: WhereType = []) -> FirewallObservation: + """ + Create a firewall observation from a configuration schema. + + :param config: Configuration schema containing the necessary information for the firewall observation. + :type config: ConfigSchema + :param parent_where: Where in the simulation state dictionary to find the information about this firewall's + parent node. A typical location for a node might be ['network', 'nodes', ]. + :type parent_where: WhereType, optional + :return: Constructed firewall observation instance. + :rtype: FirewallObservation + """ + where = parent_where + ["nodes", config.hostname] + return cls( + where=where, + ip_list=config.ip_list, + wildcard_list=config.wildcard_list, + port_list=config.port_list, + protocol_list=config.protocol_list, + num_rules=config.num_rules, + ) diff --git a/src/primaite/game/agent/observations/host_observations.py b/src/primaite/game/agent/observations/host_observations.py new file mode 100644 index 00000000..34c9b3ff --- /dev/null +++ b/src/primaite/game/agent/observations/host_observations.py @@ -0,0 +1,229 @@ +from __future__ import annotations + +from typing import Dict, List, Optional + +from gymnasium import spaces +from gymnasium.core import ObsType + +from primaite import getLogger +from primaite.game.agent.observations.file_system_observations import FolderObservation +from primaite.game.agent.observations.nic_observations import NICObservation +from primaite.game.agent.observations.observations import AbstractObservation, WhereType +from primaite.game.agent.observations.software_observation import ApplicationObservation, ServiceObservation +from primaite.game.agent.utils import access_from_nested_dict, NOT_PRESENT_IN_STATE + +_LOGGER = getLogger(__name__) + + +class HostObservation(AbstractObservation, identifier="HOST"): + """Host observation, provides status information about a host within the simulation environment.""" + + class ConfigSchema(AbstractObservation.ConfigSchema): + """Configuration schema for HostObservation.""" + + hostname: str + """Hostname of the host, used for querying simulation state dictionary.""" + services: List[ServiceObservation.ConfigSchema] = [] + """List of services to observe on the host.""" + applications: List[ApplicationObservation.ConfigSchema] = [] + """List of applications to observe on the host.""" + folders: List[FolderObservation.ConfigSchema] = [] + """List of folders to observe on the host.""" + network_interfaces: List[NICObservation.ConfigSchema] = [] + """List of network interfaces to observe on the host.""" + num_services: Optional[int] = None + """Number of spaces for service observations on this host.""" + num_applications: Optional[int] = None + """Number of spaces for application observations on this host.""" + num_folders: Optional[int] = None + """Number of spaces for folder observations on this host.""" + num_files: Optional[int] = None + """Number of spaces for file observations on this host.""" + num_nics: Optional[int] = None + """Number of spaces for network interface observations on this host.""" + include_nmne: Optional[bool] = None + """Whether network interface observations should include number of malicious network events.""" + include_num_access: Optional[bool] = None + """Whether to include the number of accesses to files observations on this host.""" + + def __init__( + self, + where: WhereType, + services: List[ServiceObservation], + applications: List[ApplicationObservation], + folders: List[FolderObservation], + network_interfaces: List[NICObservation], + num_services: int, + num_applications: int, + num_folders: int, + num_files: int, + num_nics: int, + include_nmne: bool, + include_num_access: bool, + ) -> None: + """ + Initialize a host observation instance. + + :param where: Where in the simulation state dictionary to find the relevant information for this host. + A typical location for a host might be ['network', 'nodes', ]. + :type where: WhereType + :param services: List of service observations on the host. + :type services: List[ServiceObservation] + :param applications: List of application observations on the host. + :type applications: List[ApplicationObservation] + :param folders: List of folder observations on the host. + :type folders: List[FolderObservation] + :param network_interfaces: List of network interface observations on the host. + :type network_interfaces: List[NICObservation] + :param num_services: Number of services to observe. + :type num_services: int + :param num_applications: Number of applications to observe. + :type num_applications: int + :param num_folders: Number of folders to observe. + :type num_folders: int + :param num_files: Number of files. + :type num_files: int + :param num_nics: Number of network interfaces. + :type num_nics: int + :param include_nmne: Flag to include network metrics and errors. + :type include_nmne: bool + :param include_num_access: Flag to include the number of accesses to files. + :type include_num_access: bool + """ + self.where: WhereType = where + + # Ensure lists have lengths equal to specified counts by truncating or padding + self.services: List[ServiceObservation] = services + while len(self.services) < num_services: + self.services.append(ServiceObservation(where=None)) + while len(self.services) > num_services: + truncated_service = self.services.pop() + msg = f"Too many services in Node observation space for node. Truncating service {truncated_service.where}" + _LOGGER.warning(msg) + + self.applications: List[ApplicationObservation] = applications + while len(self.applications) < num_applications: + self.applications.append(ApplicationObservation(where=None)) + while len(self.applications) > num_applications: + truncated_application = self.applications.pop() + msg = f"Too many applications in Node observation space for node. Truncating {truncated_application.where}" + _LOGGER.warning(msg) + + self.folders: List[FolderObservation] = folders + while len(self.folders) < num_folders: + self.folders.append( + FolderObservation(where=None, files=[], num_files=num_files, include_num_access=include_num_access) + ) + while len(self.folders) > num_folders: + truncated_folder = self.folders.pop() + msg = f"Too many folders in Node observation space for node. Truncating folder {truncated_folder.where}" + _LOGGER.warning(msg) + + self.network_interfaces: List[NICObservation] = network_interfaces + while len(self.network_interfaces) < num_nics: + self.network_interfaces.append(NICObservation(where=None, include_nmne=include_nmne)) + while len(self.network_interfaces) > num_nics: + truncated_nic = self.network_interfaces.pop() + msg = f"Too many network_interfaces in Node observation space for node. Truncating {truncated_nic.where}" + _LOGGER.warning(msg) + + self.default_observation: ObsType = { + "SERVICES": {i + 1: s.default_observation for i, s in enumerate(self.services)}, + "APPLICATIONS": {i + 1: a.default_observation for i, a in enumerate(self.applications)}, + "FOLDERS": {i + 1: f.default_observation for i, f in enumerate(self.folders)}, + "NICS": {i + 1: n.default_observation for i, n in enumerate(self.network_interfaces)}, + "operating_status": 0, + "num_file_creations": 0, + "num_file_deletions": 0, + } + + def observe(self, state: Dict) -> ObsType: + """ + Generate observation based on the current state of the simulation. + + :param state: Simulation state dictionary. + :type state: Dict + :return: Observation containing the status information about the host. + :rtype: ObsType + """ + node_state = access_from_nested_dict(state, self.where) + if node_state is NOT_PRESENT_IN_STATE: + return self.default_observation + + obs = {} + obs["SERVICES"] = {i + 1: service.observe(state) for i, service in enumerate(self.services)} + obs["APPLICATIONS"] = {i + 1: app.observe(state) for i, app in enumerate(self.applications)} + obs["FOLDERS"] = {i + 1: folder.observe(state) for i, folder in enumerate(self.folders)} + obs["operating_status"] = node_state["operating_state"] + obs["NICS"] = { + i + 1: network_interface.observe(state) for i, network_interface in enumerate(self.network_interfaces) + } + obs["num_file_creations"] = node_state["file_system"]["num_file_creations"] + obs["num_file_deletions"] = node_state["file_system"]["num_file_deletions"] + return obs + + @property + def space(self) -> spaces.Space: + """ + Gymnasium space object describing the observation space shape. + + :return: Gymnasium space representing the observation space for host status. + :rtype: spaces.Space + """ + shape = { + "SERVICES": spaces.Dict({i + 1: service.space for i, service in enumerate(self.services)}), + "APPLICATIONS": spaces.Dict({i + 1: app.space for i, app in enumerate(self.applications)}), + "FOLDERS": spaces.Dict({i + 1: folder.space for i, folder in enumerate(self.folders)}), + "operating_status": spaces.Discrete(5), + "NICS": spaces.Dict( + {i + 1: network_interface.space for i, network_interface in enumerate(self.network_interfaces)} + ), + "num_file_creations": spaces.Discrete(4), + "num_file_deletions": spaces.Discrete(4), + } + return spaces.Dict(shape) + + @classmethod + def from_config(cls, config: ConfigSchema, parent_where: WhereType = None) -> HostObservation: + """ + Create a host observation from a configuration schema. + + :param config: Configuration schema containing the necessary information for the host observation. + :type config: ConfigSchema + :param parent_where: Where in the simulation state dictionary to find the information about this host. + A typical location might be ['network', 'nodes', ]. + :type parent_where: WhereType, optional + :return: Constructed host observation instance. + :rtype: HostObservation + """ + if parent_where is None: + where = ["network", "nodes", config.hostname] + else: + where = parent_where + ["nodes", config.hostname] + + # Pass down shared/common config items + for folder_config in config.folders: + folder_config.include_num_access = config.include_num_access + folder_config.num_files = config.num_files + for nic_config in config.network_interfaces: + nic_config.include_nmne = config.include_nmne + + services = [ServiceObservation.from_config(config=c, parent_where=where) for c in config.services] + applications = [ApplicationObservation.from_config(config=c, parent_where=where) for c in config.applications] + folders = [FolderObservation.from_config(config=c, parent_where=where) for c in config.folders] + nics = [NICObservation.from_config(config=c, parent_where=where) for c in config.network_interfaces] + + return cls( + where=where, + services=services, + applications=applications, + folders=folders, + network_interfaces=nics, + num_services=config.num_services, + num_applications=config.num_applications, + num_folders=config.num_folders, + num_files=config.num_files, + num_nics=config.num_nics, + include_nmne=config.include_nmne, + include_num_access=config.include_num_access, + ) diff --git a/src/primaite/game/agent/observations/nic_observations.py b/src/primaite/game/agent/observations/nic_observations.py index de83e03a..3be53112 100644 --- a/src/primaite/game/agent/observations/nic_observations.py +++ b/src/primaite/game/agent/observations/nic_observations.py @@ -1,188 +1,157 @@ -from typing import Dict, List, Optional, Tuple, TYPE_CHECKING +from __future__ import annotations + +from typing import Dict, Optional from gymnasium import spaces +from gymnasium.core import ObsType -from primaite.game.agent.observations.observations import AbstractObservation +from primaite.game.agent.observations.observations import AbstractObservation, WhereType from primaite.game.agent.utils import access_from_nested_dict, NOT_PRESENT_IN_STATE -from primaite.simulator.network.nmne import CAPTURE_NMNE - -if TYPE_CHECKING: - from primaite.game.game import PrimaiteGame -class NicObservation(AbstractObservation): - """Observation of a Network Interface Card (NIC) in the network.""" +class NICObservation(AbstractObservation, identifier="NETWORK_INTERFACE"): + """Status information about a network interface within the simulation environment.""" - low_nmne_threshold: int = 0 - """The minimum number of malicious network events to be considered low.""" - med_nmne_threshold: int = 5 - """The minimum number of malicious network events to be considered medium.""" - high_nmne_threshold: int = 10 - """The minimum number of malicious network events to be considered high.""" + class ConfigSchema(AbstractObservation.ConfigSchema): + """Configuration schema for NICObservation.""" - global CAPTURE_NMNE + nic_num: int + """Number of the network interface.""" + include_nmne: Optional[bool] = None + """Whether to include number of malicious network events (NMNE) in the observation.""" - @property - def default_observation(self) -> Dict: - """The default NIC observation dict.""" - data = {"nic_status": 0} - if CAPTURE_NMNE: - data.update({"NMNE": {"inbound": 0, "outbound": 0}}) - - return data - - def __init__( - self, - where: Optional[Tuple[str]] = None, - low_nmne_threshold: Optional[int] = 0, - med_nmne_threshold: Optional[int] = 5, - high_nmne_threshold: Optional[int] = 10, - ) -> None: - """Initialise NIC observation. - - :param where: Where in the simulation state dictionary to find the relevant information for this NIC. A typical - example may look like this: - ['network','nodes',,'NICs',] - If None, this denotes that the NIC does not exist and the observation will be populated with zeroes. - :type where: Optional[Tuple[str]], optional + def __init__(self, where: WhereType, include_nmne: bool) -> None: """ - super().__init__() - self.where: Optional[Tuple[str]] = where + Initialize a network interface observation instance. - global CAPTURE_NMNE - if CAPTURE_NMNE: - self.nmne_inbound_last_step: int = 0 - """NMNEs persist for the whole episode, but we want to count per step. Keeping track of last step count lets - us find the difference.""" - self.nmne_outbound_last_step: int = 0 - """NMNEs persist for the whole episode, but we want to count per step. Keeping track of last step count lets - us find the difference.""" - - if low_nmne_threshold or med_nmne_threshold or high_nmne_threshold: - self._validate_nmne_categories( - low_nmne_threshold=low_nmne_threshold, - med_nmne_threshold=med_nmne_threshold, - high_nmne_threshold=high_nmne_threshold, - ) - - def _validate_nmne_categories( - self, low_nmne_threshold: int = 0, med_nmne_threshold: int = 5, high_nmne_threshold: int = 10 - ): + :param where: Where in the simulation state dictionary to find the relevant information for this interface. + A typical location for a network interface might be + ['network', 'nodes', , 'NICs', ]. + :type where: WhereType + :param include_nmne: Flag to determine whether to include NMNE information in the observation. + :type include_nmne: bool """ - Validates the nmne threshold config. + self.where = where + self.include_nmne: bool = include_nmne - If the configuration is valid, the thresholds will be set, otherwise, an exception is raised. + self.default_observation: ObsType = {"nic_status": 0} + if self.include_nmne: + self.default_observation.update({"NMNE": {"inbound": 0, "outbound": 0}}) - :param: low_nmne_threshold: The minimum number of malicious network events to be considered low - :param: med_nmne_threshold: The minimum number of malicious network events to be considered medium - :param: high_nmne_threshold: The minimum number of malicious network events to be considered high + def observe(self, state: Dict) -> ObsType: """ - if high_nmne_threshold <= med_nmne_threshold: - raise Exception( - f"nmne_categories: high nmne count ({high_nmne_threshold}) must be greater " - f"than medium nmne count ({med_nmne_threshold})" - ) + Generate observation based on the current state of the simulation. - if med_nmne_threshold <= low_nmne_threshold: - raise Exception( - f"nmne_categories: medium nmne count ({med_nmne_threshold}) must be greater " - f"than low nmne count ({low_nmne_threshold})" - ) - - self.high_nmne_threshold = high_nmne_threshold - self.med_nmne_threshold = med_nmne_threshold - self.low_nmne_threshold = low_nmne_threshold - - def _categorise_mne_count(self, nmne_count: int) -> int: - """ - Categorise the number of Malicious Network Events (NMNEs) into discrete bins. - - This helps in classifying the severity or volume of MNEs into manageable levels for the agent. - - Bins are defined as follows: - - 0: No MNEs detected (0 events). - - 1: Low number of MNEs (default 1-5 events). - - 2: Moderate number of MNEs (default 6-10 events). - - 3: High number of MNEs (default more than 10 events). - - :param nmne_count: Number of MNEs detected. - :return: Bin number corresponding to the number of MNEs. Returns 0, 1, 2, or 3 based on the detected MNE count. - """ - if nmne_count > self.high_nmne_threshold: - return 3 - elif nmne_count > self.med_nmne_threshold: - return 2 - elif nmne_count > self.low_nmne_threshold: - return 1 - return 0 - - def observe(self, state: Dict) -> Dict: - """Generate observation based on the current state of the simulation. - - :param state: Simulation state dictionary + :param state: Simulation state dictionary. :type state: Dict - :return: Observation - :rtype: Dict + :return: Observation containing the status of the network interface and optionally NMNE information. + :rtype: ObsType """ - if self.where is None: - return self.default_observation nic_state = access_from_nested_dict(state, self.where) if nic_state is NOT_PRESENT_IN_STATE: return self.default_observation - else: - obs_dict = {"nic_status": 1 if nic_state["enabled"] else 2} - if CAPTURE_NMNE: - obs_dict.update({"NMNE": {}}) - direction_dict = nic_state["nmne"].get("direction", {}) - inbound_keywords = direction_dict.get("inbound", {}).get("keywords", {}) - inbound_count = inbound_keywords.get("*", 0) - outbound_keywords = direction_dict.get("outbound", {}).get("keywords", {}) - outbound_count = outbound_keywords.get("*", 0) - obs_dict["NMNE"]["inbound"] = self._categorise_mne_count(inbound_count - self.nmne_inbound_last_step) - obs_dict["NMNE"]["outbound"] = self._categorise_mne_count(outbound_count - self.nmne_outbound_last_step) - self.nmne_inbound_last_step = inbound_count - self.nmne_outbound_last_step = outbound_count - return obs_dict + + obs = {"nic_status": 1 if nic_state["enabled"] else 2} + if self.include_nmne: + obs.update({"NMNE": {}}) + direction_dict = nic_state["nmne"].get("direction", {}) + inbound_keywords = direction_dict.get("inbound", {}).get("keywords", {}) + inbound_count = inbound_keywords.get("*", 0) + outbound_keywords = direction_dict.get("outbound", {}).get("keywords", {}) + outbound_count = outbound_keywords.get("*", 0) + obs["NMNE"]["inbound"] = self._categorise_mne_count(inbound_count - self.nmne_inbound_last_step) + obs["NMNE"]["outbound"] = self._categorise_mne_count(outbound_count - self.nmne_outbound_last_step) + self.nmne_inbound_last_step = inbound_count + self.nmne_outbound_last_step = outbound_count + return obs @property def space(self) -> spaces.Space: - """Gymnasium space object describing the observation space shape.""" + """ + Gymnasium space object describing the observation space shape. + + :return: Gymnasium space representing the observation space for network interface status and NMNE information. + :rtype: spaces.Space + """ space = spaces.Dict({"nic_status": spaces.Discrete(3)}) - if CAPTURE_NMNE: + if self.include_nmne: space["NMNE"] = spaces.Dict({"inbound": spaces.Discrete(4), "outbound": spaces.Discrete(4)}) return space @classmethod - def from_config(cls, config: Dict, game: "PrimaiteGame", parent_where: Optional[List[str]]) -> "NicObservation": - """Create NIC observation from a config. - - :param config: Dictionary containing the configuration for this NIC observation. - :type config: Dict - :param game: Reference to the PrimaiteGame object that spawned this observation. - :type game: PrimaiteGame - :param parent_where: Where in the simulation state dictionary to find the information about this NIC's parent - node. A typical location for a node ``where`` can be: ['network','nodes',] - :type parent_where: Optional[List[str]] - :return: Constructed NIC observation - :rtype: NicObservation + def from_config(cls, config: ConfigSchema, parent_where: WhereType = []) -> NICObservation: """ - low_nmne_threshold = None - med_nmne_threshold = None - high_nmne_threshold = None + Create a network interface observation from a configuration schema. - if game and game.options and game.options.thresholds and game.options.thresholds.get("nmne"): - threshold = game.options.thresholds["nmne"] + :param config: Configuration schema containing the necessary information for the network interface observation. + :type config: ConfigSchema + :param parent_where: Where in the simulation state dictionary to find the information about this NIC's + parent node. A typical location for a node might be ['network', 'nodes', ]. + :type parent_where: WhereType, optional + :return: Constructed network interface observation instance. + :rtype: NICObservation + """ + return cls(where=parent_where + ["NICs", config.nic_num], include_nmne=config.include_nmne) - low_nmne_threshold = int(threshold.get("low")) if threshold.get("low") is not None else None - med_nmne_threshold = int(threshold.get("medium")) if threshold.get("medium") is not None else None - high_nmne_threshold = int(threshold.get("high")) if threshold.get("high") is not None else None - return cls( - where=parent_where + ["NICs", config["nic_num"]], - low_nmne_threshold=low_nmne_threshold, - med_nmne_threshold=med_nmne_threshold, - high_nmne_threshold=high_nmne_threshold, - ) +class PortObservation(AbstractObservation, identifier="PORT"): + """Port observation, provides status information about a network port within the simulation environment.""" + + class ConfigSchema(AbstractObservation.ConfigSchema): + """Configuration schema for PortObservation.""" + + port_id: int + """Identifier of the port, used for querying simulation state dictionary.""" + + def __init__(self, where: WhereType) -> None: + """ + Initialize a port observation instance. + + :param where: Where in the simulation state dictionary to find the relevant information for this port. + A typical location for a port might be ['network', 'nodes', , 'NICs', ]. + :type where: WhereType + """ + self.where = where + self.default_observation: ObsType = {"operating_status": 0} + + def observe(self, state: Dict) -> ObsType: + """ + Generate observation based on the current state of the simulation. + + :param state: Simulation state dictionary. + :type state: Dict + :return: Observation containing the operating status of the port. + :rtype: ObsType + """ + port_state = access_from_nested_dict(state, self.where) + if port_state is NOT_PRESENT_IN_STATE: + return self.default_observation + return {"operating_status": 1 if port_state["enabled"] else 2} + + @property + def space(self) -> spaces.Space: + """ + Gymnasium space object describing the observation space shape. + + :return: Gymnasium space representing the observation space for port status. + :rtype: spaces.Space + """ + return spaces.Dict({"operating_status": spaces.Discrete(3)}) + + @classmethod + def from_config(cls, config: ConfigSchema, parent_where: WhereType = []) -> PortObservation: + """ + Create a port observation from a configuration schema. + + :param config: Configuration schema containing the necessary information for the port observation. + :type config: ConfigSchema + :param parent_where: Where in the simulation state dictionary to find the information about this port's + parent node. A typical location for a node might be ['network', 'nodes', ]. + :type parent_where: WhereType, optional + :return: Constructed port observation instance. + :rtype: PortObservation + """ + return cls(where=parent_where + ["NICs", config.port_id]) diff --git a/src/primaite/game/agent/observations/node_observations.py b/src/primaite/game/agent/observations/node_observations.py index c702f8e2..0e63f440 100644 --- a/src/primaite/game/agent/observations/node_observations.py +++ b/src/primaite/game/agent/observations/node_observations.py @@ -1,1199 +1,18 @@ from __future__ import annotations -from ipaddress import IPv4Address -from typing import Any, Dict, Iterable, List, Optional +from typing import Dict, List from gymnasium import spaces from gymnasium.core import ObsType from primaite import getLogger -from primaite.game.agent.observations.observations import AbstractObservation -from primaite.game.agent.utils import access_from_nested_dict, NOT_PRESENT_IN_STATE +from primaite.game.agent.observations.firewall_observation import FirewallObservation +from primaite.game.agent.observations.host_observations import HostObservation +from primaite.game.agent.observations.observations import AbstractObservation, WhereType +from primaite.game.agent.observations.router_observation import RouterObservation _LOGGER = getLogger(__name__) -WhereType = Iterable[str | int] | None - - -class ServiceObservation(AbstractObservation, identifier="SERVICE"): - """Service observation, shows status of a service in the simulation environment.""" - - class ConfigSchema(AbstractObservation.ConfigSchema): - """Configuration schema for ServiceObservation.""" - - service_name: str - """Name of the service, used for querying simulation state dictionary""" - - def __init__(self, where: WhereType) -> None: - """ - Initialize a service observation instance. - - :param where: Where in the simulation state dictionary to find the relevant information for this service. - A typical location for a service might be ['network', 'nodes', , 'services', ]. - :type where: WhereType - """ - self.where = where - self.default_observation = {"operating_status": 0, "health_status": 0} - - def observe(self, state: Dict) -> ObsType: - """ - Generate observation based on the current state of the simulation. - - :param state: Simulation state dictionary. - :type state: Dict - :return: Observation containing the operating status and health status of the service. - :rtype: Any - """ - service_state = access_from_nested_dict(state, self.where) - if service_state is NOT_PRESENT_IN_STATE: - return self.default_observation - return { - "operating_status": service_state["operating_state"], - "health_status": service_state["health_state_visible"], - } - - @property - def space(self) -> spaces.Space: - """ - Gymnasium space object describing the observation space shape. - - :return: Gymnasium space representing the observation space for service status. - :rtype: spaces.Space - """ - return spaces.Dict({"operating_status": spaces.Discrete(7), "health_status": spaces.Discrete(5)}) - - @classmethod - def from_config(cls, config: ConfigSchema, parent_where: WhereType = []) -> ServiceObservation: - """ - Create a service observation from a configuration schema. - - :param config: Configuration schema containing the necessary information for the service observation. - :type config: ConfigSchema - :param parent_where: Where in the simulation state dictionary to find the information about this service's - parent node. A typical location for a node might be ['network', 'nodes', ]. - :type parent_where: WhereType, optional - :return: Constructed service observation instance. - :rtype: ServiceObservation - """ - return cls(where=parent_where + ["services", config.service_name]) - - -class ApplicationObservation(AbstractObservation, identifier="APPLICATION"): - """Application observation, shows the status of an application within the simulation environment.""" - - class ConfigSchema(AbstractObservation.ConfigSchema): - """Configuration schema for ApplicationObservation.""" - - application_name: str - """Name of the application, used for querying simulation state dictionary""" - - def __init__(self, where: WhereType) -> None: - """ - Initialise an application observation instance. - - :param where: Where in the simulation state dictionary to find the relevant information for this application. - A typical location for an application might be - ['network', 'nodes', , 'applications', ]. - :type where: WhereType - """ - self.where = where - self.default_observation = {"operating_status": 0, "health_status": 0, "num_executions": 0} - - def observe(self, state: Dict) -> Any: - """ - Generate observation based on the current state of the simulation. - - :param state: Simulation state dictionary. - :type state: Dict - :return: Obs containing the operating status, health status, and number of executions of the application. - :rtype: Any - """ - application_state = access_from_nested_dict(state, self.where) - if application_state is NOT_PRESENT_IN_STATE: - return self.default_observation - return { - "operating_status": application_state["operating_state"], - "health_status": application_state["health_state_visible"], - "num_executions": application_state["num_executions"], - } - - @property - def space(self) -> spaces.Space: - """ - Gymnasium space object describing the observation space shape. - - :return: Gymnasium space representing the observation space for application status. - :rtype: spaces.Space - """ - return spaces.Dict( - { - "operating_status": spaces.Discrete(7), - "health_status": spaces.Discrete(5), - "num_executions": spaces.Discrete(4), - } - ) - - @classmethod - def from_config(cls, config: ConfigSchema, parent_where: WhereType = []) -> ApplicationObservation: - """ - Create an application observation from a configuration schema. - - :param config: Configuration schema containing the necessary information for the application observation. - :type config: ConfigSchema - :param parent_where: Where in the simulation state dictionary to find the information about this application's - parent node. A typical location for a node might be ['network', 'nodes', ]. - :type parent_where: WhereType, optional - :return: Constructed application observation instance. - :rtype: ApplicationObservation - """ - return cls(where=parent_where + ["applications", config.application_name]) - - -class FileObservation(AbstractObservation, identifier="FILE"): - """File observation, provides status information about a file within the simulation environment.""" - - class ConfigSchema(AbstractObservation.ConfigSchema): - """Configuration schema for FileObservation.""" - - file_name: str - """Name of the file, used for querying simulation state dictionary.""" - include_num_access: Optional[bool] = None - """Whether to include the number of accesses to the file in the observation.""" - - def __init__(self, where: WhereType, include_num_access: bool) -> None: - """ - Initialize a file observation instance. - - :param where: Where in the simulation state dictionary to find the relevant information for this file. - A typical location for a file might be - ['network', 'nodes', , 'file_system', 'folder', , 'files', ]. - :type where: WhereType - :param include_num_access: Whether to include the number of accesses to the file in the observation. - :type include_num_access: bool - """ - self.where: WhereType = where - self.include_num_access: bool = include_num_access - - self.default_observation: ObsType = {"health_status": 0} - if self.include_num_access: - self.default_observation["num_access"] = 0 - - def observe(self, state: Dict) -> Any: - """ - Generate observation based on the current state of the simulation. - - :param state: Simulation state dictionary. - :type state: Dict - :return: Observation containing the health status of the file and optionally the number of accesses. - :rtype: Any - """ - file_state = access_from_nested_dict(state, self.where) - if file_state is NOT_PRESENT_IN_STATE: - return self.default_observation - obs = {"health_status": file_state["visible_status"]} - if self.include_num_access: - obs["num_access"] = file_state["num_access"] - # raise NotImplementedError("TODO: need to fix num_access to use thresholds instead of raw value.") - return obs - - @property - def space(self) -> spaces.Space: - """ - Gymnasium space object describing the observation space shape. - - :return: Gymnasium space representing the observation space for file status. - :rtype: spaces.Space - """ - space = {"health_status": spaces.Discrete(6)} - if self.include_num_access: - space["num_access"] = spaces.Discrete(4) - return spaces.Dict(space) - - @classmethod - def from_config(cls, config: ConfigSchema, parent_where: WhereType = []) -> FileObservation: - """ - Create a file observation from a configuration schema. - - :param config: Configuration schema containing the necessary information for the file observation. - :type config: ConfigSchema - :param parent_where: Where in the simulation state dictionary to find the information about this file's - parent node. A typical location for a node might be ['network', 'nodes', ]. - :type parent_where: WhereType, optional - :return: Constructed file observation instance. - :rtype: FileObservation - """ - return cls(where=parent_where + ["files", config.file_name], include_num_access=config.include_num_access) - - -class FolderObservation(AbstractObservation, identifier="FOLDER"): - """Folder observation, provides status information about a folder within the simulation environment.""" - - class ConfigSchema(AbstractObservation.ConfigSchema): - """Configuration schema for FolderObservation.""" - - folder_name: str - """Name of the folder, used for querying simulation state dictionary.""" - files: List[FileObservation.ConfigSchema] = [] - """List of file configurations within the folder.""" - num_files: Optional[int] = None - """Number of spaces for file observations in this folder.""" - include_num_access: Optional[bool] = None - """Whether files in this folder should include the number of accesses in their observation.""" - - def __init__( - self, where: WhereType, files: Iterable[FileObservation], num_files: int, include_num_access: bool - ) -> None: - """ - Initialize a folder observation instance. - - :param where: Where in the simulation state dictionary to find the relevant information for this folder. - A typical location for a folder might be ['network', 'nodes', , 'folders', ]. - :type where: WhereType - :param files: List of file observation instances within the folder. - :type files: Iterable[FileObservation] - :param num_files: Number of files expected in the folder. - :type num_files: int - :param include_num_access: Whether to include the number of accesses to files in the observation. - :type include_num_access: bool - """ - self.where: WhereType = where - - self.files: List[FileObservation] = files - while len(self.files) < num_files: - self.files.append(FileObservation(where=None, include_num_access=include_num_access)) - while len(self.files) > num_files: - truncated_file = self.files.pop() - msg = f"Too many files in folder observation. Truncating file {truncated_file}" - _LOGGER.warning(msg) - - self.default_observation = { - "health_status": 0, - "FILES": {i + 1: f.default_observation for i, f in enumerate(self.files)}, - } - - def observe(self, state: Dict) -> Any: - """ - Generate observation based on the current state of the simulation. - - :param state: Simulation state dictionary. - :type state: Dict - :return: Observation containing the health status of the folder and status of files within the folder. - :rtype: Any - """ - folder_state = access_from_nested_dict(state, self.where) - if folder_state is NOT_PRESENT_IN_STATE: - return self.default_observation - - health_status = folder_state["health_status"] - - obs = {} - - obs["health_status"] = health_status - obs["FILES"] = {i + 1: file.observe(state) for i, file in enumerate(self.files)} - - return obs - - @property - def space(self) -> spaces.Space: - """ - Gymnasium space object describing the observation space shape. - - :return: Gymnasium space representing the observation space for folder status. - :rtype: spaces.Space - """ - return spaces.Dict( - { - "health_status": spaces.Discrete(6), - "FILES": spaces.Dict({i + 1: f.space for i, f in enumerate(self.files)}), - } - ) - - @classmethod - def from_config(cls, config: ConfigSchema, parent_where: WhereType = []) -> FolderObservation: - """ - Create a folder observation from a configuration schema. - - :param config: Configuration schema containing the necessary information for the folder observation. - :type config: ConfigSchema - :param parent_where: Where in the simulation state dictionary to find the information about this folder's - parent node. A typical location for a node might be ['network', 'nodes', ]. - :type parent_where: WhereType, optional - :return: Constructed folder observation instance. - :rtype: FolderObservation - """ - where = parent_where + ["folders", config.folder_name] - - # pass down shared/common config items - for file_config in config.files: - file_config.include_num_access = config.include_num_access - - files = [FileObservation.from_config(config=f, parent_where=where) for f in config.files] - return cls(where=where, files=files, num_files=config.num_files, include_num_access=config.include_num_access) - - -class NICObservation(AbstractObservation, identifier="NETWORK_INTERFACE"): - """Status information about a network interface within the simulation environment.""" - - class ConfigSchema(AbstractObservation.ConfigSchema): - """Configuration schema for NICObservation.""" - - nic_num: int - """Number of the network interface.""" - include_nmne: Optional[bool] = None - """Whether to include number of malicious network events (NMNE) in the observation.""" - - def __init__(self, where: WhereType, include_nmne: bool) -> None: - """ - Initialize a network interface observation instance. - - :param where: Where in the simulation state dictionary to find the relevant information for this interface. - A typical location for a network interface might be - ['network', 'nodes', , 'NICs', ]. - :type where: WhereType - :param include_nmne: Flag to determine whether to include NMNE information in the observation. - :type include_nmne: bool - """ - self.where = where - self.include_nmne: bool = include_nmne - - self.default_observation: ObsType = {"nic_status": 0} - if self.include_nmne: - self.default_observation.update({"NMNE": {"inbound": 0, "outbound": 0}}) - - def observe(self, state: Dict) -> Any: - """ - Generate observation based on the current state of the simulation. - - :param state: Simulation state dictionary. - :type state: Dict - :return: Observation containing the status of the network interface and optionally NMNE information. - :rtype: Any - """ - nic_state = access_from_nested_dict(state, self.where) - - if nic_state is NOT_PRESENT_IN_STATE: - return self.default_observation - - obs = {"nic_status": 1 if nic_state["enabled"] else 2} - if self.include_nmne: - obs.update({"NMNE": {}}) - direction_dict = nic_state["nmne"].get("direction", {}) - inbound_keywords = direction_dict.get("inbound", {}).get("keywords", {}) - inbound_count = inbound_keywords.get("*", 0) - outbound_keywords = direction_dict.get("outbound", {}).get("keywords", {}) - outbound_count = outbound_keywords.get("*", 0) - obs["NMNE"]["inbound"] = self._categorise_mne_count(inbound_count - self.nmne_inbound_last_step) - obs["NMNE"]["outbound"] = self._categorise_mne_count(outbound_count - self.nmne_outbound_last_step) - self.nmne_inbound_last_step = inbound_count - self.nmne_outbound_last_step = outbound_count - return obs - - @property - def space(self) -> spaces.Space: - """ - Gymnasium space object describing the observation space shape. - - :return: Gymnasium space representing the observation space for network interface status and NMNE information. - :rtype: spaces.Space - """ - space = spaces.Dict({"nic_status": spaces.Discrete(3)}) - - if self.include_nmne: - space["NMNE"] = spaces.Dict({"inbound": spaces.Discrete(4), "outbound": spaces.Discrete(4)}) - - return space - - @classmethod - def from_config(cls, config: ConfigSchema, parent_where: WhereType = []) -> NICObservation: - """ - Create a network interface observation from a configuration schema. - - :param config: Configuration schema containing the necessary information for the network interface observation. - :type config: ConfigSchema - :param parent_where: Where in the simulation state dictionary to find the information about this NIC's - parent node. A typical location for a node might be ['network', 'nodes', ]. - :type parent_where: WhereType, optional - :return: Constructed network interface observation instance. - :rtype: NICObservation - """ - return cls(where=parent_where + ["NICs", config.nic_num], include_nmne=config.include_nmne) - - -class HostObservation(AbstractObservation, identifier="HOST"): - """Host observation, provides status information about a host within the simulation environment.""" - - class ConfigSchema(AbstractObservation.ConfigSchema): - """Configuration schema for HostObservation.""" - - hostname: str - """Hostname of the host, used for querying simulation state dictionary.""" - services: List[ServiceObservation.ConfigSchema] = [] - """List of services to observe on the host.""" - applications: List[ApplicationObservation.ConfigSchema] = [] - """List of applications to observe on the host.""" - folders: List[FolderObservation.ConfigSchema] = [] - """List of folders to observe on the host.""" - network_interfaces: List[NICObservation.ConfigSchema] = [] - """List of network interfaces to observe on the host.""" - num_services: Optional[int] = None - """Number of spaces for service observations on this host.""" - num_applications: Optional[int] = None - """Number of spaces for application observations on this host.""" - num_folders: Optional[int] = None - """Number of spaces for folder observations on this host.""" - num_files: Optional[int] = None - """Number of spaces for file observations on this host.""" - num_nics: Optional[int] = None - """Number of spaces for network interface observations on this host.""" - include_nmne: Optional[bool] = None - """Whether network interface observations should include number of malicious network events.""" - include_num_access: Optional[bool] = None - """Whether to include the number of accesses to files observations on this host.""" - - def __init__( - self, - where: WhereType, - services: List[ServiceObservation], - applications: List[ApplicationObservation], - folders: List[FolderObservation], - network_interfaces: List[NICObservation], - num_services: int, - num_applications: int, - num_folders: int, - num_files: int, - num_nics: int, - include_nmne: bool, - include_num_access: bool, - ) -> None: - """ - Initialize a host observation instance. - - :param where: Where in the simulation state dictionary to find the relevant information for this host. - A typical location for a host might be ['network', 'nodes', ]. - :type where: WhereType - :param services: List of service observations on the host. - :type services: List[ServiceObservation] - :param applications: List of application observations on the host. - :type applications: List[ApplicationObservation] - :param folders: List of folder observations on the host. - :type folders: List[FolderObservation] - :param network_interfaces: List of network interface observations on the host. - :type network_interfaces: List[NICObservation] - :param num_services: Number of services to observe. - :type num_services: int - :param num_applications: Number of applications to observe. - :type num_applications: int - :param num_folders: Number of folders to observe. - :type num_folders: int - :param num_files: Number of files. - :type num_files: int - :param num_nics: Number of network interfaces. - :type num_nics: int - :param include_nmne: Flag to include network metrics and errors. - :type include_nmne: bool - :param include_num_access: Flag to include the number of accesses to files. - :type include_num_access: bool - """ - self.where: WhereType = where - - # Ensure lists have lengths equal to specified counts by truncating or padding - self.services: List[ServiceObservation] = services - while len(self.services) < num_services: - self.services.append(ServiceObservation(where=None)) - while len(self.services) > num_services: - truncated_service = self.services.pop() - msg = f"Too many services in Node observation space for node. Truncating service {truncated_service.where}" - _LOGGER.warning(msg) - - self.applications: List[ApplicationObservation] = applications - while len(self.applications) < num_applications: - self.applications.append(ApplicationObservation(where=None)) - while len(self.applications) > num_applications: - truncated_application = self.applications.pop() - msg = f"Too many applications in Node observation space for node. Truncating {truncated_application.where}" - _LOGGER.warning(msg) - - self.folders: List[FolderObservation] = folders - while len(self.folders) < num_folders: - self.folders.append( - FolderObservation(where=None, files=[], num_files=num_files, include_num_access=include_num_access) - ) - while len(self.folders) > num_folders: - truncated_folder = self.folders.pop() - msg = f"Too many folders in Node observation space for node. Truncating folder {truncated_folder.where}" - _LOGGER.warning(msg) - - self.network_interfaces: List[NICObservation] = network_interfaces - while len(self.network_interfaces) < num_nics: - self.network_interfaces.append(NICObservation(where=None, include_nmne=include_nmne)) - while len(self.network_interfaces) > num_nics: - truncated_nic = self.network_interfaces.pop() - msg = f"Too many network_interfaces in Node observation space for node. Truncating {truncated_nic.where}" - _LOGGER.warning(msg) - - self.default_observation: ObsType = { - "SERVICES": {i + 1: s.default_observation for i, s in enumerate(self.services)}, - "APPLICATIONS": {i + 1: a.default_observation for i, a in enumerate(self.applications)}, - "FOLDERS": {i + 1: f.default_observation for i, f in enumerate(self.folders)}, - "NICS": {i + 1: n.default_observation for i, n in enumerate(self.network_interfaces)}, - "operating_status": 0, - "num_file_creations": 0, - "num_file_deletions": 0, - } - - def observe(self, state: Dict) -> Any: - """ - Generate observation based on the current state of the simulation. - - :param state: Simulation state dictionary. - :type state: Dict - :return: Observation containing the status information about the host. - :rtype: Any - """ - node_state = access_from_nested_dict(state, self.where) - if node_state is NOT_PRESENT_IN_STATE: - return self.default_observation - - obs = {} - obs["SERVICES"] = {i + 1: service.observe(state) for i, service in enumerate(self.services)} - obs["APPLICATIONS"] = {i + 1: app.observe(state) for i, app in enumerate(self.applications)} - obs["FOLDERS"] = {i + 1: folder.observe(state) for i, folder in enumerate(self.folders)} - obs["operating_status"] = node_state["operating_state"] - obs["NICS"] = { - i + 1: network_interface.observe(state) for i, network_interface in enumerate(self.network_interfaces) - } - obs["num_file_creations"] = node_state["file_system"]["num_file_creations"] - obs["num_file_deletions"] = node_state["file_system"]["num_file_deletions"] - return obs - - @property - def space(self) -> spaces.Space: - """ - Gymnasium space object describing the observation space shape. - - :return: Gymnasium space representing the observation space for host status. - :rtype: spaces.Space - """ - shape = { - "SERVICES": spaces.Dict({i + 1: service.space for i, service in enumerate(self.services)}), - "APPLICATIONS": spaces.Dict({i + 1: app.space for i, app in enumerate(self.applications)}), - "FOLDERS": spaces.Dict({i + 1: folder.space for i, folder in enumerate(self.folders)}), - "operating_status": spaces.Discrete(5), - "NICS": spaces.Dict( - {i + 1: network_interface.space for i, network_interface in enumerate(self.network_interfaces)} - ), - "num_file_creations": spaces.Discrete(4), - "num_file_deletions": spaces.Discrete(4), - } - return spaces.Dict(shape) - - @classmethod - def from_config(cls, config: ConfigSchema, parent_where: WhereType = None) -> HostObservation: - """ - Create a host observation from a configuration schema. - - :param config: Configuration schema containing the necessary information for the host observation. - :type config: ConfigSchema - :param parent_where: Where in the simulation state dictionary to find the information about this host. - A typical location might be ['network', 'nodes', ]. - :type parent_where: WhereType, optional - :return: Constructed host observation instance. - :rtype: HostObservation - """ - if parent_where is None: - where = ["network", "nodes", config.hostname] - else: - where = parent_where + ["nodes", config.hostname] - - # Pass down shared/common config items - for folder_config in config.folders: - folder_config.include_num_access = config.include_num_access - folder_config.num_files = config.num_files - for nic_config in config.network_interfaces: - nic_config.include_nmne = config.include_nmne - - services = [ServiceObservation.from_config(config=c, parent_where=where) for c in config.services] - applications = [ApplicationObservation.from_config(config=c, parent_where=where) for c in config.applications] - folders = [FolderObservation.from_config(config=c, parent_where=where) for c in config.folders] - nics = [NICObservation.from_config(config=c, parent_where=where) for c in config.network_interfaces] - - return cls( - where=where, - services=services, - applications=applications, - folders=folders, - network_interfaces=nics, - num_services=config.num_services, - num_applications=config.num_applications, - num_folders=config.num_folders, - num_files=config.num_files, - num_nics=config.num_nics, - include_nmne=config.include_nmne, - include_num_access=config.include_num_access, - ) - - -class PortObservation(AbstractObservation, identifier="PORT"): - """Port observation, provides status information about a network port within the simulation environment.""" - - class ConfigSchema(AbstractObservation.ConfigSchema): - """Configuration schema for PortObservation.""" - - port_id: int - """Identifier of the port, used for querying simulation state dictionary.""" - - def __init__(self, where: WhereType) -> None: - """ - Initialize a port observation instance. - - :param where: Where in the simulation state dictionary to find the relevant information for this port. - A typical location for a port might be ['network', 'nodes', , 'NICs', ]. - :type where: WhereType - """ - self.where = where - self.default_observation: ObsType = {"operating_status": 0} - - def observe(self, state: Dict) -> Any: - """ - Generate observation based on the current state of the simulation. - - :param state: Simulation state dictionary. - :type state: Dict - :return: Observation containing the operating status of the port. - :rtype: Any - """ - port_state = access_from_nested_dict(state, self.where) - if port_state is NOT_PRESENT_IN_STATE: - return self.default_observation - return {"operating_status": 1 if port_state["enabled"] else 2} - - @property - def space(self) -> spaces.Space: - """ - Gymnasium space object describing the observation space shape. - - :return: Gymnasium space representing the observation space for port status. - :rtype: spaces.Space - """ - return spaces.Dict({"operating_status": spaces.Discrete(3)}) - - @classmethod - def from_config(cls, config: ConfigSchema, parent_where: WhereType = []) -> PortObservation: - """ - Create a port observation from a configuration schema. - - :param config: Configuration schema containing the necessary information for the port observation. - :type config: ConfigSchema - :param parent_where: Where in the simulation state dictionary to find the information about this port's - parent node. A typical location for a node might be ['network', 'nodes', ]. - :type parent_where: WhereType, optional - :return: Constructed port observation instance. - :rtype: PortObservation - """ - return cls(where=parent_where + ["NICs", config.port_id]) - - -class ACLObservation(AbstractObservation, identifier="ACL"): - """ACL observation, provides information about access control lists within the simulation environment.""" - - class ConfigSchema(AbstractObservation.ConfigSchema): - """Configuration schema for ACLObservation.""" - - ip_list: Optional[List[IPv4Address]] = None - """List of IP addresses.""" - wildcard_list: Optional[List[str]] = None - """List of wildcard strings.""" - port_list: Optional[List[int]] = None - """List of port numbers.""" - protocol_list: Optional[List[str]] = None - """List of protocol names.""" - num_rules: Optional[int] = None - """Number of ACL rules.""" - - def __init__( - self, - where: WhereType, - num_rules: int, - ip_list: List[IPv4Address], - wildcard_list: List[str], - port_list: List[int], - protocol_list: List[str], - ) -> None: - """ - Initialize an ACL observation instance. - - :param where: Where in the simulation state dictionary to find the relevant information for this ACL. - :type where: WhereType - :param num_rules: Number of ACL rules. - :type num_rules: int - :param ip_list: List of IP addresses. - :type ip_list: List[IPv4Address] - :param wildcard_list: List of wildcard strings. - :type wildcard_list: List[str] - :param port_list: List of port numbers. - :type port_list: List[int] - :param protocol_list: List of protocol names. - :type protocol_list: List[str] - """ - self.where = where - self.num_rules: int = num_rules - self.ip_to_id: Dict[str, int] = {i + 2: p for i, p in enumerate(ip_list)} - self.wildcard_to_id: Dict[str, int] = {i + 2: p for i, p in enumerate(wildcard_list)} - self.port_to_id: Dict[int, int] = {i + 2: p for i, p in enumerate(port_list)} - self.protocol_to_id: Dict[str, int] = {i + 2: p for i, p in enumerate(protocol_list)} - self.default_observation: Dict = { - i - + 1: { - "position": i, - "permission": 0, - "source_ip_id": 0, - "source_wildcard_id": 0, - "source_port_id": 0, - "dest_ip_id": 0, - "dest_wildcard_id": 0, - "dest_port_id": 0, - "protocol_id": 0, - } - for i in range(self.num_rules) - } - - def observe(self, state: Dict) -> Any: - """ - Generate observation based on the current state of the simulation. - - :param state: Simulation state dictionary. - :type state: Dict - :return: Observation containing ACL rules. - :rtype: Any - """ - acl_state: Dict = access_from_nested_dict(state, self.where) - if acl_state is NOT_PRESENT_IN_STATE: - return self.default_observation - obs = {} - acl_items = dict(acl_state.items()) - i = 1 # don't show rule 0 for compatibility reasons. - while i < self.num_rules + 1: - rule_state = acl_items[i] - if rule_state is None: - obs[i] = { - "position": i - 1, - "permission": 0, - "source_ip_id": 0, - "source_wildcard_id": 0, - "source_port_id": 0, - "dest_ip_id": 0, - "dest_wildcard_id": 0, - "dest_port_id": 0, - "protocol_id": 0, - } - else: - src_ip = rule_state["src_ip_address"] - src_node_id = self.ip_to_id.get(src_ip, 1) - dst_ip = rule_state["dst_ip_address"] - dst_node_ip = self.ip_to_id.get(dst_ip, 1) - src_wildcard = rule_state["source_wildcard_id"] - src_wildcard_id = self.wildcard_to_id.get(src_wildcard, 1) - dst_wildcard = rule_state["dest_wildcard_id"] - dst_wildcard_id = self.wildcard_to_id.get(dst_wildcard, 1) - src_port = rule_state["source_port_id"] - src_port_id = self.port_to_id.get(src_port, 1) - dst_port = rule_state["dest_port_id"] - dst_port_id = self.port_to_id.get(dst_port, 1) - protocol = rule_state["protocol"] - protocol_id = self.protocol_to_id.get(protocol, 1) - obs[i] = { - "position": i - 1, - "permission": rule_state["action"], - "source_ip_id": src_node_id, - "source_wildcard_id": src_wildcard_id, - "source_port_id": src_port_id, - "dest_ip_id": dst_node_ip, - "dest_wildcard_id": dst_wildcard_id, - "dest_port_id": dst_port_id, - "protocol_id": protocol_id, - } - i += 1 - return obs - - @property - def space(self) -> spaces.Space: - """ - Gymnasium space object describing the observation space shape. - - :return: Gymnasium space representing the observation space for ACL rules. - :rtype: spaces.Space - """ - return spaces.Dict( - { - i - + 1: spaces.Dict( - { - "position": spaces.Discrete(self.num_rules), - "permission": spaces.Discrete(3), - # adding two to lengths is to account for reserved values 0 (unused) and 1 (any) - "source_ip_id": spaces.Discrete(len(self.ip_to_id) + 2), - "source_wildcard_id": spaces.Discrete(len(self.wildcard_to_id) + 2), - "source_port_id": spaces.Discrete(len(self.port_to_id) + 2), - "dest_ip_id": spaces.Discrete(len(self.ip_to_id) + 2), - "dest_wildcard_id": spaces.Discrete(len(self.wildcard_to_id) + 2), - "dest_port_id": spaces.Discrete(len(self.port_to_id) + 2), - "protocol_id": spaces.Discrete(len(self.protocol_to_id) + 2), - } - ) - for i in range(self.num_rules) - } - ) - - @classmethod - def from_config(cls, config: ConfigSchema, parent_where: WhereType = []) -> ACLObservation: - """ - Create an ACL observation from a configuration schema. - - :param config: Configuration schema containing the necessary information for the ACL observation. - :type config: ConfigSchema - :param parent_where: Where in the simulation state dictionary to find the information about this ACL's - parent node. A typical location for a node might be ['network', 'nodes', ]. - :type parent_where: WhereType, optional - :return: Constructed ACL observation instance. - :rtype: ACLObservation - """ - return cls( - where=parent_where + ["acl", "acl"], - num_rules=config.num_rules, - ip_list=config.ip_list, - wildcard_list=config.wildcard_list, - port_list=config.port_list, - protocol_list=config.protocol_list, - ) - - -class RouterObservation(AbstractObservation, identifier="ROUTER"): - """Router observation, provides status information about a router within the simulation environment.""" - - class ConfigSchema(AbstractObservation.ConfigSchema): - """Configuration schema for RouterObservation.""" - - hostname: str - """Hostname of the router, used for querying simulation state dictionary.""" - ports: Optional[List[PortObservation.ConfigSchema]] = None - """Configuration of port observations for this router.""" - num_ports: Optional[int] = None - """Number of port observations configured for this router.""" - acl: Optional[ACLObservation.ConfigSchema] = None - """Configuration of ACL observation on this router.""" - ip_list: Optional[List[str]] = None - """List of IP addresses for encoding ACLs.""" - wildcard_list: Optional[List[str]] = None - """List of IP wildcards for encoding ACLs.""" - port_list: Optional[List[int]] = None - """List of ports for encoding ACLs.""" - protocol_list: Optional[List[str]] = None - """List of protocols for encoding ACLs.""" - num_rules: Optional[int] = None - """Number of rules ACL rules to show.""" - - def __init__( - self, - where: WhereType, - ports: List[PortObservation], - num_ports: int, - acl: ACLObservation, - ) -> None: - """ - Initialize a router observation instance. - - :param where: Where in the simulation state dictionary to find the relevant information for this router. - A typical location for a router might be ['network', 'nodes', ]. - :type where: WhereType - :param ports: List of port observations representing the ports of the router. - :type ports: List[PortObservation] - :param num_ports: Number of ports for the router. - :type num_ports: int - :param acl: ACL observation representing the access control list of the router. - :type acl: ACLObservation - """ - self.where: WhereType = where - self.ports: List[PortObservation] = ports - self.acl: ACLObservation = acl - self.num_ports: int = num_ports - - while len(self.ports) < num_ports: - self.ports.append(PortObservation(where=None)) - while len(self.ports) > num_ports: - self.ports.pop() - msg = "Too many ports in router observation. Truncating." - _LOGGER.warning(msg) - - self.default_observation = { - "PORTS": {i + 1: p.default_observation for i, p in enumerate(self.ports)}, - "ACL": self.acl.default_observation, - } - - def observe(self, state: Dict) -> Any: - """ - Generate observation based on the current state of the simulation. - - :param state: Simulation state dictionary. - :type state: Dict - :return: Observation containing the status of ports and ACL configuration of the router. - :rtype: Any - """ - router_state = access_from_nested_dict(state, self.where) - if router_state is NOT_PRESENT_IN_STATE: - return self.default_observation - - obs = {} - obs["PORTS"] = {i + 1: p.observe(state) for i, p in enumerate(self.ports)} - obs["ACL"] = self.acl.observe(state) - return obs - - @property - def space(self) -> spaces.Space: - """ - Gymnasium space object describing the observation space shape. - - :return: Gymnasium space representing the observation space for router status. - :rtype: spaces.Space - """ - return spaces.Dict( - {"PORTS": spaces.Dict({i + 1: p.space for i, p in enumerate(self.ports)}), "ACL": self.acl.space} - ) - - @classmethod - def from_config(cls, config: ConfigSchema, parent_where: WhereType = []) -> RouterObservation: - """ - Create a router observation from a configuration schema. - - :param config: Configuration schema containing the necessary information for the router observation. - :type config: ConfigSchema - :param parent_where: Where in the simulation state dictionary to find the information about this router's - parent node. A typical location for a node might be ['network', 'nodes', ]. - :type parent_where: WhereType, optional - :return: Constructed router observation instance. - :rtype: RouterObservation - """ - where = parent_where + ["nodes", config.hostname] - - if config.acl is None: - config.acl = ACLObservation.ConfigSchema() - if config.acl.num_rules is None: - config.acl.num_rules = config.num_rules - if config.acl.ip_list is None: - config.acl.ip_list = config.ip_list - if config.acl.wildcard_list is None: - config.acl.wildcard_list = config.wildcard_list - if config.acl.port_list is None: - config.acl.port_list = config.port_list - if config.acl.protocol_list is None: - config.acl.protocol_list = config.protocol_list - - if config.ports is None: - config.ports = [PortObservation.ConfigSchema(port_id=i + 1) for i in range(config.num_ports)] - - ports = [PortObservation.from_config(config=c, parent_where=where) for c in config.ports] - acl = ACLObservation.from_config(config=config.acl, parent_where=where) - return cls(where=where, ports=ports, num_ports=config.num_ports, acl=acl) - - -class FirewallObservation(AbstractObservation, identifier="FIREWALL"): - """Firewall observation, provides status information about a firewall within the simulation environment.""" - - class ConfigSchema(AbstractObservation.ConfigSchema): - """Configuration schema for FirewallObservation.""" - - hostname: str - """Hostname of the firewall node, used for querying simulation state dictionary.""" - ip_list: Optional[List[str]] = None - """List of IP addresses for encoding ACLs.""" - wildcard_list: Optional[List[str]] = None - """List of IP wildcards for encoding ACLs.""" - port_list: Optional[List[int]] = None - """List of ports for encoding ACLs.""" - protocol_list: Optional[List[str]] = None - """List of protocols for encoding ACLs.""" - num_rules: Optional[int] = None - """Number of rules ACL rules to show.""" - - def __init__( - self, - where: WhereType, - ip_list: List[str], - wildcard_list: List[str], - port_list: List[int], - protocol_list: List[str], - num_rules: int, - ) -> None: - """ - Initialize a firewall observation instance. - - :param where: Where in the simulation state dictionary to find the relevant information for this firewall. - A typical location for a firewall might be ['network', 'nodes', ]. - :type where: WhereType - :param ip_list: List of IP addresses. - :type ip_list: List[str] - :param wildcard_list: List of wildcard rules. - :type wildcard_list: List[str] - :param port_list: List of port numbers. - :type port_list: List[int] - :param protocol_list: List of protocol types. - :type protocol_list: List[str] - :param num_rules: Number of rules configured in the firewall. - :type num_rules: int - """ - self.where: WhereType = where - - self.ports: List[PortObservation] = [ - PortObservation(where=self.where + ["port", port_num]) for port_num in (1, 2, 3) - ] - # TODO: check what the port nums are for firewall. - - self.internal_inbound_acl = ACLObservation( - where=self.where + ["acl", "internal", "inbound"], - num_rules=num_rules, - ip_list=ip_list, - wildcard_list=wildcard_list, - port_list=port_list, - protocol_list=protocol_list, - ) - self.internal_outbound_acl = ACLObservation( - where=self.where + ["acl", "internal", "outbound"], - num_rules=num_rules, - ip_list=ip_list, - wildcard_list=wildcard_list, - port_list=port_list, - protocol_list=protocol_list, - ) - self.dmz_inbound_acl = ACLObservation( - where=self.where + ["acl", "dmz", "inbound"], - num_rules=num_rules, - ip_list=ip_list, - wildcard_list=wildcard_list, - port_list=port_list, - protocol_list=protocol_list, - ) - self.dmz_outbound_acl = ACLObservation( - where=self.where + ["acl", "dmz", "outbound"], - num_rules=num_rules, - ip_list=ip_list, - wildcard_list=wildcard_list, - port_list=port_list, - protocol_list=protocol_list, - ) - self.external_inbound_acl = ACLObservation( - where=self.where + ["acl", "external", "inbound"], - num_rules=num_rules, - ip_list=ip_list, - wildcard_list=wildcard_list, - port_list=port_list, - protocol_list=protocol_list, - ) - self.external_outbound_acl = ACLObservation( - where=self.where + ["acl", "external", "outbound"], - num_rules=num_rules, - ip_list=ip_list, - wildcard_list=wildcard_list, - port_list=port_list, - protocol_list=protocol_list, - ) - - self.default_observation = { - "PORTS": {i + 1: p.default_observation for i, p in enumerate(self.ports)}, - "INTERNAL": { - "INBOUND": self.internal_inbound_acl.default_observation, - "OUTBOUND": self.internal_outbound_acl.default_observation, - }, - "DMZ": { - "INBOUND": self.dmz_inbound_acl.default_observation, - "OUTBOUND": self.dmz_outbound_acl.default_observation, - }, - "EXTERNAL": { - "INBOUND": self.external_inbound_acl.default_observation, - "OUTBOUND": self.external_outbound_acl.default_observation, - }, - } - - def observe(self, state: Dict) -> Any: - """ - Generate observation based on the current state of the simulation. - - :param state: Simulation state dictionary. - :type state: Dict - :return: Observation containing the status of ports and ACLs for internal, DMZ, and external traffic. - :rtype: Any - """ - obs = { - "PORTS": {i + 1: p.observe(state) for i, p in enumerate(self.ports)}, - "INTERNAL": { - "INBOUND": self.internal_inbound_acl.observe(state), - "OUTBOUND": self.internal_outbound_acl.observe(state), - }, - "DMZ": { - "INBOUND": self.dmz_inbound_acl.observe(state), - "OUTBOUND": self.dmz_outbound_acl.observe(state), - }, - "EXTERNAL": { - "INBOUND": self.external_inbound_acl.observe(state), - "OUTBOUND": self.external_outbound_acl.observe(state), - }, - } - return obs - - @property - def space(self) -> spaces.Space: - """ - Gymnasium space object describing the observation space shape. - - :return: Gymnasium space representing the observation space for firewall status. - :rtype: spaces.Space - """ - space = spaces.Dict( - { - "PORTS": spaces.Dict({i + 1: p.space for i, p in enumerate(self.ports)}), - "INTERNAL": spaces.Dict( - { - "INBOUND": self.internal_inbound_acl.space, - "OUTBOUND": self.internal_outbound_acl.space, - } - ), - "DMZ": spaces.Dict( - { - "INBOUND": self.dmz_inbound_acl.space, - "OUTBOUND": self.dmz_outbound_acl.space, - } - ), - "EXTERNAL": spaces.Dict( - { - "INBOUND": self.external_inbound_acl.space, - "OUTBOUND": self.external_outbound_acl.space, - } - ), - } - ) - return space - - @classmethod - def from_config(cls, config: ConfigSchema, parent_where: WhereType = []) -> FirewallObservation: - """ - Create a firewall observation from a configuration schema. - - :param config: Configuration schema containing the necessary information for the firewall observation. - :type config: ConfigSchema - :param parent_where: Where in the simulation state dictionary to find the information about this firewall's - parent node. A typical location for a node might be ['network', 'nodes', ]. - :type parent_where: WhereType, optional - :return: Constructed firewall observation instance. - :rtype: FirewallObservation - """ - where = parent_where + ["nodes", config.hostname] - return cls( - where=where, - ip_list=config.ip_list, - wildcard_list=config.wildcard_list, - port_list=config.port_list, - protocol_list=config.protocol_list, - num_rules=config.num_rules, - ) - class NodesObservation(AbstractObservation, identifier="NODES"): """Nodes observation, provides status information about nodes within the simulation environment.""" @@ -1266,14 +85,14 @@ class NodesObservation(AbstractObservation, identifier="NODES"): **{f"FIREWALL{i}": firewall.default_observation for i, firewall in enumerate(self.firewalls)}, } - def observe(self, state: Dict) -> Any: + def observe(self, state: Dict) -> ObsType: """ Generate observation based on the current state of the simulation. :param state: Simulation state dictionary. :type state: Dict :return: Observation containing status information about nodes. - :rtype: Any + :rtype: ObsType """ obs = { **{f"HOST{i}": host.observe(state) for i, host in enumerate(self.hosts)}, @@ -1300,7 +119,7 @@ class NodesObservation(AbstractObservation, identifier="NODES"): return space @classmethod - def from_config(cls, config: ConfigSchema, parent_where: WhereType = []) -> ServiceObservation: + def from_config(cls, config: ConfigSchema, parent_where: WhereType = []) -> NodesObservation: """ Create a nodes observation from a configuration schema. diff --git a/src/primaite/game/agent/observations/observations.py b/src/primaite/game/agent/observations/observations.py index dc41e8e5..08871072 100644 --- a/src/primaite/game/agent/observations/observations.py +++ b/src/primaite/game/agent/observations/observations.py @@ -1,24 +1,23 @@ """Manages the observation space for the agent.""" from abc import ABC, abstractmethod -from ipaddress import IPv4Address -from typing import Any, Dict, List, Optional, Tuple, TYPE_CHECKING, Type +from typing import Any, Dict, Iterable, Type from gymnasium import spaces from pydantic import BaseModel, ConfigDict from primaite import getLogger -from primaite.game.agent.utils import access_from_nested_dict, NOT_PRESENT_IN_STATE _LOGGER = getLogger(__name__) -if TYPE_CHECKING: - from primaite.game.game import PrimaiteGame +WhereType = Iterable[str | int] | None class AbstractObservation(ABC): """Abstract class for an observation space component.""" class ConfigSchema(ABC, BaseModel): + """Config schema for observations.""" + model_config = ConfigDict(extra="forbid") _registry: Dict[str, Type["AbstractObservation"]] = {} @@ -61,269 +60,271 @@ class AbstractObservation(ABC): @classmethod def from_config(cls, cfg: Dict) -> "AbstractObservation": """Create this observation space component form a serialised format.""" - ObservationType = cls._registry[cfg['type']] + ObservationType = cls._registry[cfg["type"]] return ObservationType.from_config(cfg=cfg) -# class LinkObservation(AbstractObservation): -# """Observation of a link in the network.""" +''' +class LinkObservation(AbstractObservation): + """Observation of a link in the network.""" -# default_observation: spaces.Space = {"PROTOCOLS": {"ALL": 0}} -# "Default observation is what should be returned when the link doesn't exist." + default_observation: spaces.Space = {"PROTOCOLS": {"ALL": 0}} + "Default observation is what should be returned when the link doesn't exist." -# def __init__(self, where: Optional[Tuple[str]] = None) -> None: -# """Initialise link observation. + def __init__(self, where: Optional[Tuple[str]] = None) -> None: + """Initialise link observation. -# :param where: Store information about where in the simulation state dictionary to find the relevant information. -# Optional. If None, this corresponds that the file does not exist and the observation will be populated with -# zeroes. + :param where: Store information about where in the simulation state dictionary to find the relevant information. + Optional. If None, this corresponds that the file does not exist and the observation will be populated with + zeroes. -# A typical location for a service looks like this: -# `['network','nodes',,'servics', ]` -# :type where: Optional[List[str]] -# """ -# super().__init__() -# self.where: Optional[Tuple[str]] = where + A typical location for a service looks like this: + `['network','nodes',,'servics', ]` + :type where: Optional[List[str]] + """ + super().__init__() + self.where: Optional[Tuple[str]] = where -# def observe(self, state: Dict) -> Dict: -# """Generate observation based on the current state of the simulation. + def observe(self, state: Dict) -> Dict: + """Generate observation based on the current state of the simulation. -# :param state: Simulation state dictionary -# :type state: Dict -# :return: Observation -# :rtype: Dict -# """ -# if self.where is None: -# return self.default_observation + :param state: Simulation state dictionary + :type state: Dict + :return: Observation + :rtype: Dict + """ + if self.where is None: + return self.default_observation -# link_state = access_from_nested_dict(state, self.where) -# if link_state is NOT_PRESENT_IN_STATE: -# return self.default_observation + link_state = access_from_nested_dict(state, self.where) + if link_state is NOT_PRESENT_IN_STATE: + return self.default_observation -# bandwidth = link_state["bandwidth"] -# load = link_state["current_load"] -# if load == 0: -# utilisation_category = 0 -# else: -# utilisation_fraction = load / bandwidth -# # 0 is UNUSED, 1 is 0%-10%. 2 is 10%-20%. 3 is 20%-30%. And so on... 10 is exactly 100% -# utilisation_category = int(utilisation_fraction * 9) + 1 + bandwidth = link_state["bandwidth"] + load = link_state["current_load"] + if load == 0: + utilisation_category = 0 + else: + utilisation_fraction = load / bandwidth + # 0 is UNUSED, 1 is 0%-10%. 2 is 10%-20%. 3 is 20%-30%. And so on... 10 is exactly 100% + utilisation_category = int(utilisation_fraction * 9) + 1 -# # TODO: once the links support separte load per protocol, this needs amendment to reflect that. -# return {"PROTOCOLS": {"ALL": min(utilisation_category, 10)}} + # TODO: once the links support separte load per protocol, this needs amendment to reflect that. + return {"PROTOCOLS": {"ALL": min(utilisation_category, 10)}} -# @property -# def space(self) -> spaces.Space: -# """Gymnasium space object describing the observation space shape. + @property + def space(self) -> spaces.Space: + """Gymnasium space object describing the observation space shape. -# :return: Gymnasium space -# :rtype: spaces.Space -# """ -# return spaces.Dict({"PROTOCOLS": spaces.Dict({"ALL": spaces.Discrete(11)})}) + :return: Gymnasium space + :rtype: spaces.Space + """ + return spaces.Dict({"PROTOCOLS": spaces.Dict({"ALL": spaces.Discrete(11)})}) -# @classmethod -# def from_config(cls, config: Dict, game: "PrimaiteGame") -> "LinkObservation": -# """Create link observation from a config. + @classmethod + def from_config(cls, config: Dict, game: "PrimaiteGame") -> "LinkObservation": + """Create link observation from a config. -# :param config: Dictionary containing the configuration for this link observation. -# :type config: Dict -# :param game: Reference to the PrimaiteGame object that spawned this observation. -# :type game: PrimaiteGame -# :return: Constructed link observation -# :rtype: LinkObservation -# """ -# return cls(where=["network", "links", game.ref_map_links[config["link_ref"]]]) + :param config: Dictionary containing the configuration for this link observation. + :type config: Dict + :param game: Reference to the PrimaiteGame object that spawned this observation. + :type game: PrimaiteGame + :return: Constructed link observation + :rtype: LinkObservation + """ + return cls(where=["network", "links", game.ref_map_links[config["link_ref"]]]) -# class AclObservation(AbstractObservation): -# """Observation of an Access Control List (ACL) in the network.""" +class AclObservation(AbstractObservation): + """Observation of an Access Control List (ACL) in the network.""" -# # TODO: should where be optional, and we can use where=None to pad the observation space? -# # definitely the current approach does not support tracking files that aren't specified by name, for example -# # if a file is created at runtime, we have currently got no way of telling the observation space to track it. -# # this needs adding, but not for the MVP. -# def __init__( -# self, -# node_ip_to_id: Dict[str, int], -# ports: List[int], -# protocols: List[str], -# where: Optional[Tuple[str]] = None, -# num_rules: int = 10, -# ) -> None: -# """Initialise ACL observation. + # TODO: should where be optional, and we can use where=None to pad the observation space? + # definitely the current approach does not support tracking files that aren't specified by name, for example + # if a file is created at runtime, we have currently got no way of telling the observation space to track it. + # this needs adding, but not for the MVP. + def __init__( + self, + node_ip_to_id: Dict[str, int], + ports: List[int], + protocols: List[str], + where: Optional[Tuple[str]] = None, + num_rules: int = 10, + ) -> None: + """Initialise ACL observation. -# :param node_ip_to_id: Mapping between IP address and ID. -# :type node_ip_to_id: Dict[str, int] -# :param ports: List of ports which are part of the game that define the ordering when converting to an ID -# :type ports: List[int] -# :param protocols: List of protocols which are part of the game, defines ordering when converting to an ID -# :type protocols: list[str] -# :param where: Where in the simulation state dictionary to find the relevant information for this ACL. A typical -# example may look like this: -# ['network','nodes',,'acl','acl'] -# :type where: Optional[Tuple[str]], optional -# :param num_rules: , defaults to 10 -# :type num_rules: int, optional -# """ -# super().__init__() -# self.where: Optional[Tuple[str]] = where -# self.num_rules: int = num_rules -# self.node_to_id: Dict[str, int] = node_ip_to_id -# "List of node IP addresses, order in this list determines how they are converted to an ID" -# self.port_to_id: Dict[int, int] = {port: i + 2 for i, port in enumerate(ports)} -# "List of ports which are part of the game that define the ordering when converting to an ID" -# self.protocol_to_id: Dict[str, int] = {protocol: i + 2 for i, protocol in enumerate(protocols)} -# "List of protocols which are part of the game, defines ordering when converting to an ID" -# self.default_observation: Dict = { -# i -# + 1: { -# "position": i, -# "permission": 0, -# "source_node_id": 0, -# "source_port": 0, -# "dest_node_id": 0, -# "dest_port": 0, -# "protocol": 0, -# } -# for i in range(self.num_rules) -# } + :param node_ip_to_id: Mapping between IP address and ID. + :type node_ip_to_id: Dict[str, int] + :param ports: List of ports which are part of the game that define the ordering when converting to an ID + :type ports: List[int] + :param protocols: List of protocols which are part of the game, defines ordering when converting to an ID + :type protocols: list[str] + :param where: Where in the simulation state dictionary to find the relevant information for this ACL. A typical + example may look like this: + ['network','nodes',,'acl','acl'] + :type where: Optional[Tuple[str]], optional + :param num_rules: , defaults to 10 + :type num_rules: int, optional + """ + super().__init__() + self.where: Optional[Tuple[str]] = where + self.num_rules: int = num_rules + self.node_to_id: Dict[str, int] = node_ip_to_id + "List of node IP addresses, order in this list determines how they are converted to an ID" + self.port_to_id: Dict[int, int] = {port: i + 2 for i, port in enumerate(ports)} + "List of ports which are part of the game that define the ordering when converting to an ID" + self.protocol_to_id: Dict[str, int] = {protocol: i + 2 for i, protocol in enumerate(protocols)} + "List of protocols which are part of the game, defines ordering when converting to an ID" + self.default_observation: Dict = { + i + + 1: { + "position": i, + "permission": 0, + "source_node_id": 0, + "source_port": 0, + "dest_node_id": 0, + "dest_port": 0, + "protocol": 0, + } + for i in range(self.num_rules) + } -# def observe(self, state: Dict) -> Dict: -# """Generate observation based on the current state of the simulation. + def observe(self, state: Dict) -> Dict: + """Generate observation based on the current state of the simulation. -# :param state: Simulation state dictionary -# :type state: Dict -# :return: Observation -# :rtype: Dict -# """ -# if self.where is None: -# return self.default_observation -# acl_state: Dict = access_from_nested_dict(state, self.where) -# if acl_state is NOT_PRESENT_IN_STATE: -# return self.default_observation + :param state: Simulation state dictionary + :type state: Dict + :return: Observation + :rtype: Dict + """ + if self.where is None: + return self.default_observation + acl_state: Dict = access_from_nested_dict(state, self.where) + if acl_state is NOT_PRESENT_IN_STATE: + return self.default_observation -# # TODO: what if the ACL has more rules than num of max rules for obs space -# obs = {} -# acl_items = dict(acl_state.items()) -# i = 1 # don't show rule 0 for compatibility reasons. -# while i < self.num_rules + 1: -# rule_state = acl_items[i] -# if rule_state is None: -# obs[i] = { -# "position": i - 1, -# "permission": 0, -# "source_node_id": 0, -# "source_port": 0, -# "dest_node_id": 0, -# "dest_port": 0, -# "protocol": 0, -# } -# else: -# src_ip = rule_state["src_ip_address"] -# src_node_id = 1 if src_ip is None else self.node_to_id[IPv4Address(src_ip)] -# dst_ip = rule_state["dst_ip_address"] -# dst_node_ip = 1 if dst_ip is None else self.node_to_id[IPv4Address(dst_ip)] -# src_port = rule_state["src_port"] -# src_port_id = 1 if src_port is None else self.port_to_id[src_port] -# dst_port = rule_state["dst_port"] -# dst_port_id = 1 if dst_port is None else self.port_to_id[dst_port] -# protocol = rule_state["protocol"] -# protocol_id = 1 if protocol is None else self.protocol_to_id[protocol] -# obs[i] = { -# "position": i - 1, -# "permission": rule_state["action"], -# "source_node_id": src_node_id, -# "source_port": src_port_id, -# "dest_node_id": dst_node_ip, -# "dest_port": dst_port_id, -# "protocol": protocol_id, -# } -# i += 1 -# return obs + # TODO: what if the ACL has more rules than num of max rules for obs space + obs = {} + acl_items = dict(acl_state.items()) + i = 1 # don't show rule 0 for compatibility reasons. + while i < self.num_rules + 1: + rule_state = acl_items[i] + if rule_state is None: + obs[i] = { + "position": i - 1, + "permission": 0, + "source_node_id": 0, + "source_port": 0, + "dest_node_id": 0, + "dest_port": 0, + "protocol": 0, + } + else: + src_ip = rule_state["src_ip_address"] + src_node_id = 1 if src_ip is None else self.node_to_id[IPv4Address(src_ip)] + dst_ip = rule_state["dst_ip_address"] + dst_node_ip = 1 if dst_ip is None else self.node_to_id[IPv4Address(dst_ip)] + src_port = rule_state["src_port"] + src_port_id = 1 if src_port is None else self.port_to_id[src_port] + dst_port = rule_state["dst_port"] + dst_port_id = 1 if dst_port is None else self.port_to_id[dst_port] + protocol = rule_state["protocol"] + protocol_id = 1 if protocol is None else self.protocol_to_id[protocol] + obs[i] = { + "position": i - 1, + "permission": rule_state["action"], + "source_node_id": src_node_id, + "source_port": src_port_id, + "dest_node_id": dst_node_ip, + "dest_port": dst_port_id, + "protocol": protocol_id, + } + i += 1 + return obs -# @property -# def space(self) -> spaces.Space: -# """Gymnasium space object describing the observation space shape. + @property + def space(self) -> spaces.Space: + """Gymnasium space object describing the observation space shape. -# :return: Gymnasium space -# :rtype: spaces.Space -# """ -# return spaces.Dict( -# { -# i -# + 1: spaces.Dict( -# { -# "position": spaces.Discrete(self.num_rules), -# "permission": spaces.Discrete(3), -# # adding two to lengths is to account for reserved values 0 (unused) and 1 (any) -# "source_node_id": spaces.Discrete(len(set(self.node_to_id.values())) + 2), -# "source_port": spaces.Discrete(len(self.port_to_id) + 2), -# "dest_node_id": spaces.Discrete(len(set(self.node_to_id.values())) + 2), -# "dest_port": spaces.Discrete(len(self.port_to_id) + 2), -# "protocol": spaces.Discrete(len(self.protocol_to_id) + 2), -# } -# ) -# for i in range(self.num_rules) -# } -# ) + :return: Gymnasium space + :rtype: spaces.Space + """ + return spaces.Dict( + { + i + + 1: spaces.Dict( + { + "position": spaces.Discrete(self.num_rules), + "permission": spaces.Discrete(3), + # adding two to lengths is to account for reserved values 0 (unused) and 1 (any) + "source_node_id": spaces.Discrete(len(set(self.node_to_id.values())) + 2), + "source_port": spaces.Discrete(len(self.port_to_id) + 2), + "dest_node_id": spaces.Discrete(len(set(self.node_to_id.values())) + 2), + "dest_port": spaces.Discrete(len(self.port_to_id) + 2), + "protocol": spaces.Discrete(len(self.protocol_to_id) + 2), + } + ) + for i in range(self.num_rules) + } + ) -# @classmethod -# def from_config(cls, config: Dict, game: "PrimaiteGame") -> "AclObservation": -# """Generate ACL observation from a config. + @classmethod + def from_config(cls, config: Dict, game: "PrimaiteGame") -> "AclObservation": + """Generate ACL observation from a config. -# :param config: Dictionary containing the configuration for this ACL observation. -# :type config: Dict -# :param game: Reference to the PrimaiteGame object that spawned this observation. -# :type game: PrimaiteGame -# :return: Observation object -# :rtype: AclObservation -# """ -# max_acl_rules = config["options"]["max_acl_rules"] -# node_ip_to_idx = {} -# for ip_idx, ip_map_config in enumerate(config["ip_address_order"]): -# node_ref = ip_map_config["node_hostname"] -# nic_num = ip_map_config["nic_num"] -# node_obj = game.simulation.network.nodes[game.ref_map_nodes[node_ref]] -# nic_obj = node_obj.network_interface[nic_num] -# node_ip_to_idx[nic_obj.ip_address] = ip_idx + 2 + :param config: Dictionary containing the configuration for this ACL observation. + :type config: Dict + :param game: Reference to the PrimaiteGame object that spawned this observation. + :type game: PrimaiteGame + :return: Observation object + :rtype: AclObservation + """ + max_acl_rules = config["options"]["max_acl_rules"] + node_ip_to_idx = {} + for ip_idx, ip_map_config in enumerate(config["ip_address_order"]): + node_ref = ip_map_config["node_hostname"] + nic_num = ip_map_config["nic_num"] + node_obj = game.simulation.network.nodes[game.ref_map_nodes[node_ref]] + nic_obj = node_obj.network_interface[nic_num] + node_ip_to_idx[nic_obj.ip_address] = ip_idx + 2 -# router_hostname = config["router_hostname"] -# return cls( -# node_ip_to_id=node_ip_to_idx, -# ports=game.options.ports, -# protocols=game.options.protocols, -# where=["network", "nodes", router_hostname, "acl", "acl"], -# num_rules=max_acl_rules, -# ) + router_hostname = config["router_hostname"] + return cls( + node_ip_to_id=node_ip_to_idx, + ports=game.options.ports, + protocols=game.options.protocols, + where=["network", "nodes", router_hostname, "acl", "acl"], + num_rules=max_acl_rules, + ) -# class NullObservation(AbstractObservation): -# """Null observation, returns a single 0 value for the observation space.""" +class NullObservation(AbstractObservation): + """Null observation, returns a single 0 value for the observation space.""" -# def __init__(self, where: Optional[List[str]] = None): -# """Initialise null observation.""" -# self.default_observation: Dict = {} + def __init__(self, where: Optional[List[str]] = None): + """Initialise null observation.""" + self.default_observation: Dict = {} -# def observe(self, state: Dict) -> Dict: -# """Generate observation based on the current state of the simulation.""" -# return 0 + def observe(self, state: Dict) -> Dict: + """Generate observation based on the current state of the simulation.""" + return 0 -# @property -# def space(self) -> spaces.Space: -# """Gymnasium space object describing the observation space shape.""" -# return spaces.Discrete(1) + @property + def space(self) -> spaces.Space: + """Gymnasium space object describing the observation space shape.""" + return spaces.Discrete(1) -# @classmethod -# def from_config(cls, config: Dict, game: Optional["PrimaiteGame"] = None) -> "NullObservation": -# """ -# Create null observation from a config. + @classmethod + def from_config(cls, config: Dict, game: Optional["PrimaiteGame"] = None) -> "NullObservation": + """ + Create null observation from a config. -# The parameters are ignored, they are here to match the signature of the other observation classes. -# """ -# return cls() + The parameters are ignored, they are here to match the signature of the other observation classes. + """ + return cls() -# class ICSObservation(NullObservation): -# """ICS observation placeholder, currently not implemented so always returns a single 0.""" +class ICSObservation(NullObservation): + """ICS observation placeholder, currently not implemented so always returns a single 0.""" -# pass + pass +''' diff --git a/src/primaite/game/agent/observations/router_observation.py b/src/primaite/game/agent/observations/router_observation.py new file mode 100644 index 00000000..b8dee2c2 --- /dev/null +++ b/src/primaite/game/agent/observations/router_observation.py @@ -0,0 +1,142 @@ +from __future__ import annotations + +from typing import Dict, List, Optional + +from gymnasium import spaces +from gymnasium.core import ObsType + +from primaite import getLogger +from primaite.game.agent.observations.acl_observation import ACLObservation +from primaite.game.agent.observations.nic_observations import PortObservation +from primaite.game.agent.observations.observations import AbstractObservation, WhereType +from primaite.game.agent.utils import access_from_nested_dict, NOT_PRESENT_IN_STATE + +_LOGGER = getLogger(__name__) + + +class RouterObservation(AbstractObservation, identifier="ROUTER"): + """Router observation, provides status information about a router within the simulation environment.""" + + class ConfigSchema(AbstractObservation.ConfigSchema): + """Configuration schema for RouterObservation.""" + + hostname: str + """Hostname of the router, used for querying simulation state dictionary.""" + ports: Optional[List[PortObservation.ConfigSchema]] = None + """Configuration of port observations for this router.""" + num_ports: Optional[int] = None + """Number of port observations configured for this router.""" + acl: Optional[ACLObservation.ConfigSchema] = None + """Configuration of ACL observation on this router.""" + ip_list: Optional[List[str]] = None + """List of IP addresses for encoding ACLs.""" + wildcard_list: Optional[List[str]] = None + """List of IP wildcards for encoding ACLs.""" + port_list: Optional[List[int]] = None + """List of ports for encoding ACLs.""" + protocol_list: Optional[List[str]] = None + """List of protocols for encoding ACLs.""" + num_rules: Optional[int] = None + """Number of rules ACL rules to show.""" + + def __init__( + self, + where: WhereType, + ports: List[PortObservation], + num_ports: int, + acl: ACLObservation, + ) -> None: + """ + Initialize a router observation instance. + + :param where: Where in the simulation state dictionary to find the relevant information for this router. + A typical location for a router might be ['network', 'nodes', ]. + :type where: WhereType + :param ports: List of port observations representing the ports of the router. + :type ports: List[PortObservation] + :param num_ports: Number of ports for the router. + :type num_ports: int + :param acl: ACL observation representing the access control list of the router. + :type acl: ACLObservation + """ + self.where: WhereType = where + self.ports: List[PortObservation] = ports + self.acl: ACLObservation = acl + self.num_ports: int = num_ports + + while len(self.ports) < num_ports: + self.ports.append(PortObservation(where=None)) + while len(self.ports) > num_ports: + self.ports.pop() + msg = "Too many ports in router observation. Truncating." + _LOGGER.warning(msg) + + self.default_observation = { + "PORTS": {i + 1: p.default_observation for i, p in enumerate(self.ports)}, + "ACL": self.acl.default_observation, + } + + def observe(self, state: Dict) -> ObsType: + """ + Generate observation based on the current state of the simulation. + + :param state: Simulation state dictionary. + :type state: Dict + :return: Observation containing the status of ports and ACL configuration of the router. + :rtype: ObsType + """ + router_state = access_from_nested_dict(state, self.where) + if router_state is NOT_PRESENT_IN_STATE: + return self.default_observation + + obs = {} + obs["PORTS"] = {i + 1: p.observe(state) for i, p in enumerate(self.ports)} + obs["ACL"] = self.acl.observe(state) + return obs + + @property + def space(self) -> spaces.Space: + """ + Gymnasium space object describing the observation space shape. + + :return: Gymnasium space representing the observation space for router status. + :rtype: spaces.Space + """ + return spaces.Dict( + {"PORTS": spaces.Dict({i + 1: p.space for i, p in enumerate(self.ports)}), "ACL": self.acl.space} + ) + + @classmethod + def from_config(cls, config: ConfigSchema, parent_where: WhereType = []) -> RouterObservation: + """ + Create a router observation from a configuration schema. + + :param config: Configuration schema containing the necessary information for the router observation. + :type config: ConfigSchema + :param parent_where: Where in the simulation state dictionary to find the information about this router's + parent node. A typical location for a node might be ['network', 'nodes', ]. + :type parent_where: WhereType, optional + :return: Constructed router observation instance. + :rtype: RouterObservation + """ + where = parent_where + ["nodes", config.hostname] + + if config.acl is None: + config.acl = ACLObservation.ConfigSchema() + if config.acl.num_rules is None: + config.acl.num_rules = config.num_rules + if config.acl.ip_list is None: + config.acl.ip_list = config.ip_list + if config.acl.wildcard_list is None: + config.acl.wildcard_list = config.wildcard_list + if config.acl.port_list is None: + config.acl.port_list = config.port_list + if config.acl.protocol_list is None: + config.acl.protocol_list = config.protocol_list + + if config.ports is None: + config.ports = [PortObservation.ConfigSchema(port_id=i + 1) for i in range(config.num_ports)] + + ports = [PortObservation.from_config(config=c, parent_where=where) for c in config.ports] + acl = ACLObservation.from_config(config=config.acl, parent_where=where) + return cls(where=where, ports=ports, num_ports=config.num_ports, acl=acl) diff --git a/src/primaite/game/agent/observations/software_observation.py b/src/primaite/game/agent/observations/software_observation.py index 6caf791c..eb94651d 100644 --- a/src/primaite/game/agent/observations/software_observation.py +++ b/src/primaite/game/agent/observations/software_observation.py @@ -1,45 +1,43 @@ -from typing import Dict, List, Optional, Tuple, TYPE_CHECKING +from __future__ import annotations + +from typing import Dict from gymnasium import spaces +from gymnasium.core import ObsType -from primaite.game.agent.observations.observations import AbstractObservation +from primaite.game.agent.observations.observations import AbstractObservation, WhereType from primaite.game.agent.utils import access_from_nested_dict, NOT_PRESENT_IN_STATE -if TYPE_CHECKING: - from primaite.game.game import PrimaiteGame +class ServiceObservation(AbstractObservation, identifier="SERVICE"): + """Service observation, shows status of a service in the simulation environment.""" -class ServiceObservation(AbstractObservation): - """Observation of a service in the network.""" + class ConfigSchema(AbstractObservation.ConfigSchema): + """Configuration schema for ServiceObservation.""" - default_observation: spaces.Space = {"operating_status": 0, "health_status": 0} - "Default observation is what should be returned when the service doesn't exist." + service_name: str + """Name of the service, used for querying simulation state dictionary""" - def __init__(self, where: Optional[Tuple[str]] = None) -> None: - """Initialise service observation. - - :param where: Store information about where in the simulation state dictionary to find the relevant information. - Optional. If None, this corresponds that the file does not exist and the observation will be populated with - zeroes. - - A typical location for a service looks like this: - `['network','nodes',,'services', ]` - :type where: Optional[List[str]] + def __init__(self, where: WhereType) -> None: """ - super().__init__() - self.where: Optional[Tuple[str]] = where + Initialize a service observation instance. - def observe(self, state: Dict) -> Dict: - """Generate observation based on the current state of the simulation. + :param where: Where in the simulation state dictionary to find the relevant information for this service. + A typical location for a service might be ['network', 'nodes', , 'services', ]. + :type where: WhereType + """ + self.where = where + self.default_observation = {"operating_status": 0, "health_status": 0} - :param state: Simulation state dictionary + def observe(self, state: Dict) -> ObsType: + """ + Generate observation based on the current state of the simulation. + + :param state: Simulation state dictionary. :type state: Dict - :return: Observation - :rtype: Dict + :return: Observation containing the operating status and health status of the service. + :rtype: ObsType """ - if self.where is None: - return self.default_observation - service_state = access_from_nested_dict(state, self.where) if service_state is NOT_PRESENT_IN_STATE: return self.default_observation @@ -50,114 +48,96 @@ class ServiceObservation(AbstractObservation): @property def space(self) -> spaces.Space: - """Gymnasium space object describing the observation space shape.""" + """ + Gymnasium space object describing the observation space shape. + + :return: Gymnasium space representing the observation space for service status. + :rtype: spaces.Space + """ return spaces.Dict({"operating_status": spaces.Discrete(7), "health_status": spaces.Discrete(5)}) @classmethod - def from_config( - cls, config: Dict, game: "PrimaiteGame", parent_where: Optional[List[str]] = None - ) -> "ServiceObservation": - """Create service observation from a config. + def from_config(cls, config: ConfigSchema, parent_where: WhereType = []) -> ServiceObservation: + """ + Create a service observation from a configuration schema. - :param config: Dictionary containing the configuration for this service observation. - :type config: Dict - :param game: Reference to the PrimaiteGame object that spawned this observation. - :type game: PrimaiteGame - :param parent_where: Where in the simulation state dictionary this service's parent node is located. Optional. - :type parent_where: Optional[List[str]], optional - :return: Constructed service observation + :param config: Configuration schema containing the necessary information for the service observation. + :type config: ConfigSchema + :param parent_where: Where in the simulation state dictionary to find the information about this service's + parent node. A typical location for a node might be ['network', 'nodes', ]. + :type parent_where: WhereType, optional + :return: Constructed service observation instance. :rtype: ServiceObservation """ - return cls(where=parent_where + ["services", config["service_name"]]) + return cls(where=parent_where + ["services", config.service_name]) -class ApplicationObservation(AbstractObservation): - """Observation of an application in the network.""" +class ApplicationObservation(AbstractObservation, identifier="APPLICATION"): + """Application observation, shows the status of an application within the simulation environment.""" - default_observation: spaces.Space = {"operating_status": 0, "health_status": 0, "num_executions": 0} - "Default observation is what should be returned when the application doesn't exist." + class ConfigSchema(AbstractObservation.ConfigSchema): + """Configuration schema for ApplicationObservation.""" - def __init__(self, where: Optional[Tuple[str]] = None) -> None: - """Initialise application observation. + application_name: str + """Name of the application, used for querying simulation state dictionary""" - :param where: Store information about where in the simulation state dictionary to find the relevant information. - Optional. If None, this corresponds that the file does not exist and the observation will be populated with - zeroes. - - A typical location for a service looks like this: - `['network','nodes',,'applications', ]` - :type where: Optional[List[str]] + def __init__(self, where: WhereType) -> None: """ - super().__init__() - self.where: Optional[Tuple[str]] = where + Initialise an application observation instance. - def observe(self, state: Dict) -> Dict: - """Generate observation based on the current state of the simulation. + :param where: Where in the simulation state dictionary to find the relevant information for this application. + A typical location for an application might be + ['network', 'nodes', , 'applications', ]. + :type where: WhereType + """ + self.where = where + self.default_observation = {"operating_status": 0, "health_status": 0, "num_executions": 0} - :param state: Simulation state dictionary + def observe(self, state: Dict) -> ObsType: + """ + Generate observation based on the current state of the simulation. + + :param state: Simulation state dictionary. :type state: Dict - :return: Observation - :rtype: Dict + :return: Obs containing the operating status, health status, and number of executions of the application. + :rtype: ObsType """ - if self.where is None: - return self.default_observation - - app_state = access_from_nested_dict(state, self.where) - if app_state is NOT_PRESENT_IN_STATE: + application_state = access_from_nested_dict(state, self.where) + if application_state is NOT_PRESENT_IN_STATE: return self.default_observation return { - "operating_status": app_state["operating_state"], - "health_status": app_state["health_state_visible"], - "num_executions": self._categorise_num_executions(app_state["num_executions"]), + "operating_status": application_state["operating_state"], + "health_status": application_state["health_state_visible"], + "num_executions": application_state["num_executions"], } @property def space(self) -> spaces.Space: - """Gymnasium space object describing the observation space shape.""" + """ + Gymnasium space object describing the observation space shape. + + :return: Gymnasium space representing the observation space for application status. + :rtype: spaces.Space + """ return spaces.Dict( { "operating_status": spaces.Discrete(7), - "health_status": spaces.Discrete(6), + "health_status": spaces.Discrete(5), "num_executions": spaces.Discrete(4), } ) @classmethod - def from_config( - cls, config: Dict, game: "PrimaiteGame", parent_where: Optional[List[str]] = None - ) -> "ApplicationObservation": - """Create application observation from a config. + def from_config(cls, config: ConfigSchema, parent_where: WhereType = []) -> ApplicationObservation: + """ + Create an application observation from a configuration schema. - :param config: Dictionary containing the configuration for this service observation. - :type config: Dict - :param game: Reference to the PrimaiteGame object that spawned this observation. - :type game: PrimaiteGame - :param parent_where: Where in the simulation state dictionary this service's parent node is located. Optional. - :type parent_where: Optional[List[str]], optional - :return: Constructed service observation + :param config: Configuration schema containing the necessary information for the application observation. + :type config: ConfigSchema + :param parent_where: Where in the simulation state dictionary to find the information about this application's + parent node. A typical location for a node might be ['network', 'nodes', ]. + :type parent_where: WhereType, optional + :return: Constructed application observation instance. :rtype: ApplicationObservation """ - return cls(where=parent_where + ["services", config["application_name"]]) - - @classmethod - def _categorise_num_executions(cls, num_executions: int) -> int: - """ - Categorise the number of executions of an application. - - Helps classify the number of application executions into different categories. - - Current categories: - - 0: Application is never executed - - 1: Application is executed a low number of times (1-5) - - 2: Application is executed often (6-10) - - 3: Application is executed a high number of times (more than 10) - - :param: num_executions: Number of times the application is executed - """ - if num_executions > 10: - return 3 - elif num_executions > 5: - return 2 - elif num_executions > 0: - return 1 - return 0 + return cls(where=parent_where + ["applications", config.application_name]) From 7299a12c64369340373f2fcd5597cec98c046730 Mon Sep 17 00:00:00 2001 From: Cristian-VM2 Date: Fri, 29 Mar 2024 16:30:39 +0000 Subject: [PATCH 069/124] #2402 add firewall acl actions --- src/primaite/game/agent/actions.py | 154 +++++- .../hardware/nodes/network/firewall.py | 170 +++---- .../network/hardware/nodes/network/router.py | 2 +- .../configs/firewall_actions_network.yaml | 448 ++++++++++++++++++ .../game_layer/test_actions.py | 102 ++++ 5 files changed, 793 insertions(+), 83 deletions(-) create mode 100644 tests/assets/configs/firewall_actions_network.yaml diff --git a/src/primaite/game/agent/actions.py b/src/primaite/game/agent/actions.py index d585273d..ff59e77f 100644 --- a/src/primaite/game/agent/actions.py +++ b/src/primaite/game/agent/actions.py @@ -458,7 +458,7 @@ class RouterACLAddRuleAction(AbstractAction): permission_str = "UNUSED" return ["do_nothing"] # NOT SUPPORTED, JUST DO NOTHING IF WE COME ACROSS THIS elif permission == 1: - permission_str = "ALLOW" + permission_str = "PERMIT" elif permission == 2: permission_str = "DENY" else: @@ -540,6 +540,156 @@ class RouterACLRemoveRuleAction(AbstractAction): return ["network", "node", target_router_nodename, "acl", "remove_rule", position] +class FirewallACLAddRuleAction(AbstractAction): + """Action which adds a rule to a firewall port's ACL.""" + + def __init__( + self, + manager: "ActionManager", + max_acl_rules: int, + num_ips: int, + num_ports: int, + num_protocols: int, + **kwargs, + ) -> None: + """Init method for FirewallACLAddRuleAction. + + :param manager: Reference to the ActionManager which created this action. + :type manager: ActionManager + :param max_acl_rules: Maximum number of ACL rules that can be added to the router. + :type max_acl_rules: int + :param num_ips: Number of IP addresses in the simulation. + :type num_ips: int + :param num_ports: Number of ports in the simulation. + :type num_ports: int + :param num_protocols: Number of protocols in the simulation. + :type num_protocols: int + """ + super().__init__(manager=manager) + num_permissions = 3 + self.shape: Dict[str, int] = { + "position": max_acl_rules, + "permission": num_permissions, + "source_ip_id": num_ips, + "dest_ip_id": num_ips, + "source_port_id": num_ports, + "dest_port_id": num_ports, + "protocol_id": num_protocols, + } + + def form_request( + self, + target_firewall_nodename: str, + firewall_port_name: str, + firewall_port_direction: str, + position: int, + permission: int, + source_ip_id: int, + dest_ip_id: int, + source_port_id: int, + dest_port_id: int, + protocol_id: int, + ) -> List[str]: + """Return the action formatted as a request which can be ingested by the PrimAITE simulation.""" + if permission == 0: + permission_str = "UNUSED" + return ["do_nothing"] # NOT SUPPORTED, JUST DO NOTHING IF WE COME ACROSS THIS + elif permission == 1: + permission_str = "PERMIT" + elif permission == 2: + permission_str = "DENY" + else: + _LOGGER.warning(f"{self.__class__} received permission {permission}, expected 0 or 1.") + + if protocol_id == 0: + return ["do_nothing"] # NOT SUPPORTED, JUST DO NOTHING IF WE COME ACROSS THIS + + if protocol_id == 1: + protocol = "ALL" + else: + protocol = self.manager.get_internet_protocol_by_idx(protocol_id - 2) + # subtract 2 to account for UNUSED=0 and ALL=1. + + if source_ip_id == 0: + return ["do_nothing"] # invalid formulation + elif source_ip_id == 1: + src_ip = "ALL" + else: + src_ip = self.manager.get_ip_address_by_idx(source_ip_id - 2) + # subtract 2 to account for UNUSED=0, and ALL=1 + + if source_port_id == 0: + return ["do_nothing"] # invalid formulation + elif source_port_id == 1: + src_port = "ALL" + else: + src_port = self.manager.get_port_by_idx(source_port_id - 2) + # subtract 2 to account for UNUSED=0, and ALL=1 + + if source_ip_id == 0: + return ["do_nothing"] # invalid formulation + elif dest_ip_id == 1: + dst_ip = "ALL" + else: + dst_ip = self.manager.get_ip_address_by_idx(dest_ip_id - 2) + # subtract 2 to account for UNUSED=0, and ALL=1 + + if dest_port_id == 0: + return ["do_nothing"] # invalid formulation + elif dest_port_id == 1: + dst_port = "ALL" + else: + dst_port = self.manager.get_port_by_idx(dest_port_id - 2) + # subtract 2 to account for UNUSED=0, and ALL=1 + + return [ + "network", + "node", + target_firewall_nodename, + firewall_port_name, + firewall_port_direction, + "acl", + "add_rule", + permission_str, + protocol, + str(src_ip), + src_port, + str(dst_ip), + dst_port, + position, + ] + + +class FirewallACLRemoveRuleAction(AbstractAction): + """Action which removes a rule from a firewall port's ACL.""" + + def __init__(self, manager: "ActionManager", max_acl_rules: int, **kwargs) -> None: + """Init method for RouterACLRemoveRuleAction. + + :param manager: Reference to the ActionManager which created this action. + :type manager: ActionManager + :param max_acl_rules: Maximum number of ACL rules that can be added to the router. + :type max_acl_rules: int + """ + super().__init__(manager=manager) + self.shape: Dict[str, int] = {"position": max_acl_rules} + + def form_request( + self, target_firewall_nodename: str, firewall_port_name: str, firewall_port_direction: str, position: int + ) -> List[str]: + """Return the action formatted as a request which can be ingested by the PrimAITE simulation.""" + return [ + "network", + "node", + target_firewall_nodename, + firewall_port_name, + firewall_port_direction, + "acl", + "remove_rule", + position, + ] + + class NetworkNICAbstractAction(AbstractAction): """ Abstract base class for NIC actions. @@ -668,6 +818,8 @@ class ActionManager: "NODE_RESET": NodeResetAction, "ROUTER_ACL_ADDRULE": RouterACLAddRuleAction, "ROUTER_ACL_REMOVERULE": RouterACLRemoveRuleAction, + "FIREWALL_ACL_ADDRULE": FirewallACLAddRuleAction, + "FIREWALL_ACL_REMOVERULE": FirewallACLRemoveRuleAction, "NETWORK_NIC_ENABLE": NetworkNICEnableAction, "NETWORK_NIC_DISABLE": NetworkNICDisableAction, "NETWORK_PORT_ENABLE": NetworkPortEnableAction, diff --git a/src/primaite/simulator/network/hardware/nodes/network/firewall.py b/src/primaite/simulator/network/hardware/nodes/network/firewall.py index ea353b2f..a27b5cee 100644 --- a/src/primaite/simulator/network/hardware/nodes/network/firewall.py +++ b/src/primaite/simulator/network/hardware/nodes/network/firewall.py @@ -1,10 +1,10 @@ from ipaddress import IPv4Address -from typing import Dict, Final, Optional, Union +from typing import Dict, Final, Union from prettytable import MARKDOWN, PrettyTable -from pydantic import validate_call +from pydantic import Field, validate_call -# from primaite.simulator.core import RequestManager, RequestType +from primaite.simulator.core import RequestManager, RequestType from primaite.simulator.network.hardware.node_operating_state import NodeOperatingState from primaite.simulator.network.hardware.nodes.network.router import ( AccessControlList, @@ -68,22 +68,34 @@ class Firewall(Router): :ivar str hostname: The Firewall hostname. """ - internal_inbound_acl: Optional[AccessControlList] = None + internal_inbound_acl: AccessControlList = Field( + default_factory=lambda: AccessControlList(name="Internal Inbound", implicit_action=ACLAction.DENY) + ) """Access Control List for managing entering the internal network.""" - internal_outbound_acl: Optional[AccessControlList] = None + internal_outbound_acl: AccessControlList = Field( + default_factory=lambda: AccessControlList(name="Internal Outbound", implicit_action=ACLAction.DENY) + ) """Access Control List for managing traffic leaving the internal network.""" - dmz_inbound_acl: Optional[AccessControlList] = None + dmz_inbound_acl: AccessControlList = Field( + default_factory=lambda: AccessControlList(name="DMZ Inbound", implicit_action=ACLAction.DENY) + ) """Access Control List for managing traffic entering the DMZ.""" - dmz_outbound_acl: Optional[AccessControlList] = None + dmz_outbound_acl: AccessControlList = Field( + default_factory=lambda: AccessControlList(name="DMZ Outbound", implicit_action=ACLAction.DENY) + ) """Access Control List for managing traffic leaving the DMZ.""" - external_inbound_acl: Optional[AccessControlList] = None + external_inbound_acl: AccessControlList = Field( + default_factory=lambda: AccessControlList(name="External Inbound", implicit_action=ACLAction.PERMIT) + ) """Access Control List for managing traffic entering from an external network.""" - external_outbound_acl: Optional[AccessControlList] = None + external_outbound_acl: AccessControlList = Field( + default_factory=lambda: AccessControlList(name="External Outbound", implicit_action=ACLAction.PERMIT) + ) """Access Control List for managing traffic leaving towards an external network.""" def __init__(self, hostname: str, **kwargs): @@ -101,88 +113,84 @@ class Firewall(Router): self.connect_nic( RouterInterface(ip_address="127.0.0.1", subnet_mask="255.0.0.0", gateway="0.0.0.0", port_name="dmz") ) - # Initialise ACLs for internal and dmz interfaces with a default DENY policy - self.internal_inbound_acl = AccessControlList( - sys_log=kwargs["sys_log"], implicit_action=ACLAction.DENY, name=f"{hostname} - Internal Inbound" + self.internal_inbound_acl.sys_log = kwargs["sys_log"] + self.internal_inbound_acl.name = f"{hostname} - Internal Inbound" + + self.internal_outbound_acl.sys_log = kwargs["sys_log"] + self.internal_outbound_acl.name = f"{hostname} - Internal Outbound" + + self.dmz_inbound_acl.sys_log = kwargs["sys_log"] + self.dmz_inbound_acl.name = f"{hostname} - DMZ Inbound" + + self.dmz_outbound_acl.sys_log = kwargs["sys_log"] + self.dmz_outbound_acl.name = f"{hostname} - DMZ Outbound" + + self.external_inbound_acl.sys_log = kwargs["sys_log"] + self.external_inbound_acl.name = f"{hostname} - External Inbound" + + self.external_outbound_acl.sys_log = kwargs["sys_log"] + self.external_outbound_acl.name = f"{hostname} - External Outbound" + + def _init_request_manager(self) -> RequestManager: + """ + Initialise the request manager. + + More information in user guide and docstring for SimComponent._init_request_manager. + """ + rm = super()._init_request_manager() + self._internal_acl_request_manager = RequestManager() + rm.add_request("internal", RequestType(func=self._internal_acl_request_manager)) + + self._dmz_acl_request_manager = RequestManager() + rm.add_request("dmz", RequestType(func=self._dmz_acl_request_manager)) + + self._external_acl_request_manager = RequestManager() + rm.add_request("external", RequestType(func=self._external_acl_request_manager)) + + self._internal_inbound_acl_request_manager = RequestManager() + self._internal_outbound_acl_request_manager = RequestManager() + self._internal_acl_request_manager.add_request( + "inbound", RequestType(func=self._internal_inbound_acl_request_manager) ) - self.internal_outbound_acl = AccessControlList( - sys_log=kwargs["sys_log"], implicit_action=ACLAction.DENY, name=f"{hostname} - Internal Outbound" - ) - self.dmz_inbound_acl = AccessControlList( - sys_log=kwargs["sys_log"], implicit_action=ACLAction.DENY, name=f"{hostname} - DMZ Inbound" - ) - self.dmz_outbound_acl = AccessControlList( - sys_log=kwargs["sys_log"], implicit_action=ACLAction.DENY, name=f"{hostname} - DMZ Outbound" + self._internal_acl_request_manager.add_request( + "outbound", RequestType(func=self._internal_outbound_acl_request_manager) ) - # external ACLs should have a default PERMIT policy - self.external_inbound_acl = AccessControlList( - sys_log=kwargs["sys_log"], implicit_action=ACLAction.PERMIT, name=f"{hostname} - External Inbound" + self.dmz_inbound_acl_request_manager = RequestManager() + self.dmz_outbound_acl_request_manager = RequestManager() + self._dmz_acl_request_manager.add_request("inbound", RequestType(func=self.dmz_inbound_acl_request_manager)) + self._dmz_acl_request_manager.add_request("outbound", RequestType(func=self.dmz_outbound_acl_request_manager)) + + self.external_inbound_acl_request_manager = RequestManager() + self.external_outbound_acl_request_manager = RequestManager() + self._external_acl_request_manager.add_request( + "inbound", RequestType(func=self.external_inbound_acl_request_manager) ) - self.external_outbound_acl = AccessControlList( - sys_log=kwargs["sys_log"], implicit_action=ACLAction.PERMIT, name=f"{hostname} - External Outbound" + self._external_acl_request_manager.add_request( + "outbound", RequestType(func=self.external_outbound_acl_request_manager) ) - # def _init_request_manager(self) -> RequestManager: - # """ - # Initialise the request manager. + self._internal_inbound_acl_request_manager.add_request( + "acl", RequestType(func=self.internal_inbound_acl._request_manager) + ) + self._internal_outbound_acl_request_manager.add_request( + "acl", RequestType(func=self.internal_outbound_acl._request_manager) + ) - # More information in user guide and docstring for SimComponent._init_request_manager. - # """ - # rm = super()._init_request_manager() - # self._internal_acl_request_manager = RequestManager() - # rm.add_request("internal", RequestType(func=self._internal_acl_request_manager)) + self.dmz_inbound_acl_request_manager.add_request("acl", RequestType(func=self.dmz_inbound_acl._request_manager)) + self.dmz_outbound_acl_request_manager.add_request( + "acl", RequestType(func=self.dmz_outbound_acl._request_manager) + ) - # self._dmz_acl_request_manager = RequestManager() - # rm.add_request("dmz", RequestType(func=self._dmz_acl_request_manager)) + self.external_inbound_acl_request_manager.add_request( + "acl", RequestType(func=self.external_inbound_acl._request_manager) + ) + self.external_outbound_acl_request_manager.add_request( + "acl", RequestType(func=self.external_outbound_acl._request_manager) + ) - # self._external_acl_request_manager = RequestManager() - # rm.add_request("external", RequestType(func=self._external_acl_request_manager)) - - # self._internal_inbound_acl_request_manager = RequestManager() - # self._internal_outbound_acl_request_manager = RequestManager() - # self._internal_acl_request_manager.add_request( - # "inbound", RequestType(func=self._internal_inbound_acl_request_manager) - # ) - # self._internal_acl_request_manager.add_request( - # "outbound", RequestType(func=self._internal_outbound_acl_request_manager) - # ) - - # self.dmz_inbound_acl_request_manager = RequestManager() - # self.dmz_outbound_acl_request_manager = RequestManager() - # self._dmz_acl_request_manager.add_request("inbound", RequestType(func=self.dmz_inbound_acl_request_manager)) - # self._dmz_acl_request_manager.add_request("outbound", RequestType(func=self.dmz_outbound_acl_request_manager)) - - # self.external_inbound_acl_request_manager = RequestManager() - # self.external_outbound_acl_request_manager = RequestManager() - # self._external_acl_request_manager.add_request( - # "inbound", RequestType(func=self.external_inbound_acl_request_manager) - # ) - # self._external_acl_request_manager.add_request( - # "outbound", RequestType(func=self.external_outbound_acl_request_manager) - # ) - - # self._internal_inbound_acl_request_manager.add_request( - # "acl", RequestType(func=self.internal_inbound_acl._request_manager) - # ) - # self._internal_outbound_acl_request_manager.add_request( - # "acl", RequestType(func=self.internal_outbound_acl._request_manager) - # ) - - # self.dmz_inbound_acl_request_manager.add_request("acl", RequestType(func=self.dmz_inbound_acl._request_manager)) - # self.dmz_outbound_acl_request_manager.add_request( - # "acl", RequestType(func=self.dmz_outbound_acl._request_manager) - # ) - - # self.external_inbound_acl_request_manager.add_request( - # "acl", RequestType(func=self.external_inbound_acl._request_manager) - # ) - # self.external_outbound_acl_request_manager.add_request( - # "acl", RequestType(func=self.external_outbound_acl._request_manager) - # ) - - # return rm + return rm def describe_state(self) -> Dict: """ diff --git a/src/primaite/simulator/network/hardware/nodes/network/router.py b/src/primaite/simulator/network/hardware/nodes/network/router.py index 102eb7dc..07b0dd26 100644 --- a/src/primaite/simulator/network/hardware/nodes/network/router.py +++ b/src/primaite/simulator/network/hardware/nodes/network/router.py @@ -275,7 +275,7 @@ class AccessControlList(SimComponent): :ivar int max_acl_rules: The maximum number of ACL rules that can be added to the list. Defaults to 25. """ - sys_log: SysLog + sys_log: Optional[SysLog] = None implicit_action: ACLAction implicit_rule: ACLRule max_acl_rules: int = 25 diff --git a/tests/assets/configs/firewall_actions_network.yaml b/tests/assets/configs/firewall_actions_network.yaml new file mode 100644 index 00000000..67c6243d --- /dev/null +++ b/tests/assets/configs/firewall_actions_network.yaml @@ -0,0 +1,448 @@ +# Network with DMZ +# +# An example network configuration with an internal network, a DMZ network and a couple of external networks. +# +# ............................................................................ +# . . +# . Internal Network . +# . . +# . -------------- -------------- -------------- . +# . | client_1 |------| switch_1 |--------| router_1 | . +# . -------------- -------------- -------------- . +# . (Computer) | . +# ........................................................|................... +# | +# | +# ........................................................|................... +# . | . +# . DMZ Network | . +# . | . +# . ---------------- -------------- -------------- . +# . | dmz_server |------| switch_2 |------| firewall | . +# . ---------------- -------------- -------------- . +# . (Server) | . +# ........................................................|................... +# | +# External Network | +# | +# | +# ----------------------- -------------- --------------------- +# | external_computer |------| switch_3 |------| external_server | +# ----------------------- -------------- --------------------- +# +training_config: + rl_framework: SB3 + rl_algorithm: PPO + seed: 333 + n_learn_episodes: 1 + n_eval_episodes: 5 + max_steps_per_episode: 128 + deterministic_eval: false + n_agents: 1 + agent_references: + - defender + +io_settings: + save_step_metadata: false + save_pcap_logs: true + save_sys_logs: true + + +game: + max_episode_length: 256 + ports: + - ARP + - DNS + - HTTP + - POSTGRES_SERVER + protocols: + - ICMP + - TCP + - UDP + +agents: + - ref: defender + team: BLUE + type: ProxyAgent + observation_space: + type: UC2BlueObservation + options: + num_services_per_node: 1 + num_folders_per_node: 1 + num_files_per_folder: 1 + num_nics_per_node: 2 + nodes: + - node_hostname: client_1 + links: + - link_ref: client_1___switch_1 + acl: + options: + max_acl_rules: 10 + router_hostname: router_1 + ip_address_order: + - node_hostname: client_1 + nic_num: 1 + ics: null + action_space: + action_list: + - type: DONOTHING + - type: FIREWALL_ACL_ADDRULE + - type: FIREWALL_ACL_REMOVERULE + action_map: + 0: + action: DONOTHING + options: {} + 1: + action: FIREWALL_ACL_ADDRULE + options: + target_firewall_nodename: firewall + firewall_port_name: internal + firewall_port_direction: inbound + position: 1 + permission: 1 + source_ip_id: 2 # client 1 + dest_ip_id: 1 # ALL + source_port_id: 1 + dest_port_id: 1 + protocol_id: 1 + 2: + action: FIREWALL_ACL_REMOVERULE + options: + target_firewall_nodename: firewall + firewall_port_name: internal + firewall_port_direction: inbound + position: 1 + 3: + action: FIREWALL_ACL_ADDRULE + options: + target_firewall_nodename: firewall + firewall_port_name: internal + firewall_port_direction: outbound + position: 1 + permission: 2 + source_ip_id: 2 # client 1 + dest_ip_id: 1 # ALL + source_port_id: 2 + dest_port_id: 3 + protocol_id: 2 + 4: + action: FIREWALL_ACL_REMOVERULE + options: + target_firewall_nodename: firewall + firewall_port_name: internal + firewall_port_direction: outbound + position: 1 + 5: + action: FIREWALL_ACL_ADDRULE + options: + target_firewall_nodename: firewall + firewall_port_name: dmz + firewall_port_direction: inbound + position: 1 + permission: 2 + source_ip_id: 3 # dmz_server + dest_ip_id: 2 # client_1 + source_port_id: 4 + dest_port_id: 4 + protocol_id: 4 + 6: + action: FIREWALL_ACL_REMOVERULE + options: + target_firewall_nodename: firewall + firewall_port_name: dmz + firewall_port_direction: inbound + position: 1 + 7: + action: FIREWALL_ACL_ADDRULE + options: + target_firewall_nodename: firewall + firewall_port_name: dmz + firewall_port_direction: outbound + position: 2 + permission: 2 + source_ip_id: 3 # dmz_server + dest_ip_id: 2 # client_1 + source_port_id: 4 + dest_port_id: 4 + protocol_id: 3 + 8: + action: FIREWALL_ACL_REMOVERULE + options: + target_firewall_nodename: firewall + firewall_port_name: dmz + firewall_port_direction: outbound + position: 2 + 9: + action: FIREWALL_ACL_ADDRULE + options: + target_firewall_nodename: firewall + firewall_port_name: external + firewall_port_direction: inbound + position: 10 + permission: 2 + source_ip_id: 4 # external_computer + dest_ip_id: 3 # dmz + source_port_id: 5 + dest_port_id: 5 + protocol_id: 2 + 10: + action: FIREWALL_ACL_REMOVERULE + options: + target_firewall_nodename: firewall + firewall_port_name: external + firewall_port_direction: inbound + position: 10 + 11: + action: FIREWALL_ACL_ADDRULE + options: + target_firewall_nodename: firewall + firewall_port_name: external + firewall_port_direction: outbound + position: 1 + permission: 2 + source_ip_id: 4 # external_computer + dest_ip_id: 2 # client_1 + source_port_id: 1 + dest_port_id: 1 + protocol_id: 1 + 12: + action: FIREWALL_ACL_REMOVERULE + options: + target_firewall_nodename: firewall + firewall_port_name: external + firewall_port_direction: outbound + position: 1 + options: + nodes: + - node_name: client_1 + - node_name: dmz_server + - node_name: external_computer + ip_address_order: + - node_name: client_1 + nic_num: 1 + - node_name: dmz_server + nic_num: 1 + - node_name: external_computer + nic_num: 1 + max_folders_per_node: 2 + max_files_per_folder: 2 + max_services_per_node: 2 + max_nics_per_node: 8 + max_acl_rules: 10 + reward_function: + reward_components: + - type: DUMMY + + agent_settings: + start_settings: + start_step: 5 + frequency: 4 + variance: 3 + + + +simulation: + network: + nodes: + - ref: client_1 + type: computer + hostname: client_1 + ip_address: 192.168.0.10 + subnet_mask: 255.255.255.0 + default_gateway: 192.168.0.1 + dns_server: 192.168.20.11 + start_up_duration: 0 + shut_down_duration: 0 + + - ref: switch_1 + type: switch + hostname: switch_1 + num_ports: 8 + start_up_duration: 0 + shut_down_duration: 0 + + - ref: router_1 + type: router + hostname: router_1 + num_ports: 5 + start_up_duration: 0 + shut_down_duration: 0 + ports: + 1: + ip_address: 192.168.0.1 + subnet_mask: 255.255.255.0 + 2: + ip_address: 192.168.1.1 + subnet_mask: 255.255.255.0 + acl: + 22: + action: PERMIT + src_port: ARP + dst_port: ARP + 23: + action: PERMIT + protocol: ICMP + routes: + - address: 192.168.10.10 # route to dmz_server + subnet_mask: 255.255.255.0 + next_hop_ip_address: 192.168.1.2 + metric: 0 + - address: 192.168.20.10 # route to external_computer + subnet_mask: 255.255.255.0 + next_hop_ip_address: 192.168.1.2 + metric: 0 + - address: 192.168.20.11 # route to external_server + subnet_mask: 255.255.255.0 + next_hop_ip_address: 192.168.1.2 + metric: 0 + + - ref: dmz_server + type: server + hostname: dmz_server + ip_address: 192.168.10.10 + subnet_mask: 255.255.255.0 + default_gateway: 192.168.10.1 + dns_server: 192.168.20.11 + start_up_duration: 0 + shut_down_duration: 0 + + - ref: switch_2 + type: switch + hostname: switch_2 + num_ports: 8 + start_up_duration: 0 + shut_down_duration: 0 + + - ref: firewall + type: firewall + hostname: firewall + start_up_duration: 0 + shut_down_duration: 0 + ports: + external_port: # port 1 + ip_address: 192.168.20.1 + subnet_mask: 255.255.255.0 + internal_port: # port 2 + ip_address: 192.168.1.2 + subnet_mask: 255.255.255.0 + dmz_port: # port 3 + ip_address: 192.168.10.1 + subnet_mask: 255.255.255.0 + acl: + internal_inbound_acl: + 22: + action: PERMIT + src_port: ARP + dst_port: ARP + 23: + action: PERMIT + protocol: ICMP + internal_outbound_acl: + 22: + action: PERMIT + src_port: ARP + dst_port: ARP + 23: + action: PERMIT + protocol: ICMP + dmz_inbound_acl: + 22: + action: PERMIT + src_port: ARP + dst_port: ARP + 23: + action: PERMIT + protocol: ICMP + dmz_outbound_acl: + 22: + action: PERMIT + src_port: ARP + dst_port: ARP + 23: + action: PERMIT + protocol: ICMP + external_inbound_acl: + 22: + action: PERMIT + src_port: ARP + dst_port: ARP + external_outbound_acl: + 22: + action: PERMIT + src_port: ARP + dst_port: ARP + routes: + - address: 192.168.0.10 # route to client_1 + subnet_mask: 255.255.255.0 + next_hop_ip_address: 192.168.1.1 + metric: 0 + + - ref: switch_3 + type: switch + hostname: switch_3 + num_ports: 8 + start_up_duration: 0 + shut_down_duration: 0 + + - ref: external_computer + type: computer + hostname: external_computer + ip_address: 192.168.20.10 + subnet_mask: 255.255.255.0 + default_gateway: 192.168.20.1 + dns_server: 192.168.20.11 + start_up_duration: 0 + shut_down_duration: 0 + + - ref: external_server + type: server + hostname: external_server + ip_address: 192.168.20.11 + subnet_mask: 255.255.255.0 + default_gateway: 192.168.20.1 + start_up_duration: 0 + shut_down_duration: 0 + services: + - ref: domain_controller_dns_server + type: DNSServer + links: + - ref: client_1___switch_1 + endpoint_a_ref: client_1 + endpoint_a_port: 1 + endpoint_b_ref: switch_1 + endpoint_b_port: 1 + - ref: router_1___switch_1 + endpoint_a_ref: router_1 + endpoint_a_port: 1 + endpoint_b_ref: switch_1 + endpoint_b_port: 8 + - ref: router_1___firewall + endpoint_a_ref: firewall + endpoint_a_port: 2 # internal firewall port + endpoint_b_ref: router_1 + endpoint_b_port: 2 + - ref: firewall___switch_2 + endpoint_a_ref: firewall + endpoint_a_port: 3 # dmz firewall port + endpoint_b_ref: switch_2 + endpoint_b_port: 8 + - ref: dmz_server___switch_2 + endpoint_a_ref: dmz_server + endpoint_a_port: 1 + endpoint_b_ref: switch_2 + endpoint_b_port: 1 + - ref: firewall___switch_3 + endpoint_a_ref: firewall + endpoint_a_port: 1 # external firewall port + endpoint_b_ref: switch_3 + endpoint_b_port: 8 + - ref: external_computer___switch_3 + endpoint_a_ref: external_computer + endpoint_a_port: 1 + endpoint_b_ref: switch_3 + endpoint_b_port: 1 + - ref: external_server___switch_3 + endpoint_a_ref: external_server + endpoint_a_port: 1 + endpoint_b_ref: switch_3 + endpoint_b_port: 2 diff --git a/tests/integration_tests/game_layer/test_actions.py b/tests/integration_tests/game_layer/test_actions.py index 7bb8930c..1a8429b7 100644 --- a/tests/integration_tests/game_layer/test_actions.py +++ b/tests/integration_tests/game_layer/test_actions.py @@ -10,16 +10,24 @@ # 4. Check that the simulation has changed in the way that I expect. # 5. Repeat for all actions. +from ipaddress import IPv4Address from typing import Tuple import pytest +import yaml from primaite.game.agent.interface import ProxyAgent from primaite.game.game import PrimaiteGame +from primaite.session.environment import PrimaiteGymEnv from primaite.simulator.file_system.file_system_item_abc import FileSystemItemHealthStatus +from primaite.simulator.network.transmission.network_layer import IPProtocol +from primaite.simulator.network.transmission.transport_layer import Port from primaite.simulator.system.applications.application import ApplicationOperatingState from primaite.simulator.system.applications.web_browser import WebBrowser from primaite.simulator.system.software import SoftwareHealthState +from tests import TEST_ASSETS_ROOT + +FIREWALL_ACTIONS_NETWORK = TEST_ASSETS_ROOT / "configs/firewall_actions_network.yaml" def test_do_nothing_integration(game_and_agent: Tuple[PrimaiteGame, ProxyAgent]): @@ -458,3 +466,97 @@ def test_node_application_close_integration(game_and_agent: Tuple[PrimaiteGame, game.step() assert browser.operating_state == ApplicationOperatingState.CLOSED + + +def test_firewall_acl_add_remove_rule_integration(): + """ + Test that FirewallACLAddRuleAction and FirewallACLRemoveRuleAction can form a request and that it is accepted by the simulation. + + Check that all the details of the ACL rules are correctly added to each ACL list of the Firewall. + Check that rules are removed as expected. + """ + with open(FIREWALL_ACTIONS_NETWORK, "r") as f: + cfg = yaml.safe_load(f) + + env = PrimaiteGymEnv(game_config=cfg) + + # 1: Check that traffic is normal and acl starts off with 4 rules. + firewall = env.game.simulation.network.get_node_by_hostname("firewall") + assert firewall.internal_inbound_acl.num_rules == 2 + assert firewall.internal_outbound_acl.num_rules == 2 + assert firewall.dmz_inbound_acl.num_rules == 2 + assert firewall.dmz_outbound_acl.num_rules == 2 + assert firewall.external_inbound_acl.num_rules == 1 + assert firewall.external_outbound_acl.num_rules == 1 + + env.step(1) # Add ACL rule to Internal Inbound + assert firewall.internal_inbound_acl.num_rules == 3 + assert firewall.internal_inbound_acl.acl[1].action.name == "PERMIT" + assert firewall.internal_inbound_acl.acl[1].src_ip_address == IPv4Address("192.168.0.10") + assert firewall.internal_inbound_acl.acl[1].dst_ip_address is None + assert firewall.internal_inbound_acl.acl[1].dst_port is None + assert firewall.internal_inbound_acl.acl[1].src_port is None + assert firewall.internal_inbound_acl.acl[1].protocol is None + + env.step(2) # Remove ACL rule from Internal Inbound + assert firewall.internal_inbound_acl.num_rules == 2 + + env.step(3) # Add ACL rule to Internal Outbound + assert firewall.internal_outbound_acl.num_rules == 3 + assert firewall.internal_outbound_acl.acl[1].action.name == "DENY" + assert firewall.internal_outbound_acl.acl[1].src_ip_address == IPv4Address("192.168.0.10") + assert firewall.internal_outbound_acl.acl[1].dst_ip_address is None + assert firewall.internal_outbound_acl.acl[1].dst_port == Port.DNS + assert firewall.internal_outbound_acl.acl[1].src_port == Port.ARP + assert firewall.internal_outbound_acl.acl[1].protocol == IPProtocol.ICMP + + env.step(4) # Remove ACL rule from Internal Outbound + assert firewall.internal_outbound_acl.num_rules == 2 + + env.step(5) # Add ACL rule to DMZ Inbound + assert firewall.dmz_inbound_acl.num_rules == 3 + assert firewall.dmz_inbound_acl.acl[1].action.name == "DENY" + assert firewall.dmz_inbound_acl.acl[1].src_ip_address == IPv4Address("192.168.10.10") + assert firewall.dmz_inbound_acl.acl[1].dst_ip_address == IPv4Address("192.168.0.10") + assert firewall.dmz_inbound_acl.acl[1].dst_port == Port.HTTP + assert firewall.dmz_inbound_acl.acl[1].src_port == Port.HTTP + assert firewall.dmz_inbound_acl.acl[1].protocol == IPProtocol.UDP + + env.step(6) # Remove ACL rule from DMZ Inbound + assert firewall.dmz_inbound_acl.num_rules == 2 + + env.step(7) # Add ACL rule to DMZ Outbound + assert firewall.dmz_outbound_acl.num_rules == 3 + assert firewall.dmz_outbound_acl.acl[2].action.name == "DENY" + assert firewall.dmz_outbound_acl.acl[2].src_ip_address == IPv4Address("192.168.10.10") + assert firewall.dmz_outbound_acl.acl[2].dst_ip_address == IPv4Address("192.168.0.10") + assert firewall.dmz_outbound_acl.acl[2].dst_port == Port.HTTP + assert firewall.dmz_outbound_acl.acl[2].src_port == Port.HTTP + assert firewall.dmz_outbound_acl.acl[2].protocol == IPProtocol.TCP + + env.step(8) # Remove ACL rule from DMZ Outbound + assert firewall.dmz_outbound_acl.num_rules == 2 + + env.step(9) # Add ACL rule to External Inbound + assert firewall.external_inbound_acl.num_rules == 2 + assert firewall.external_inbound_acl.acl[10].action.name == "DENY" + assert firewall.external_inbound_acl.acl[10].src_ip_address == IPv4Address("192.168.20.10") + assert firewall.external_inbound_acl.acl[10].dst_ip_address == IPv4Address("192.168.10.10") + assert firewall.external_inbound_acl.acl[10].dst_port == Port.POSTGRES_SERVER + assert firewall.external_inbound_acl.acl[10].src_port == Port.POSTGRES_SERVER + assert firewall.external_inbound_acl.acl[10].protocol == IPProtocol.ICMP + + env.step(10) # Remove ACL rule from External Inbound + assert firewall.external_inbound_acl.num_rules == 1 + + env.step(11) # Add ACL rule to External Outbound + assert firewall.external_outbound_acl.num_rules == 2 + assert firewall.external_outbound_acl.acl[1].action.name == "DENY" + assert firewall.external_outbound_acl.acl[1].src_ip_address == IPv4Address("192.168.20.10") + assert firewall.external_outbound_acl.acl[1].dst_ip_address == IPv4Address("192.168.0.10") + assert firewall.external_outbound_acl.acl[1].dst_port is None + assert firewall.external_outbound_acl.acl[1].src_port is None + assert firewall.external_outbound_acl.acl[1].protocol is None + + env.step(12) # Remove ACL rule from External Outbound + assert firewall.external_outbound_acl.num_rules == 1 From d1301002d3017df9901055d108458d6bfd1321be Mon Sep 17 00:00:00 2001 From: Cristian-VM2 Date: Fri, 29 Mar 2024 17:07:08 +0000 Subject: [PATCH 070/124] #2402 run pre-commits --- .../configs/firewall_actions_network.yaml | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/tests/assets/configs/firewall_actions_network.yaml b/tests/assets/configs/firewall_actions_network.yaml index 67c6243d..d4d6f483 100644 --- a/tests/assets/configs/firewall_actions_network.yaml +++ b/tests/assets/configs/firewall_actions_network.yaml @@ -82,7 +82,7 @@ agents: ip_address_order: - node_hostname: client_1 nic_num: 1 - ics: null + ics: null action_space: action_list: - type: DONOTHING @@ -111,7 +111,7 @@ agents: target_firewall_nodename: firewall firewall_port_name: internal firewall_port_direction: inbound - position: 1 + position: 1 3: action: FIREWALL_ACL_ADDRULE options: @@ -124,14 +124,14 @@ agents: dest_ip_id: 1 # ALL source_port_id: 2 dest_port_id: 3 - protocol_id: 2 + protocol_id: 2 4: action: FIREWALL_ACL_REMOVERULE options: target_firewall_nodename: firewall firewall_port_name: internal firewall_port_direction: outbound - position: 1 + position: 1 5: action: FIREWALL_ACL_ADDRULE options: @@ -144,14 +144,14 @@ agents: dest_ip_id: 2 # client_1 source_port_id: 4 dest_port_id: 4 - protocol_id: 4 + protocol_id: 4 6: action: FIREWALL_ACL_REMOVERULE options: target_firewall_nodename: firewall firewall_port_name: dmz firewall_port_direction: inbound - position: 1 + position: 1 7: action: FIREWALL_ACL_ADDRULE options: @@ -164,14 +164,14 @@ agents: dest_ip_id: 2 # client_1 source_port_id: 4 dest_port_id: 4 - protocol_id: 3 + protocol_id: 3 8: action: FIREWALL_ACL_REMOVERULE options: target_firewall_nodename: firewall firewall_port_name: dmz firewall_port_direction: outbound - position: 2 + position: 2 9: action: FIREWALL_ACL_ADDRULE options: @@ -180,7 +180,7 @@ agents: firewall_port_direction: inbound position: 10 permission: 2 - source_ip_id: 4 # external_computer + source_ip_id: 4 # external_computer dest_ip_id: 3 # dmz source_port_id: 5 dest_port_id: 5 @@ -191,7 +191,7 @@ agents: target_firewall_nodename: firewall firewall_port_name: external firewall_port_direction: inbound - position: 10 + position: 10 11: action: FIREWALL_ACL_ADDRULE options: @@ -200,18 +200,18 @@ agents: firewall_port_direction: outbound position: 1 permission: 2 - source_ip_id: 4 # external_computer + source_ip_id: 4 # external_computer dest_ip_id: 2 # client_1 source_port_id: 1 dest_port_id: 1 - protocol_id: 1 + protocol_id: 1 12: action: FIREWALL_ACL_REMOVERULE options: target_firewall_nodename: firewall firewall_port_name: external firewall_port_direction: outbound - position: 1 + position: 1 options: nodes: - node_name: client_1 @@ -223,7 +223,7 @@ agents: - node_name: dmz_server nic_num: 1 - node_name: external_computer - nic_num: 1 + nic_num: 1 max_folders_per_node: 2 max_files_per_folder: 2 max_services_per_node: 2 From 2d1f38bcb7431e6954beb12cb580c70e79a70093 Mon Sep 17 00:00:00 2001 From: Cristian-VM2 Date: Fri, 29 Mar 2024 17:28:40 +0000 Subject: [PATCH 071/124] #2402 fix test --- .../configs/test_application_install.yaml | 56 +++++++++++-------- 1 file changed, 34 insertions(+), 22 deletions(-) diff --git a/tests/assets/configs/test_application_install.yaml b/tests/assets/configs/test_application_install.yaml index c1908fc4..1bf88277 100644 --- a/tests/assets/configs/test_application_install.yaml +++ b/tests/assets/configs/test_application_install.yaml @@ -258,12 +258,8 @@ agents: - type: NODE_SHUTDOWN - type: NODE_STARTUP - type: NODE_RESET - - type: NETWORK_ACL_ADDRULE - options: - target_router_hostname: router_1 - - type: NETWORK_ACL_REMOVERULE - options: - target_router_hostname: router_1 + - type: ROUTER_ACL_ADDRULE + - type: ROUTER_ACL_REMOVERULE - type: NETWORK_NIC_ENABLE - type: NETWORK_NIC_DISABLE - type: NODE_APPLICATION_INSTALL @@ -480,8 +476,9 @@ agents: node_id: 6 46: # old action num: 22 # "ACL: ADDRULE - Block outgoing traffic from client 1" - action: "NETWORK_ACL_ADDRULE" + action: "ROUTER_ACL_ADDRULE" options: + target_router_hostname: router_1 position: 1 permission: 2 source_ip_id: 7 # client 1 @@ -490,8 +487,9 @@ agents: dest_port_id: 1 protocol_id: 1 47: # old action num: 23 # "ACL: ADDRULE - Block outgoing traffic from client 2" - action: "NETWORK_ACL_ADDRULE" + action: "ROUTER_ACL_ADDRULE" options: + target_router_hostname: router_1 position: 2 permission: 2 source_ip_id: 8 # client 2 @@ -500,8 +498,9 @@ agents: dest_port_id: 1 protocol_id: 1 48: # old action num: 24 # block tcp traffic from client 1 to web app - action: "NETWORK_ACL_ADDRULE" + action: "ROUTER_ACL_ADDRULE" options: + target_router_hostname: router_1 position: 3 permission: 2 source_ip_id: 7 # client 1 @@ -510,8 +509,9 @@ agents: dest_port_id: 1 protocol_id: 3 49: # old action num: 25 # block tcp traffic from client 2 to web app - action: "NETWORK_ACL_ADDRULE" + action: "ROUTER_ACL_ADDRULE" options: + target_router_hostname: router_1 position: 4 permission: 2 source_ip_id: 8 # client 2 @@ -520,8 +520,9 @@ agents: dest_port_id: 1 protocol_id: 3 50: # old action num: 26 - action: "NETWORK_ACL_ADDRULE" + action: "ROUTER_ACL_ADDRULE" options: + target_router_hostname: router_1 position: 5 permission: 2 source_ip_id: 7 # client 1 @@ -530,8 +531,9 @@ agents: dest_port_id: 1 protocol_id: 3 51: # old action num: 27 - action: "NETWORK_ACL_ADDRULE" + action: "ROUTER_ACL_ADDRULE" options: + target_router_hostname: router_1 position: 6 permission: 2 source_ip_id: 8 # client 2 @@ -540,44 +542,54 @@ agents: dest_port_id: 1 protocol_id: 3 52: # old action num: 28 - action: "NETWORK_ACL_REMOVERULE" + action: "ROUTER_ACL_REMOVERULE" options: + target_router_hostname: router_1 position: 0 53: # old action num: 29 - action: "NETWORK_ACL_REMOVERULE" + action: "ROUTER_ACL_REMOVERULE" options: + target_router_hostname: router_1 position: 1 54: # old action num: 30 - action: "NETWORK_ACL_REMOVERULE" + action: "ROUTER_ACL_REMOVERULE" options: + target_router_hostname: router_1 position: 2 55: # old action num: 31 - action: "NETWORK_ACL_REMOVERULE" + action: "ROUTER_ACL_REMOVERULE" options: + target_router_hostname: router_1 position: 3 56: # old action num: 32 - action: "NETWORK_ACL_REMOVERULE" + action: "ROUTER_ACL_REMOVERULE" options: + target_router_hostname: router_1 position: 4 57: # old action num: 33 - action: "NETWORK_ACL_REMOVERULE" + action: "ROUTER_ACL_REMOVERULE" options: + target_router_hostname: router_1 position: 5 58: # old action num: 34 - action: "NETWORK_ACL_REMOVERULE" + action: "ROUTER_ACL_REMOVERULE" options: + target_router_hostname: router_1 position: 6 59: # old action num: 35 - action: "NETWORK_ACL_REMOVERULE" + action: "ROUTER_ACL_REMOVERULE" options: + target_router_hostname: router_1 position: 7 60: # old action num: 36 - action: "NETWORK_ACL_REMOVERULE" + action: "ROUTER_ACL_REMOVERULE" options: + target_router_hostname: router_1 position: 8 61: # old action num: 37 - action: "NETWORK_ACL_REMOVERULE" + action: "ROUTER_ACL_REMOVERULE" options: + target_router_hostname: router_1 position: 9 62: # old action num: 38 action: "NETWORK_NIC_DISABLE" From 2546f268ebba717122439ae6e6326574f8704ece Mon Sep 17 00:00:00 2001 From: Cristian-VM2 Date: Sun, 31 Mar 2024 11:59:31 +0000 Subject: [PATCH 072/124] #2402 refactor port actions to take same input params (hostname) as new acl actions for routers and firewalls --- .../_package_data/data_manipulation.yaml | 36 +++++----- .../_package_data/data_manipulation_marl.yaml | 72 +++++++++---------- src/primaite/game/agent/actions.py | 65 ++++++++--------- .../assets/configs/bad_primaite_session.yaml | 36 +++++----- .../configs/eval_only_primaite_session.yaml | 36 +++++----- .../configs/firewall_actions_network.yaml | 12 ++++ tests/assets/configs/multi_agent_session.yaml | 72 +++++++++---------- tests/assets/configs/shared_rewards.yaml | 36 +++++----- .../configs/test_application_install.yaml | 36 +++++----- .../assets/configs/test_primaite_session.yaml | 36 +++++----- .../configs/train_only_primaite_session.yaml | 36 +++++----- tests/conftest.py | 4 +- .../game_layer/test_actions.py | 39 +++++++--- 13 files changed, 269 insertions(+), 247 deletions(-) diff --git a/src/primaite/config/_package_data/data_manipulation.yaml b/src/primaite/config/_package_data/data_manipulation.yaml index ad3c02cc..2ec5614a 100644 --- a/src/primaite/config/_package_data/data_manipulation.yaml +++ b/src/primaite/config/_package_data/data_manipulation.yaml @@ -260,8 +260,8 @@ agents: - type: NODE_RESET - type: ROUTER_ACL_ADDRULE - type: ROUTER_ACL_REMOVERULE - - type: NETWORK_NIC_ENABLE - - type: NETWORK_NIC_DISABLE + - type: HOST_NIC_ENABLE + - type: HOST_NIC_DISABLE action_map: 0: @@ -589,82 +589,82 @@ agents: target_router_nodename: router_1 position: 9 62: # old action num: 38 - action: "NETWORK_NIC_DISABLE" + action: "HOST_NIC_DISABLE" options: node_id: 0 nic_id: 0 63: # old action num: 39 - action: "NETWORK_NIC_ENABLE" + action: "HOST_NIC_ENABLE" options: node_id: 0 nic_id: 0 64: # old action num: 40 - action: "NETWORK_NIC_DISABLE" + action: "HOST_NIC_DISABLE" options: node_id: 1 nic_id: 0 65: # old action num: 41 - action: "NETWORK_NIC_ENABLE" + action: "HOST_NIC_ENABLE" options: node_id: 1 nic_id: 0 66: # old action num: 42 - action: "NETWORK_NIC_DISABLE" + action: "HOST_NIC_DISABLE" options: node_id: 2 nic_id: 0 67: # old action num: 43 - action: "NETWORK_NIC_ENABLE" + action: "HOST_NIC_ENABLE" options: node_id: 2 nic_id: 0 68: # old action num: 44 - action: "NETWORK_NIC_DISABLE" + action: "HOST_NIC_DISABLE" options: node_id: 3 nic_id: 0 69: # old action num: 45 - action: "NETWORK_NIC_ENABLE" + action: "HOST_NIC_ENABLE" options: node_id: 3 nic_id: 0 70: # old action num: 46 - action: "NETWORK_NIC_DISABLE" + action: "HOST_NIC_DISABLE" options: node_id: 4 nic_id: 0 71: # old action num: 47 - action: "NETWORK_NIC_ENABLE" + action: "HOST_NIC_ENABLE" options: node_id: 4 nic_id: 0 72: # old action num: 48 - action: "NETWORK_NIC_DISABLE" + action: "HOST_NIC_DISABLE" options: node_id: 4 nic_id: 1 73: # old action num: 49 - action: "NETWORK_NIC_ENABLE" + action: "HOST_NIC_ENABLE" options: node_id: 4 nic_id: 1 74: # old action num: 50 - action: "NETWORK_NIC_DISABLE" + action: "HOST_NIC_DISABLE" options: node_id: 5 nic_id: 0 75: # old action num: 51 - action: "NETWORK_NIC_ENABLE" + action: "HOST_NIC_ENABLE" options: node_id: 5 nic_id: 0 76: # old action num: 52 - action: "NETWORK_NIC_DISABLE" + action: "HOST_NIC_DISABLE" options: node_id: 6 nic_id: 0 77: # old action num: 53 - action: "NETWORK_NIC_ENABLE" + action: "HOST_NIC_ENABLE" options: node_id: 6 nic_id: 0 diff --git a/src/primaite/config/_package_data/data_manipulation_marl.yaml b/src/primaite/config/_package_data/data_manipulation_marl.yaml index 2a788b73..276441a4 100644 --- a/src/primaite/config/_package_data/data_manipulation_marl.yaml +++ b/src/primaite/config/_package_data/data_manipulation_marl.yaml @@ -262,8 +262,8 @@ agents: - type: NODE_RESET - type: ROUTER_ACL_ADDRULE - type: ROUTER_ACL_REMOVERULE - - type: NETWORK_NIC_ENABLE - - type: NETWORK_NIC_DISABLE + - type: HOST_NIC_ENABLE + - type: HOST_NIC_DISABLE action_map: 0: @@ -591,82 +591,82 @@ agents: target_router_nodename: router_1 position: 9 62: # old action num: 38 - action: "NETWORK_NIC_DISABLE" + action: "HOST_NIC_DISABLE" options: node_id: 0 nic_id: 0 63: # old action num: 39 - action: "NETWORK_NIC_ENABLE" + action: "HOST_NIC_ENABLE" options: node_id: 0 nic_id: 0 64: # old action num: 40 - action: "NETWORK_NIC_DISABLE" + action: "HOST_NIC_DISABLE" options: node_id: 1 nic_id: 0 65: # old action num: 41 - action: "NETWORK_NIC_ENABLE" + action: "HOST_NIC_ENABLE" options: node_id: 1 nic_id: 0 66: # old action num: 42 - action: "NETWORK_NIC_DISABLE" + action: "HOST_NIC_DISABLE" options: node_id: 2 nic_id: 0 67: # old action num: 43 - action: "NETWORK_NIC_ENABLE" + action: "HOST_NIC_ENABLE" options: node_id: 2 nic_id: 0 68: # old action num: 44 - action: "NETWORK_NIC_DISABLE" + action: "HOST_NIC_DISABLE" options: node_id: 3 nic_id: 0 69: # old action num: 45 - action: "NETWORK_NIC_ENABLE" + action: "HOST_NIC_ENABLE" options: node_id: 3 nic_id: 0 70: # old action num: 46 - action: "NETWORK_NIC_DISABLE" + action: "HOST_NIC_DISABLE" options: node_id: 4 nic_id: 0 71: # old action num: 47 - action: "NETWORK_NIC_ENABLE" + action: "HOST_NIC_ENABLE" options: node_id: 4 nic_id: 0 72: # old action num: 48 - action: "NETWORK_NIC_DISABLE" + action: "HOST_NIC_DISABLE" options: node_id: 4 nic_id: 1 73: # old action num: 49 - action: "NETWORK_NIC_ENABLE" + action: "HOST_NIC_ENABLE" options: node_id: 4 nic_id: 1 74: # old action num: 50 - action: "NETWORK_NIC_DISABLE" + action: "HOST_NIC_DISABLE" options: node_id: 5 nic_id: 0 75: # old action num: 51 - action: "NETWORK_NIC_ENABLE" + action: "HOST_NIC_ENABLE" options: node_id: 5 nic_id: 0 76: # old action num: 52 - action: "NETWORK_NIC_DISABLE" + action: "HOST_NIC_DISABLE" options: node_id: 6 nic_id: 0 77: # old action num: 53 - action: "NETWORK_NIC_ENABLE" + action: "HOST_NIC_ENABLE" options: node_id: 6 nic_id: 0 @@ -829,8 +829,8 @@ agents: - type: ROUTER_ACL_REMOVERULE options: target_router_nodename: router_1 - - type: NETWORK_NIC_ENABLE - - type: NETWORK_NIC_DISABLE + - type: HOST_NIC_ENABLE + - type: HOST_NIC_DISABLE action_map: 0: @@ -1158,82 +1158,82 @@ agents: target_router_nodename: router_1 position: 9 62: # old action num: 38 - action: "NETWORK_NIC_DISABLE" + action: "HOST_NIC_DISABLE" options: node_id: 0 nic_id: 0 63: # old action num: 39 - action: "NETWORK_NIC_ENABLE" + action: "HOST_NIC_ENABLE" options: node_id: 0 nic_id: 0 64: # old action num: 40 - action: "NETWORK_NIC_DISABLE" + action: "HOST_NIC_DISABLE" options: node_id: 1 nic_id: 0 65: # old action num: 41 - action: "NETWORK_NIC_ENABLE" + action: "HOST_NIC_ENABLE" options: node_id: 1 nic_id: 0 66: # old action num: 42 - action: "NETWORK_NIC_DISABLE" + action: "HOST_NIC_DISABLE" options: node_id: 2 nic_id: 0 67: # old action num: 43 - action: "NETWORK_NIC_ENABLE" + action: "HOST_NIC_ENABLE" options: node_id: 2 nic_id: 0 68: # old action num: 44 - action: "NETWORK_NIC_DISABLE" + action: "HOST_NIC_DISABLE" options: node_id: 3 nic_id: 0 69: # old action num: 45 - action: "NETWORK_NIC_ENABLE" + action: "HOST_NIC_ENABLE" options: node_id: 3 nic_id: 0 70: # old action num: 46 - action: "NETWORK_NIC_DISABLE" + action: "HOST_NIC_DISABLE" options: node_id: 4 nic_id: 0 71: # old action num: 47 - action: "NETWORK_NIC_ENABLE" + action: "HOST_NIC_ENABLE" options: node_id: 4 nic_id: 0 72: # old action num: 48 - action: "NETWORK_NIC_DISABLE" + action: "HOST_NIC_DISABLE" options: node_id: 4 nic_id: 1 73: # old action num: 49 - action: "NETWORK_NIC_ENABLE" + action: "HOST_NIC_ENABLE" options: node_id: 4 nic_id: 1 74: # old action num: 50 - action: "NETWORK_NIC_DISABLE" + action: "HOST_NIC_DISABLE" options: node_id: 5 nic_id: 0 75: # old action num: 51 - action: "NETWORK_NIC_ENABLE" + action: "HOST_NIC_ENABLE" options: node_id: 5 nic_id: 0 76: # old action num: 52 - action: "NETWORK_NIC_DISABLE" + action: "HOST_NIC_DISABLE" options: node_id: 6 nic_id: 0 77: # old action num: 53 - action: "NETWORK_NIC_ENABLE" + action: "HOST_NIC_ENABLE" options: node_id: 6 nic_id: 0 diff --git a/src/primaite/game/agent/actions.py b/src/primaite/game/agent/actions.py index 0dfdcfb8..090e8481 100644 --- a/src/primaite/game/agent/actions.py +++ b/src/primaite/game/agent/actions.py @@ -729,7 +729,7 @@ class FirewallACLRemoveRuleAction(AbstractAction): ] -class NetworkNICAbstractAction(AbstractAction): +class HostNICAbstractAction(AbstractAction): """ Abstract base class for NIC actions. @@ -738,7 +738,7 @@ class NetworkNICAbstractAction(AbstractAction): """ def __init__(self, manager: "ActionManager", num_nodes: int, max_nics_per_node: int, **kwargs) -> None: - """Init method for NetworkNICAbstractAction. + """Init method for HostNICAbstractAction. :param manager: Reference to the ActionManager which created this action. :type manager: ActionManager @@ -760,7 +760,7 @@ class NetworkNICAbstractAction(AbstractAction): return ["network", "node", node_name, "network_interface", nic_num, self.verb] -class NetworkNICEnableAction(NetworkNICAbstractAction): +class HostNICEnableAction(HostNICAbstractAction): """Action which enables a NIC.""" def __init__(self, manager: "ActionManager", num_nodes: int, max_nics_per_node: int, **kwargs) -> None: @@ -768,7 +768,7 @@ class NetworkNICEnableAction(NetworkNICAbstractAction): self.verb: str = "enable" -class NetworkNICDisableAction(NetworkNICAbstractAction): +class HostNICDisableAction(HostNICAbstractAction): """Action which disables a NIC.""" def __init__(self, manager: "ActionManager", num_nodes: int, max_nics_per_node: int, **kwargs) -> None: @@ -776,51 +776,42 @@ class NetworkNICDisableAction(NetworkNICAbstractAction): self.verb: str = "disable" -class NetworkPortAbstractAction(AbstractAction): - """ - Abstract base class for Port actions. +class NetworkPortEnableAction(AbstractAction): + """Action which enables are port on a router or a firewall.""" - Any action which applies to a Router/Firewall and uses node_id and port_id as its only two parameters - can inherit from this base class. - """ + def __init__(self, manager: "ActionManager", max_nics_per_node: int, **kwargs) -> None: + """Init method for NetworkPortEnableAction. - def __init__(self, manager: "ActionManager", num_nodes: int, max_nics_per_node: int, **kwargs) -> None: - """Init method for NetworkNICAbstractAction. - - :param manager: Reference to the ActionManager which created this action. - :type manager: ActionManager - :param num_nodes: Number of nodes in the simulation. - :type num_nodes: int :param max_nics_per_node: Maximum number of NICs per node. :type max_nics_per_node: int """ super().__init__(manager=manager) - self.shape: Dict[str, int] = {"node_id": num_nodes, "port_id": max_nics_per_node} - self.verb: str # define but don't initialise: defends against children classes not defining this + self.shape: Dict[str, int] = {"port_id": max_nics_per_node} - def form_request(self, node_id: int, port_id: int) -> List[str]: + def form_request(self, target_nodename: str, port_id: int) -> List[str]: """Return the action formatted as a request which can be ingested by the PrimAITE simulation.""" - node_name = self.manager.get_node_name_by_idx(node_idx=node_id) - port_num = self.manager.get_nic_num_by_idx(node_idx=node_id, nic_idx=port_id) - if node_name is None or port_num is None: + if target_nodename is None or port_id is None: return ["do_nothing"] - return ["network", "node", node_name, "network_interface", port_num, self.verb] + return ["network", "node", target_nodename, "network_interface", port_id, "enable"] -class NetworkPortEnableAction(NetworkPortAbstractAction): - """Action which enables a PORT.""" +class NetworkPortDisableAction(AbstractAction): + """Action which disables are port on a router or a firewall.""" - def __init__(self, manager: "ActionManager", num_nodes: int, max_nics_per_node: int, **kwargs) -> None: - super().__init__(manager=manager, num_nodes=num_nodes, max_nics_per_node=max_nics_per_node, **kwargs) - self.verb: str = "enable" + def __init__(self, manager: "ActionManager", max_nics_per_node: int, **kwargs) -> None: + """Init method for NetworkPortDisableAction. + :param max_nics_per_node: Maximum number of NICs per node. + :type max_nics_per_node: int + """ + super().__init__(manager=manager) + self.shape: Dict[str, int] = {"port_id": max_nics_per_node} -class NetworkPortDisableAction(NetworkPortAbstractAction): - """Action which disables a PORT.""" - - def __init__(self, manager: "ActionManager", num_nodes: int, max_nics_per_node: int, **kwargs) -> None: - super().__init__(manager=manager, num_nodes=num_nodes, max_nics_per_node=max_nics_per_node, **kwargs) - self.verb: str = "disable" + def form_request(self, target_nodename: str, port_id: int) -> List[str]: + """Return the action formatted as a request which can be ingested by the PrimAITE simulation.""" + if target_nodename is None or port_id is None: + return ["do_nothing"] + return ["network", "node", target_nodename, "network_interface", port_id, "disable"] class ActionManager: @@ -861,8 +852,8 @@ class ActionManager: "ROUTER_ACL_REMOVERULE": RouterACLRemoveRuleAction, "FIREWALL_ACL_ADDRULE": FirewallACLAddRuleAction, "FIREWALL_ACL_REMOVERULE": FirewallACLRemoveRuleAction, - "NETWORK_NIC_ENABLE": NetworkNICEnableAction, - "NETWORK_NIC_DISABLE": NetworkNICDisableAction, + "HOST_NIC_ENABLE": HostNICEnableAction, + "HOST_NIC_DISABLE": HostNICDisableAction, "NETWORK_PORT_ENABLE": NetworkPortEnableAction, "NETWORK_PORT_DISABLE": NetworkPortDisableAction, } diff --git a/tests/assets/configs/bad_primaite_session.yaml b/tests/assets/configs/bad_primaite_session.yaml index 743d2bba..0f0ca46e 100644 --- a/tests/assets/configs/bad_primaite_session.yaml +++ b/tests/assets/configs/bad_primaite_session.yaml @@ -171,8 +171,8 @@ agents: - type: NODE_RESET - type: ROUTER_ACL_ADDRULE - type: ROUTER_ACL_REMOVERULE - - type: NETWORK_NIC_ENABLE - - type: NETWORK_NIC_DISABLE + - type: HOST_NIC_ENABLE + - type: HOST_NIC_DISABLE action_map: 0: @@ -403,82 +403,82 @@ agents: target_router_nodename: router_1 position: 9 38: - action: "NETWORK_NIC_DISABLE" + action: "HOST_NIC_DISABLE" options: node_id: 0 nic_id: 0 39: - action: "NETWORK_NIC_ENABLE" + action: "HOST_NIC_ENABLE" options: node_id: 0 nic_id: 0 40: - action: "NETWORK_NIC_DISABLE" + action: "HOST_NIC_DISABLE" options: node_id: 1 nic_id: 0 41: - action: "NETWORK_NIC_ENABLE" + action: "HOST_NIC_ENABLE" options: node_id: 1 nic_id: 0 42: - action: "NETWORK_NIC_DISABLE" + action: "HOST_NIC_DISABLE" options: node_id: 2 nic_id: 0 43: - action: "NETWORK_NIC_ENABLE" + action: "HOST_NIC_ENABLE" options: node_id: 2 nic_id: 0 44: - action: "NETWORK_NIC_DISABLE" + action: "HOST_NIC_DISABLE" options: node_id: 3 nic_id: 0 45: - action: "NETWORK_NIC_ENABLE" + action: "HOST_NIC_ENABLE" options: node_id: 3 nic_id: 0 46: - action: "NETWORK_NIC_DISABLE" + action: "HOST_NIC_DISABLE" options: node_id: 4 nic_id: 0 47: - action: "NETWORK_NIC_ENABLE" + action: "HOST_NIC_ENABLE" options: node_id: 4 nic_id: 0 48: - action: "NETWORK_NIC_DISABLE" + action: "HOST_NIC_DISABLE" options: node_id: 4 nic_id: 1 49: - action: "NETWORK_NIC_ENABLE" + action: "HOST_NIC_ENABLE" options: node_id: 4 nic_id: 1 50: - action: "NETWORK_NIC_DISABLE" + action: "HOST_NIC_DISABLE" options: node_id: 5 nic_id: 0 51: - action: "NETWORK_NIC_ENABLE" + action: "HOST_NIC_ENABLE" options: node_id: 5 nic_id: 0 52: - action: "NETWORK_NIC_DISABLE" + action: "HOST_NIC_DISABLE" options: node_id: 6 nic_id: 0 53: - action: "NETWORK_NIC_ENABLE" + action: "HOST_NIC_ENABLE" options: node_id: 6 nic_id: 0 diff --git a/tests/assets/configs/eval_only_primaite_session.yaml b/tests/assets/configs/eval_only_primaite_session.yaml index 525f7bb0..a5c3cd1c 100644 --- a/tests/assets/configs/eval_only_primaite_session.yaml +++ b/tests/assets/configs/eval_only_primaite_session.yaml @@ -175,8 +175,8 @@ agents: - type: NODE_RESET - type: ROUTER_ACL_ADDRULE - type: ROUTER_ACL_REMOVERULE - - type: NETWORK_NIC_ENABLE - - type: NETWORK_NIC_DISABLE + - type: HOST_NIC_ENABLE + - type: HOST_NIC_DISABLE action_map: 0: @@ -407,82 +407,82 @@ agents: target_router_nodename: router_1 position: 9 38: - action: "NETWORK_NIC_DISABLE" + action: "HOST_NIC_DISABLE" options: node_id: 0 nic_id: 0 39: - action: "NETWORK_NIC_ENABLE" + action: "HOST_NIC_ENABLE" options: node_id: 0 nic_id: 0 40: - action: "NETWORK_NIC_DISABLE" + action: "HOST_NIC_DISABLE" options: node_id: 1 nic_id: 0 41: - action: "NETWORK_NIC_ENABLE" + action: "HOST_NIC_ENABLE" options: node_id: 1 nic_id: 0 42: - action: "NETWORK_NIC_DISABLE" + action: "HOST_NIC_DISABLE" options: node_id: 2 nic_id: 0 43: - action: "NETWORK_NIC_ENABLE" + action: "HOST_NIC_ENABLE" options: node_id: 2 nic_id: 0 44: - action: "NETWORK_NIC_DISABLE" + action: "HOST_NIC_DISABLE" options: node_id: 3 nic_id: 0 45: - action: "NETWORK_NIC_ENABLE" + action: "HOST_NIC_ENABLE" options: node_id: 3 nic_id: 0 46: - action: "NETWORK_NIC_DISABLE" + action: "HOST_NIC_DISABLE" options: node_id: 4 nic_id: 0 47: - action: "NETWORK_NIC_ENABLE" + action: "HOST_NIC_ENABLE" options: node_id: 4 nic_id: 0 48: - action: "NETWORK_NIC_DISABLE" + action: "HOST_NIC_DISABLE" options: node_id: 4 nic_id: 1 49: - action: "NETWORK_NIC_ENABLE" + action: "HOST_NIC_ENABLE" options: node_id: 4 nic_id: 1 50: - action: "NETWORK_NIC_DISABLE" + action: "HOST_NIC_DISABLE" options: node_id: 5 nic_id: 0 51: - action: "NETWORK_NIC_ENABLE" + action: "HOST_NIC_ENABLE" options: node_id: 5 nic_id: 0 52: - action: "NETWORK_NIC_DISABLE" + action: "HOST_NIC_DISABLE" options: node_id: 6 nic_id: 0 53: - action: "NETWORK_NIC_ENABLE" + action: "HOST_NIC_ENABLE" options: node_id: 6 nic_id: 0 diff --git a/tests/assets/configs/firewall_actions_network.yaml b/tests/assets/configs/firewall_actions_network.yaml index d4d6f483..b7848c53 100644 --- a/tests/assets/configs/firewall_actions_network.yaml +++ b/tests/assets/configs/firewall_actions_network.yaml @@ -88,6 +88,8 @@ agents: - type: DONOTHING - type: FIREWALL_ACL_ADDRULE - type: FIREWALL_ACL_REMOVERULE + - type: NETWORK_PORT_DISABLE + - type: NETWORK_PORT_ENABLE action_map: 0: action: DONOTHING @@ -212,6 +214,16 @@ agents: firewall_port_name: external firewall_port_direction: outbound position: 1 + 13: + action: NETWORK_PORT_DISABLE + options: + target_nodename: firewall + port_id: 3 + 14: + action: NETWORK_PORT_ENABLE + options: + target_nodename: firewall + port_id: 3 options: nodes: - node_name: client_1 diff --git a/tests/assets/configs/multi_agent_session.yaml b/tests/assets/configs/multi_agent_session.yaml index 77a17459..af32a527 100644 --- a/tests/assets/configs/multi_agent_session.yaml +++ b/tests/assets/configs/multi_agent_session.yaml @@ -182,8 +182,8 @@ agents: - type: NODE_RESET - type: ROUTER_ACL_ADDRULE - type: ROUTER_ACL_REMOVERULE - - type: NETWORK_NIC_ENABLE - - type: NETWORK_NIC_DISABLE + - type: HOST_NIC_ENABLE + - type: HOST_NIC_DISABLE action_map: 0: @@ -414,82 +414,82 @@ agents: target_router_nodename: router_1 position: 9 38: - action: "NETWORK_NIC_DISABLE" + action: "HOST_NIC_DISABLE" options: node_id: 0 nic_id: 0 39: - action: "NETWORK_NIC_ENABLE" + action: "HOST_NIC_ENABLE" options: node_id: 0 nic_id: 0 40: - action: "NETWORK_NIC_DISABLE" + action: "HOST_NIC_DISABLE" options: node_id: 1 nic_id: 0 41: - action: "NETWORK_NIC_ENABLE" + action: "HOST_NIC_ENABLE" options: node_id: 1 nic_id: 0 42: - action: "NETWORK_NIC_DISABLE" + action: "HOST_NIC_DISABLE" options: node_id: 2 nic_id: 0 43: - action: "NETWORK_NIC_ENABLE" + action: "HOST_NIC_ENABLE" options: node_id: 2 nic_id: 0 44: - action: "NETWORK_NIC_DISABLE" + action: "HOST_NIC_DISABLE" options: node_id: 3 nic_id: 0 45: - action: "NETWORK_NIC_ENABLE" + action: "HOST_NIC_ENABLE" options: node_id: 3 nic_id: 0 46: - action: "NETWORK_NIC_DISABLE" + action: "HOST_NIC_DISABLE" options: node_id: 4 nic_id: 0 47: - action: "NETWORK_NIC_ENABLE" + action: "HOST_NIC_ENABLE" options: node_id: 4 nic_id: 0 48: - action: "NETWORK_NIC_DISABLE" + action: "HOST_NIC_DISABLE" options: node_id: 4 nic_id: 1 49: - action: "NETWORK_NIC_ENABLE" + action: "HOST_NIC_ENABLE" options: node_id: 4 nic_id: 1 50: - action: "NETWORK_NIC_DISABLE" + action: "HOST_NIC_DISABLE" options: node_id: 5 nic_id: 0 51: - action: "NETWORK_NIC_ENABLE" + action: "HOST_NIC_ENABLE" options: node_id: 5 nic_id: 0 52: - action: "NETWORK_NIC_DISABLE" + action: "HOST_NIC_DISABLE" options: node_id: 6 nic_id: 0 53: - action: "NETWORK_NIC_ENABLE" + action: "HOST_NIC_ENABLE" options: node_id: 6 nic_id: 0 @@ -638,8 +638,8 @@ agents: - type: NODE_RESET - type: ROUTER_ACL_ADDRULE - type: ROUTER_ACL_REMOVERULE - - type: NETWORK_NIC_ENABLE - - type: NETWORK_NIC_DISABLE + - type: HOST_NIC_ENABLE + - type: HOST_NIC_DISABLE action_map: 0: @@ -870,82 +870,82 @@ agents: target_router_nodename: router_1 position: 9 38: - action: "NETWORK_NIC_DISABLE" + action: "HOST_NIC_DISABLE" options: node_id: 0 nic_id: 0 39: - action: "NETWORK_NIC_ENABLE" + action: "HOST_NIC_ENABLE" options: node_id: 0 nic_id: 0 40: - action: "NETWORK_NIC_DISABLE" + action: "HOST_NIC_DISABLE" options: node_id: 1 nic_id: 0 41: - action: "NETWORK_NIC_ENABLE" + action: "HOST_NIC_ENABLE" options: node_id: 1 nic_id: 0 42: - action: "NETWORK_NIC_DISABLE" + action: "HOST_NIC_DISABLE" options: node_id: 2 nic_id: 0 43: - action: "NETWORK_NIC_ENABLE" + action: "HOST_NIC_ENABLE" options: node_id: 2 nic_id: 0 44: - action: "NETWORK_NIC_DISABLE" + action: "HOST_NIC_DISABLE" options: node_id: 3 nic_id: 0 45: - action: "NETWORK_NIC_ENABLE" + action: "HOST_NIC_ENABLE" options: node_id: 3 nic_id: 0 46: - action: "NETWORK_NIC_DISABLE" + action: "HOST_NIC_DISABLE" options: node_id: 4 nic_id: 0 47: - action: "NETWORK_NIC_ENABLE" + action: "HOST_NIC_ENABLE" options: node_id: 4 nic_id: 0 48: - action: "NETWORK_NIC_DISABLE" + action: "HOST_NIC_DISABLE" options: node_id: 4 nic_id: 1 49: - action: "NETWORK_NIC_ENABLE" + action: "HOST_NIC_ENABLE" options: node_id: 4 nic_id: 1 50: - action: "NETWORK_NIC_DISABLE" + action: "HOST_NIC_DISABLE" options: node_id: 5 nic_id: 0 51: - action: "NETWORK_NIC_ENABLE" + action: "HOST_NIC_ENABLE" options: node_id: 5 nic_id: 0 52: - action: "NETWORK_NIC_DISABLE" + action: "HOST_NIC_DISABLE" options: node_id: 6 nic_id: 0 53: - action: "NETWORK_NIC_ENABLE" + action: "HOST_NIC_ENABLE" options: node_id: 6 nic_id: 0 diff --git a/tests/assets/configs/shared_rewards.yaml b/tests/assets/configs/shared_rewards.yaml index e7226b5f..d283a7f1 100644 --- a/tests/assets/configs/shared_rewards.yaml +++ b/tests/assets/configs/shared_rewards.yaml @@ -260,8 +260,8 @@ agents: - type: NODE_RESET - type: ROUTER_ACL_ADDRULE - type: ROUTER_ACL_REMOVERULE - - type: NETWORK_NIC_ENABLE - - type: NETWORK_NIC_DISABLE + - type: HOST_NIC_ENABLE + - type: HOST_NIC_DISABLE action_map: 0: @@ -589,82 +589,82 @@ agents: target_router_nodename: router_1 position: 9 62: # old action num: 38 - action: "NETWORK_NIC_DISABLE" + action: "HOST_NIC_DISABLE" options: node_id: 0 nic_id: 0 63: # old action num: 39 - action: "NETWORK_NIC_ENABLE" + action: "HOST_NIC_ENABLE" options: node_id: 0 nic_id: 0 64: # old action num: 40 - action: "NETWORK_NIC_DISABLE" + action: "HOST_NIC_DISABLE" options: node_id: 1 nic_id: 0 65: # old action num: 41 - action: "NETWORK_NIC_ENABLE" + action: "HOST_NIC_ENABLE" options: node_id: 1 nic_id: 0 66: # old action num: 42 - action: "NETWORK_NIC_DISABLE" + action: "HOST_NIC_DISABLE" options: node_id: 2 nic_id: 0 67: # old action num: 43 - action: "NETWORK_NIC_ENABLE" + action: "HOST_NIC_ENABLE" options: node_id: 2 nic_id: 0 68: # old action num: 44 - action: "NETWORK_NIC_DISABLE" + action: "HOST_NIC_DISABLE" options: node_id: 3 nic_id: 0 69: # old action num: 45 - action: "NETWORK_NIC_ENABLE" + action: "HOST_NIC_ENABLE" options: node_id: 3 nic_id: 0 70: # old action num: 46 - action: "NETWORK_NIC_DISABLE" + action: "HOST_NIC_DISABLE" options: node_id: 4 nic_id: 0 71: # old action num: 47 - action: "NETWORK_NIC_ENABLE" + action: "HOST_NIC_ENABLE" options: node_id: 4 nic_id: 0 72: # old action num: 48 - action: "NETWORK_NIC_DISABLE" + action: "HOST_NIC_DISABLE" options: node_id: 4 nic_id: 1 73: # old action num: 49 - action: "NETWORK_NIC_ENABLE" + action: "HOST_NIC_ENABLE" options: node_id: 4 nic_id: 1 74: # old action num: 50 - action: "NETWORK_NIC_DISABLE" + action: "HOST_NIC_DISABLE" options: node_id: 5 nic_id: 0 75: # old action num: 51 - action: "NETWORK_NIC_ENABLE" + action: "HOST_NIC_ENABLE" options: node_id: 5 nic_id: 0 76: # old action num: 52 - action: "NETWORK_NIC_DISABLE" + action: "HOST_NIC_DISABLE" options: node_id: 6 nic_id: 0 77: # old action num: 53 - action: "NETWORK_NIC_ENABLE" + action: "HOST_NIC_ENABLE" options: node_id: 6 nic_id: 0 diff --git a/tests/assets/configs/test_application_install.yaml b/tests/assets/configs/test_application_install.yaml index 1bf88277..b3fca4bc 100644 --- a/tests/assets/configs/test_application_install.yaml +++ b/tests/assets/configs/test_application_install.yaml @@ -260,8 +260,8 @@ agents: - type: NODE_RESET - type: ROUTER_ACL_ADDRULE - type: ROUTER_ACL_REMOVERULE - - type: NETWORK_NIC_ENABLE - - type: NETWORK_NIC_DISABLE + - type: HOST_NIC_ENABLE + - type: HOST_NIC_DISABLE - type: NODE_APPLICATION_INSTALL - type: NODE_APPLICATION_REMOVE - type: NODE_APPLICATION_EXECUTE @@ -592,82 +592,82 @@ agents: target_router_hostname: router_1 position: 9 62: # old action num: 38 - action: "NETWORK_NIC_DISABLE" + action: "HOST_NIC_DISABLE" options: node_id: 0 nic_id: 0 63: # old action num: 39 - action: "NETWORK_NIC_ENABLE" + action: "HOST_NIC_ENABLE" options: node_id: 0 nic_id: 0 64: # old action num: 40 - action: "NETWORK_NIC_DISABLE" + action: "HOST_NIC_DISABLE" options: node_id: 1 nic_id: 0 65: # old action num: 41 - action: "NETWORK_NIC_ENABLE" + action: "HOST_NIC_ENABLE" options: node_id: 1 nic_id: 0 66: # old action num: 42 - action: "NETWORK_NIC_DISABLE" + action: "HOST_NIC_DISABLE" options: node_id: 2 nic_id: 0 67: # old action num: 43 - action: "NETWORK_NIC_ENABLE" + action: "HOST_NIC_ENABLE" options: node_id: 2 nic_id: 0 68: # old action num: 44 - action: "NETWORK_NIC_DISABLE" + action: "HOST_NIC_DISABLE" options: node_id: 3 nic_id: 0 69: # old action num: 45 - action: "NETWORK_NIC_ENABLE" + action: "HOST_NIC_ENABLE" options: node_id: 3 nic_id: 0 70: # old action num: 46 - action: "NETWORK_NIC_DISABLE" + action: "HOST_NIC_DISABLE" options: node_id: 4 nic_id: 0 71: # old action num: 47 - action: "NETWORK_NIC_ENABLE" + action: "HOST_NIC_ENABLE" options: node_id: 4 nic_id: 0 72: # old action num: 48 - action: "NETWORK_NIC_DISABLE" + action: "HOST_NIC_DISABLE" options: node_id: 4 nic_id: 1 73: # old action num: 49 - action: "NETWORK_NIC_ENABLE" + action: "HOST_NIC_ENABLE" options: node_id: 4 nic_id: 1 74: # old action num: 50 - action: "NETWORK_NIC_DISABLE" + action: "HOST_NIC_DISABLE" options: node_id: 5 nic_id: 0 75: # old action num: 51 - action: "NETWORK_NIC_ENABLE" + action: "HOST_NIC_ENABLE" options: node_id: 5 nic_id: 0 76: # old action num: 52 - action: "NETWORK_NIC_DISABLE" + action: "HOST_NIC_DISABLE" options: node_id: 6 nic_id: 0 77: # old action num: 53 - action: "NETWORK_NIC_ENABLE" + action: "HOST_NIC_ENABLE" options: node_id: 6 nic_id: 0 diff --git a/tests/assets/configs/test_primaite_session.yaml b/tests/assets/configs/test_primaite_session.yaml index 0cb371d5..bcd86781 100644 --- a/tests/assets/configs/test_primaite_session.yaml +++ b/tests/assets/configs/test_primaite_session.yaml @@ -185,8 +185,8 @@ agents: - type: NODE_RESET - type: ROUTER_ACL_ADDRULE - type: ROUTER_ACL_REMOVERULE - - type: NETWORK_NIC_ENABLE - - type: NETWORK_NIC_DISABLE + - type: HOST_NIC_ENABLE + - type: HOST_NIC_DISABLE action_map: 0: @@ -417,82 +417,82 @@ agents: target_router_nodename: router_1 position: 9 38: - action: "NETWORK_NIC_DISABLE" + action: "HOST_NIC_DISABLE" options: node_id: 0 nic_id: 0 39: - action: "NETWORK_NIC_ENABLE" + action: "HOST_NIC_ENABLE" options: node_id: 0 nic_id: 0 40: - action: "NETWORK_NIC_DISABLE" + action: "HOST_NIC_DISABLE" options: node_id: 1 nic_id: 0 41: - action: "NETWORK_NIC_ENABLE" + action: "HOST_NIC_ENABLE" options: node_id: 1 nic_id: 0 42: - action: "NETWORK_NIC_DISABLE" + action: "HOST_NIC_DISABLE" options: node_id: 2 nic_id: 0 43: - action: "NETWORK_NIC_ENABLE" + action: "HOST_NIC_ENABLE" options: node_id: 2 nic_id: 0 44: - action: "NETWORK_NIC_DISABLE" + action: "HOST_NIC_DISABLE" options: node_id: 3 nic_id: 0 45: - action: "NETWORK_NIC_ENABLE" + action: "HOST_NIC_ENABLE" options: node_id: 3 nic_id: 0 46: - action: "NETWORK_NIC_DISABLE" + action: "HOST_NIC_DISABLE" options: node_id: 4 nic_id: 0 47: - action: "NETWORK_NIC_ENABLE" + action: "HOST_NIC_ENABLE" options: node_id: 4 nic_id: 0 48: - action: "NETWORK_NIC_DISABLE" + action: "HOST_NIC_DISABLE" options: node_id: 4 nic_id: 1 49: - action: "NETWORK_NIC_ENABLE" + action: "HOST_NIC_ENABLE" options: node_id: 4 nic_id: 1 50: - action: "NETWORK_NIC_DISABLE" + action: "HOST_NIC_DISABLE" options: node_id: 5 nic_id: 0 51: - action: "NETWORK_NIC_ENABLE" + action: "HOST_NIC_ENABLE" options: node_id: 5 nic_id: 0 52: - action: "NETWORK_NIC_DISABLE" + action: "HOST_NIC_DISABLE" options: node_id: 6 nic_id: 0 53: - action: "NETWORK_NIC_ENABLE" + action: "HOST_NIC_ENABLE" options: node_id: 6 nic_id: 0 diff --git a/tests/assets/configs/train_only_primaite_session.yaml b/tests/assets/configs/train_only_primaite_session.yaml index 619b7a23..70b33caa 100644 --- a/tests/assets/configs/train_only_primaite_session.yaml +++ b/tests/assets/configs/train_only_primaite_session.yaml @@ -183,8 +183,8 @@ agents: - type: NODE_RESET - type: ROUTER_ACL_ADDRULE - type: ROUTER_ACL_REMOVERULE - - type: NETWORK_NIC_ENABLE - - type: NETWORK_NIC_DISABLE + - type: HOST_NIC_ENABLE + - type: HOST_NIC_DISABLE action_map: 0: @@ -415,82 +415,82 @@ agents: target_router_nodename: router_1 position: 9 38: - action: "NETWORK_NIC_DISABLE" + action: "HOST_NIC_DISABLE" options: node_id: 0 nic_id: 0 39: - action: "NETWORK_NIC_ENABLE" + action: "HOST_NIC_ENABLE" options: node_id: 0 nic_id: 0 40: - action: "NETWORK_NIC_DISABLE" + action: "HOST_NIC_DISABLE" options: node_id: 1 nic_id: 0 41: - action: "NETWORK_NIC_ENABLE" + action: "HOST_NIC_ENABLE" options: node_id: 1 nic_id: 0 42: - action: "NETWORK_NIC_DISABLE" + action: "HOST_NIC_DISABLE" options: node_id: 2 nic_id: 0 43: - action: "NETWORK_NIC_ENABLE" + action: "HOST_NIC_ENABLE" options: node_id: 2 nic_id: 0 44: - action: "NETWORK_NIC_DISABLE" + action: "HOST_NIC_DISABLE" options: node_id: 3 nic_id: 0 45: - action: "NETWORK_NIC_ENABLE" + action: "HOST_NIC_ENABLE" options: node_id: 3 nic_id: 0 46: - action: "NETWORK_NIC_DISABLE" + action: "HOST_NIC_DISABLE" options: node_id: 4 nic_id: 0 47: - action: "NETWORK_NIC_ENABLE" + action: "HOST_NIC_ENABLE" options: node_id: 4 nic_id: 0 48: - action: "NETWORK_NIC_DISABLE" + action: "HOST_NIC_DISABLE" options: node_id: 4 nic_id: 1 49: - action: "NETWORK_NIC_ENABLE" + action: "HOST_NIC_ENABLE" options: node_id: 4 nic_id: 1 50: - action: "NETWORK_NIC_DISABLE" + action: "HOST_NIC_DISABLE" options: node_id: 5 nic_id: 0 51: - action: "NETWORK_NIC_ENABLE" + action: "HOST_NIC_ENABLE" options: node_id: 5 nic_id: 0 52: - action: "NETWORK_NIC_DISABLE" + action: "HOST_NIC_DISABLE" options: node_id: 6 nic_id: 0 53: - action: "NETWORK_NIC_ENABLE" + action: "HOST_NIC_ENABLE" options: node_id: 6 nic_id: 0 diff --git a/tests/conftest.py b/tests/conftest.py index d040f775..c6473ef5 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -498,8 +498,8 @@ def game_and_agent(): {"type": "NODE_RESET"}, {"type": "ROUTER_ACL_ADDRULE"}, {"type": "ROUTER_ACL_REMOVERULE"}, - {"type": "NETWORK_NIC_ENABLE"}, - {"type": "NETWORK_NIC_DISABLE"}, + {"type": "HOST_NIC_ENABLE"}, + {"type": "HOST_NIC_DISABLE"}, {"type": "NETWORK_PORT_ENABLE"}, {"type": "NETWORK_PORT_DISABLE"}, ] diff --git a/tests/integration_tests/game_layer/test_actions.py b/tests/integration_tests/game_layer/test_actions.py index b66294fb..3ebce6ad 100644 --- a/tests/integration_tests/game_layer/test_actions.py +++ b/tests/integration_tests/game_layer/test_actions.py @@ -198,8 +198,8 @@ def test_router_acl_removerule_integration(game_and_agent: Tuple[PrimaiteGame, P assert client_1.ping("10.0.2.3") -def test_network_nic_disable_integration(game_and_agent: Tuple[PrimaiteGame, ProxyAgent]): - """Test that the NetworkNICDisableAction can form a request and that it is accepted by the simulation.""" +def test_host_nic_disable_integration(game_and_agent: Tuple[PrimaiteGame, ProxyAgent]): + """Test that the HostNICDisableAction can form a request and that it is accepted by the simulation.""" game, agent = game_and_agent # 1: Check that client_1 can access the network @@ -214,7 +214,7 @@ def test_network_nic_disable_integration(game_and_agent: Tuple[PrimaiteGame, Pro # 2: Disable the NIC on client_1 action = ( - "NETWORK_NIC_DISABLE", + "HOST_NIC_DISABLE", { "node_id": 0, # client_1 "nic_id": 0, # the only nic (eth-1) @@ -233,8 +233,8 @@ def test_network_nic_disable_integration(game_and_agent: Tuple[PrimaiteGame, Pro assert server_1.ping("10.0.2.3") -def test_network_nic_enable_integration(game_and_agent: Tuple[PrimaiteGame, ProxyAgent]): - """Test that the NetworkNICEnableAction can form a request and that it is accepted by the simulation.""" +def test_host_nic_enable_integration(game_and_agent: Tuple[PrimaiteGame, ProxyAgent]): + """Test that the HostNICEnableAction can form a request and that it is accepted by the simulation.""" game, agent = game_and_agent @@ -245,7 +245,7 @@ def test_network_nic_enable_integration(game_and_agent: Tuple[PrimaiteGame, Prox # 2: Use action to enable nic action = ( - "NETWORK_NIC_ENABLE", + "HOST_NIC_ENABLE", { "node_id": 0, # client_1 "nic_id": 0, # the only nic (eth-1) @@ -343,8 +343,8 @@ def test_network_router_port_disable_integration(game_and_agent: Tuple[PrimaiteG action = ( "NETWORK_PORT_DISABLE", { - "node_id": 3, # router - "port_id": 0, # port 1 + "target_nodename": "router", # router + "port_id": 1, # port 1 }, ) agent.store_action(action) @@ -375,8 +375,8 @@ def test_network_router_port_enable_integration(game_and_agent: Tuple[PrimaiteGa action = ( "NETWORK_PORT_ENABLE", { - "node_id": 3, # router - "port_id": 0, # port 1 + "target_nodename": "router", # router + "port_id": 1, # port 1 }, ) agent.store_action(action) @@ -585,3 +585,22 @@ def test_firewall_acl_add_remove_rule_integration(): env.step(12) # Remove ACL rule from External Outbound assert firewall.external_outbound_acl.num_rules == 1 + + +def test_firewall_port_disable_enable_integration(): + """ + Test that NetworkPortEnableAction and NetworkPortDisableAction can form a request and that it is accepted by the simulation. + """ + with open(FIREWALL_ACTIONS_NETWORK, "r") as f: + cfg = yaml.safe_load(f) + + env = PrimaiteGymEnv(game_config=cfg) + firewall = env.game.simulation.network.get_node_by_hostname("firewall") + + assert firewall.dmz_port.enabled == True + + env.step(13) # Disable Firewall DMZ Port + assert firewall.dmz_port.enabled == False + + env.step(14) # Enable Firewall DMZ Port + assert firewall.dmz_port.enabled == True From 15cb2e6970a184c83c6d56c01ad3ae3f26660b1e Mon Sep 17 00:00:00 2001 From: Marek Wolan Date: Sun, 31 Mar 2024 17:31:10 +0100 Subject: [PATCH 073/124] #2417 Add NestedObservation --- .../agent/observations/acl_observation.py | 2 +- .../observations/file_system_observations.py | 4 +- .../observations/firewall_observation.py | 2 +- .../agent/observations/host_observations.py | 2 +- .../agent/observations/nic_observations.py | 4 +- .../agent/observations/node_observations.py | 2 +- .../agent/observations/observation_manager.py | 136 ++++++++++++++++-- .../game/agent/observations/observations.py | 11 +- .../agent/observations/router_observation.py | 2 +- .../observations/software_observation.py | 2 +- 10 files changed, 140 insertions(+), 27 deletions(-) diff --git a/src/primaite/game/agent/observations/acl_observation.py b/src/primaite/game/agent/observations/acl_observation.py index 2d29223d..7601e678 100644 --- a/src/primaite/game/agent/observations/acl_observation.py +++ b/src/primaite/game/agent/observations/acl_observation.py @@ -40,7 +40,7 @@ class ACLObservation(AbstractObservation, identifier="ACL"): protocol_list: List[str], ) -> None: """ - Initialize an ACL observation instance. + Initialise an ACL observation instance. :param where: Where in the simulation state dictionary to find the relevant information for this ACL. :type where: WhereType diff --git a/src/primaite/game/agent/observations/file_system_observations.py b/src/primaite/game/agent/observations/file_system_observations.py index a30bfc82..3c931bc8 100644 --- a/src/primaite/game/agent/observations/file_system_observations.py +++ b/src/primaite/game/agent/observations/file_system_observations.py @@ -25,7 +25,7 @@ class FileObservation(AbstractObservation, identifier="FILE"): def __init__(self, where: WhereType, include_num_access: bool) -> None: """ - Initialize a file observation instance. + Initialise a file observation instance. :param where: Where in the simulation state dictionary to find the relevant information for this file. A typical location for a file might be @@ -107,7 +107,7 @@ class FolderObservation(AbstractObservation, identifier="FOLDER"): self, where: WhereType, files: Iterable[FileObservation], num_files: int, include_num_access: bool ) -> None: """ - Initialize a folder observation instance. + Initialise a folder observation instance. :param where: Where in the simulation state dictionary to find the relevant information for this folder. A typical location for a folder might be ['network', 'nodes', , 'folders', ]. diff --git a/src/primaite/game/agent/observations/firewall_observation.py b/src/primaite/game/agent/observations/firewall_observation.py index 6397d473..376e4824 100644 --- a/src/primaite/game/agent/observations/firewall_observation.py +++ b/src/primaite/game/agent/observations/firewall_observation.py @@ -42,7 +42,7 @@ class FirewallObservation(AbstractObservation, identifier="FIREWALL"): num_rules: int, ) -> None: """ - Initialize a firewall observation instance. + Initialise a firewall observation instance. :param where: Where in the simulation state dictionary to find the relevant information for this firewall. A typical location for a firewall might be ['network', 'nodes', ]. diff --git a/src/primaite/game/agent/observations/host_observations.py b/src/primaite/game/agent/observations/host_observations.py index 34c9b3ff..9146979a 100644 --- a/src/primaite/game/agent/observations/host_observations.py +++ b/src/primaite/game/agent/observations/host_observations.py @@ -62,7 +62,7 @@ class HostObservation(AbstractObservation, identifier="HOST"): include_num_access: bool, ) -> None: """ - Initialize a host observation instance. + Initialise a host observation instance. :param where: Where in the simulation state dictionary to find the relevant information for this host. A typical location for a host might be ['network', 'nodes', ]. diff --git a/src/primaite/game/agent/observations/nic_observations.py b/src/primaite/game/agent/observations/nic_observations.py index 3be53112..ff2731ff 100644 --- a/src/primaite/game/agent/observations/nic_observations.py +++ b/src/primaite/game/agent/observations/nic_observations.py @@ -22,7 +22,7 @@ class NICObservation(AbstractObservation, identifier="NETWORK_INTERFACE"): def __init__(self, where: WhereType, include_nmne: bool) -> None: """ - Initialize a network interface observation instance. + Initialise a network interface observation instance. :param where: Where in the simulation state dictionary to find the relevant information for this interface. A typical location for a network interface might be @@ -108,7 +108,7 @@ class PortObservation(AbstractObservation, identifier="PORT"): def __init__(self, where: WhereType) -> None: """ - Initialize a port observation instance. + Initialise a port observation instance. :param where: Where in the simulation state dictionary to find the relevant information for this port. A typical location for a port might be ['network', 'nodes', , 'NICs', ]. diff --git a/src/primaite/game/agent/observations/node_observations.py b/src/primaite/game/agent/observations/node_observations.py index 0e63f440..3f384ece 100644 --- a/src/primaite/game/agent/observations/node_observations.py +++ b/src/primaite/game/agent/observations/node_observations.py @@ -61,7 +61,7 @@ class NodesObservation(AbstractObservation, identifier="NODES"): firewalls: List[FirewallObservation], ) -> None: """ - Initialize a nodes observation instance. + Initialise a nodes observation instance. :param where: Where in the simulation state dictionary to find the relevant information for nodes. A typical location for nodes might be ['network', 'nodes']. diff --git a/src/primaite/game/agent/observations/observation_manager.py b/src/primaite/game/agent/observations/observation_manager.py index be90041e..a6981ddc 100644 --- a/src/primaite/game/agent/observations/observation_manager.py +++ b/src/primaite/game/agent/observations/observation_manager.py @@ -1,6 +1,10 @@ -from typing import Dict, TYPE_CHECKING +from __future__ import annotations +from typing import Any, Dict, List, TYPE_CHECKING + +from gymnasium import spaces from gymnasium.core import ObsType +from pydantic import BaseModel, ConfigDict, model_validator, ValidationError from primaite.game.agent.observations.observations import AbstractObservation @@ -8,6 +12,114 @@ if TYPE_CHECKING: from primaite.game.game import PrimaiteGame +class NestedObservation(AbstractObservation, identifier="CUSTOM"): + """Observation type that allows combining other observations into a gymnasium.spaces.Dict space.""" + + class NestedObservationItem(BaseModel): + """One list item of the config.""" + + model_config = ConfigDict(extra="forbid") + type: str + """Select observation class. It maps to the identifier of the obs class by checking the registry.""" + label: str + """Dict key in the final observation space.""" + options: Dict + """Options to pass to the observation class from_config method.""" + + @model_validator(mode="after") + def check_model(self) -> "NestedObservation.NestedObservationItem": + """Make sure tha the config options match up with the selected observation type.""" + obs_subclass_name = self.type + obs_options = self.options + if obs_subclass_name not in AbstractObservation._registry: + raise ValueError(f"Observation of type {obs_subclass_name} could not be found.") + obs_schema = AbstractObservation._registry[obs_subclass_name].ConfigSchema + try: + obs_schema(**obs_options) + except ValidationError as e: + raise ValueError(f"Observation options did not match schema, got this error: {e}") + return self + + class ConfigSchema(AbstractObservation.ConfigSchema): + """Configuration schema for NestedObservation.""" + + components: List[NestedObservation.NestedObservationItem] + """List of observation components to be part of this space.""" + + def __init__(self, components: Dict[str, AbstractObservation]) -> None: + """Initialise nested observation.""" + self.components: Dict[str, AbstractObservation] = components + """Maps label: observation object""" + + self.default_observation = {label: obs.default_observation for label, obs in self.components.items()} + """Default observation is just the default observations of constituents.""" + + def observe(self, state: Dict) -> Any: + """ + Generate observation based on the current state of the simulation. + + :param state: Simulation state dictionary. + :type state: Dict + :return: Observation containing the status information about the host. + :rtype: ObsType + """ + return {label: obs.observe(state) for label, obs in self.components.items()} + + @property + def space(self) -> spaces.Space: + """ + Gymnasium space object describing the observation space shape. + + :return: Gymnasium space representing the nested observation space. + :rtype: spaces.Space + """ + return spaces.Dict({label: obs.space for label, obs in self.components.items()}) + + @classmethod + def from_config(cls, config: ConfigSchema) -> NestedObservation: + """ + Read the Nested observation config and create all defined subcomponents. + + Example configuration that utilises NestedObservation: + This lets us have different options for different types of hosts. + + ```yaml + observation_space: + - type: CUSTOM + options: + components: + + - type: HOSTS + label: COMPUTERS # What is the dictionary key called + options: + hosts: + - client_1 + - client_2 + num_services: 0 + num_applications: 5 + ... # other options + + - type: HOSTS + label: SERVERS # What is the dictionary key called + options: + hosts: + - hostname: database_server + - hostname: web_server + num_services: 4 + num_applications: 0 + num_folders: 2 + num_files: 2 + + ``` + """ + instances = dict() + for component in config.components: + obs_class = AbstractObservation._registry[component.type] + obs_instance = obs_class.from_config(obs_class.ConfigSchema(**component.options)) + instances[component.label] = obs_instance + return cls(components=instances) + + class ObservationManager: """ Manage the observations of an Agent. @@ -18,18 +130,15 @@ class ObservationManager: 3. Formatting this information so an agent can use it to make decisions. """ - # TODO: Dear code reader: This class currently doesn't do much except hold an observation object. It will be changed - # to have more of it's own behaviour, and it will replace UC2BlueObservation and UC2RedObservation during the next - # refactor. - - def __init__(self, observation: AbstractObservation) -> None: + def __init__(self, obs: AbstractObservation) -> None: """Initialise observation space. :param observation: Observation object :type observation: AbstractObservation """ - self.obs: AbstractObservation = observation + self.obs: AbstractObservation = obs self.current_observation: ObsType + """Cached copy of the observation at the time it was most recently calculated.""" def update(self, state: Dict) -> Dict: """ @@ -48,7 +157,8 @@ class ObservationManager: @classmethod def from_config(cls, config: Dict, game: "PrimaiteGame") -> "ObservationManager": - """Create observation space from a config. + """ + Create observation space from a config. :param config: Dictionary containing the configuration for this observation space. It should contain the key 'type' which selects which observation class to use (from a choice of: @@ -58,10 +168,8 @@ class ObservationManager: :param game: Reference to the PrimaiteGame object that spawned this observation. :type game: PrimaiteGame """ - - for obs_cfg in config: - obs_type = obs_cfg['type'] - obs_class = AbstractObservation._registry[obs_type] - observation = obs_class.from_config(obs_class.ConfigSchema(**obs_cfg['options'])) + obs_type = config["type"] + obs_class = AbstractObservation._registry[obs_type] + observation = obs_class.from_config(obs_class.ConfigSchema(**config["options"])) obs_manager = cls(observation) - return obs_manager \ No newline at end of file + return obs_manager diff --git a/src/primaite/game/agent/observations/observations.py b/src/primaite/game/agent/observations/observations.py index 08871072..feddc3ed 100644 --- a/src/primaite/game/agent/observations/observations.py +++ b/src/primaite/game/agent/observations/observations.py @@ -3,6 +3,7 @@ from abc import ABC, abstractmethod from typing import Any, Dict, Iterable, Type from gymnasium import spaces +from gymnasium.core import ObsType from pydantic import BaseModel, ConfigDict from primaite import getLogger @@ -26,6 +27,10 @@ class AbstractObservation(ABC): Automatically populated when subclasses are defined. Used for defining from_config. """ + def __init__(self) -> None: + """Initialise an observation. This method must be overwritten.""" + self.default_observation: ObsType + def __init_subclass__(cls, identifier: str, **kwargs: Any) -> None: """ Register an observation type. @@ -58,10 +63,10 @@ class AbstractObservation(ABC): pass @classmethod - def from_config(cls, cfg: Dict) -> "AbstractObservation": + @abstractmethod + def from_config(cls, config: ConfigSchema) -> "AbstractObservation": """Create this observation space component form a serialised format.""" - ObservationType = cls._registry[cfg["type"]] - return ObservationType.from_config(cfg=cfg) + return cls() ''' diff --git a/src/primaite/game/agent/observations/router_observation.py b/src/primaite/game/agent/observations/router_observation.py index b8dee2c2..97d8ab41 100644 --- a/src/primaite/game/agent/observations/router_observation.py +++ b/src/primaite/game/agent/observations/router_observation.py @@ -47,7 +47,7 @@ class RouterObservation(AbstractObservation, identifier="ROUTER"): acl: ACLObservation, ) -> None: """ - Initialize a router observation instance. + Initialise a router observation instance. :param where: Where in the simulation state dictionary to find the relevant information for this router. A typical location for a router might be ['network', 'nodes', ]. diff --git a/src/primaite/game/agent/observations/software_observation.py b/src/primaite/game/agent/observations/software_observation.py index eb94651d..0c031345 100644 --- a/src/primaite/game/agent/observations/software_observation.py +++ b/src/primaite/game/agent/observations/software_observation.py @@ -20,7 +20,7 @@ class ServiceObservation(AbstractObservation, identifier="SERVICE"): def __init__(self, where: WhereType) -> None: """ - Initialize a service observation instance. + Initialise a service observation instance. :param where: Where in the simulation state dictionary to find the relevant information for this service. A typical location for a service might be ['network', 'nodes', , 'services', ]. From 62ebca8c08e9966cb52d29d01e5a98b7cbb9aff8 Mon Sep 17 00:00:00 2001 From: Marek Wolan Date: Sun, 31 Mar 2024 21:39:24 +0100 Subject: [PATCH 074/124] #2417 Remove references to old obs names and add link obs --- CHANGELOG.md | 2 +- .../network/network_interfaces.rst | 2 +- .../agent/observations/acl_observation.py | 6 +- .../observations/file_system_observations.py | 10 +- .../observations/firewall_observation.py | 8 +- .../agent/observations/host_observations.py | 18 +- .../agent/observations/link_observation.py | 155 ++++++++++ .../agent/observations/nic_observations.py | 9 +- .../agent/observations/node_observations.py | 12 +- .../agent/observations/observation_manager.py | 14 +- .../game/agent/observations/observations.py | 275 +----------------- .../agent/observations/router_observation.py | 10 +- .../observations/software_observation.py | 13 +- src/primaite/simulator/network/nmne.py | 2 +- tests/conftest.py | 5 +- .../observations/test_acl_observations.py | 4 +- .../observations/test_link_observations.py | 2 +- .../observations/test_nic_observations.py | 12 +- .../observations/test_node_observations.py | 4 +- .../network/test_capture_nmne.py | 10 +- .../_game/_agent/test_probabilistic_agent.py | 5 +- 21 files changed, 247 insertions(+), 331 deletions(-) create mode 100644 src/primaite/game/agent/observations/link_observation.py diff --git a/CHANGELOG.md b/CHANGELOG.md index c01f0139..8931a3d4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -119,7 +119,7 @@ SessionManager. - Updated all tests to employ the `Network()` class for managing nodes and their connections, ensuring a consistent and structured approach to setting up network topologies in testing scenarios. - **ACLRule Wildcard Masking**: Updated the `ACLRule` class to support IP ranges using wildcard masking. This enhancement allows for more flexible and granular control over traffic filtering, enabling the specification of broader or more specific IP address ranges in ACL rules. - Updated `NetworkInterface` documentation to reflect the new NMNE capturing features and how to use them. -- Integration of NMNE capturing functionality within the `NicObservation` class. +- Integration of NMNE capturing functionality within the `NICObservation` class. - Changed blue action set to enable applying node scan, reset, start, and shutdown to every host in data manipulation scenario ### Removed diff --git a/docs/source/simulation_components/network/network_interfaces.rst b/docs/source/simulation_components/network/network_interfaces.rst index ffba58e4..f50a1baa 100644 --- a/docs/source/simulation_components/network/network_interfaces.rst +++ b/docs/source/simulation_components/network/network_interfaces.rst @@ -73,7 +73,7 @@ Network Interface Classes - Malicious Network Events Monitoring: * Enhances network interfaces with the capability to monitor and capture Malicious Network Events (MNEs) based on predefined criteria such as specific keywords or traffic patterns. - * Integrates Number of Malicious Network Events (NMNE) detection functionalities, leveraging configurable settings like ``capture_nmne``, `nmne_capture_keywords``, and observation mechanisms such as ``NicObservation`` to classify and record network anomalies. + * Integrates Number of Malicious Network Events (NMNE) detection functionalities, leveraging configurable settings like ``capture_nmne``, `nmne_capture_keywords``, and observation mechanisms such as ``NICObservation`` to classify and record network anomalies. * Offers an additional layer of security and data analysis, crucial for identifying and mitigating malicious activities within the network infrastructure. Provides vital information for network security analysis and reinforcement learning algorithms. **WiredNetworkInterface (Connection Type Layer)** diff --git a/src/primaite/game/agent/observations/acl_observation.py b/src/primaite/game/agent/observations/acl_observation.py index 7601e678..ac599ea0 100644 --- a/src/primaite/game/agent/observations/acl_observation.py +++ b/src/primaite/game/agent/observations/acl_observation.py @@ -1,7 +1,7 @@ from __future__ import annotations from ipaddress import IPv4Address -from typing import Dict, List, Optional +from typing import Dict, List, Optional, TYPE_CHECKING from gymnasium import spaces from gymnasium.core import ObsType @@ -10,6 +10,8 @@ from primaite import getLogger from primaite.game.agent.observations.observations import AbstractObservation, WhereType from primaite.game.agent.utils import access_from_nested_dict, NOT_PRESENT_IN_STATE +if TYPE_CHECKING: + from primaite.game.game import PrimaiteGame _LOGGER = getLogger(__name__) @@ -165,7 +167,7 @@ class ACLObservation(AbstractObservation, identifier="ACL"): ) @classmethod - def from_config(cls, config: ConfigSchema, parent_where: WhereType = []) -> ACLObservation: + def from_config(cls, config: ConfigSchema, game: "PrimaiteGame", parent_where: WhereType = []) -> ACLObservation: """ Create an ACL observation from a configuration schema. diff --git a/src/primaite/game/agent/observations/file_system_observations.py b/src/primaite/game/agent/observations/file_system_observations.py index 3c931bc8..a7c56a89 100644 --- a/src/primaite/game/agent/observations/file_system_observations.py +++ b/src/primaite/game/agent/observations/file_system_observations.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Dict, Iterable, List, Optional +from typing import Dict, Iterable, List, Optional, TYPE_CHECKING from gymnasium import spaces from gymnasium.core import ObsType @@ -9,6 +9,8 @@ from primaite import getLogger from primaite.game.agent.observations.observations import AbstractObservation, WhereType from primaite.game.agent.utils import access_from_nested_dict, NOT_PRESENT_IN_STATE +if TYPE_CHECKING: + from primaite.game.game import PrimaiteGame _LOGGER = getLogger(__name__) @@ -73,7 +75,7 @@ class FileObservation(AbstractObservation, identifier="FILE"): return spaces.Dict(space) @classmethod - def from_config(cls, config: ConfigSchema, parent_where: WhereType = []) -> FileObservation: + def from_config(cls, config: ConfigSchema, game: "PrimaiteGame", parent_where: WhereType = []) -> FileObservation: """ Create a file observation from a configuration schema. @@ -172,7 +174,7 @@ class FolderObservation(AbstractObservation, identifier="FOLDER"): ) @classmethod - def from_config(cls, config: ConfigSchema, parent_where: WhereType = []) -> FolderObservation: + def from_config(cls, config: ConfigSchema, game: "PrimaiteGame", parent_where: WhereType = []) -> FolderObservation: """ Create a folder observation from a configuration schema. @@ -190,5 +192,5 @@ class FolderObservation(AbstractObservation, identifier="FOLDER"): for file_config in config.files: file_config.include_num_access = config.include_num_access - files = [FileObservation.from_config(config=f, parent_where=where) for f in config.files] + files = [FileObservation.from_config(config=f, game=game, parent_where=where) for f in config.files] return cls(where=where, files=files, num_files=config.num_files, include_num_access=config.include_num_access) diff --git a/src/primaite/game/agent/observations/firewall_observation.py b/src/primaite/game/agent/observations/firewall_observation.py index 376e4824..69398d96 100644 --- a/src/primaite/game/agent/observations/firewall_observation.py +++ b/src/primaite/game/agent/observations/firewall_observation.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Dict, List, Optional +from typing import Dict, List, Optional, TYPE_CHECKING from gymnasium import spaces from gymnasium.core import ObsType @@ -10,6 +10,8 @@ from primaite.game.agent.observations.acl_observation import ACLObservation from primaite.game.agent.observations.nic_observations import PortObservation from primaite.game.agent.observations.observations import AbstractObservation, WhereType +if TYPE_CHECKING: + from primaite.game.game import PrimaiteGame _LOGGER = getLogger(__name__) @@ -190,7 +192,9 @@ class FirewallObservation(AbstractObservation, identifier="FIREWALL"): return space @classmethod - def from_config(cls, config: ConfigSchema, parent_where: WhereType = []) -> FirewallObservation: + def from_config( + cls, config: ConfigSchema, game: "PrimaiteGame", parent_where: WhereType = [] + ) -> FirewallObservation: """ Create a firewall observation from a configuration schema. diff --git a/src/primaite/game/agent/observations/host_observations.py b/src/primaite/game/agent/observations/host_observations.py index 9146979a..d71583b3 100644 --- a/src/primaite/game/agent/observations/host_observations.py +++ b/src/primaite/game/agent/observations/host_observations.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Dict, List, Optional +from typing import Dict, List, Optional, TYPE_CHECKING from gymnasium import spaces from gymnasium.core import ObsType @@ -12,6 +12,8 @@ from primaite.game.agent.observations.observations import AbstractObservation, W from primaite.game.agent.observations.software_observation import ApplicationObservation, ServiceObservation from primaite.game.agent.utils import access_from_nested_dict, NOT_PRESENT_IN_STATE +if TYPE_CHECKING: + from primaite.game.game import PrimaiteGame _LOGGER = getLogger(__name__) @@ -184,7 +186,7 @@ class HostObservation(AbstractObservation, identifier="HOST"): return spaces.Dict(shape) @classmethod - def from_config(cls, config: ConfigSchema, parent_where: WhereType = None) -> HostObservation: + def from_config(cls, config: ConfigSchema, game: "PrimaiteGame", parent_where: WhereType = []) -> HostObservation: """ Create a host observation from a configuration schema. @@ -196,7 +198,7 @@ class HostObservation(AbstractObservation, identifier="HOST"): :return: Constructed host observation instance. :rtype: HostObservation """ - if parent_where is None: + if parent_where == []: where = ["network", "nodes", config.hostname] else: where = parent_where + ["nodes", config.hostname] @@ -208,10 +210,12 @@ class HostObservation(AbstractObservation, identifier="HOST"): for nic_config in config.network_interfaces: nic_config.include_nmne = config.include_nmne - services = [ServiceObservation.from_config(config=c, parent_where=where) for c in config.services] - applications = [ApplicationObservation.from_config(config=c, parent_where=where) for c in config.applications] - folders = [FolderObservation.from_config(config=c, parent_where=where) for c in config.folders] - nics = [NICObservation.from_config(config=c, parent_where=where) for c in config.network_interfaces] + services = [ServiceObservation.from_config(config=c, game=game, parent_where=where) for c in config.services] + applications = [ + ApplicationObservation.from_config(config=c, game=game, parent_where=where) for c in config.applications + ] + folders = [FolderObservation.from_config(config=c, game=game, parent_where=where) for c in config.folders] + nics = [NICObservation.from_config(config=c, game=game, parent_where=where) for c in config.network_interfaces] return cls( where=where, diff --git a/src/primaite/game/agent/observations/link_observation.py b/src/primaite/game/agent/observations/link_observation.py new file mode 100644 index 00000000..f810bb36 --- /dev/null +++ b/src/primaite/game/agent/observations/link_observation.py @@ -0,0 +1,155 @@ +from __future__ import annotations + +from typing import Any, Dict, List, TYPE_CHECKING + +from gymnasium import spaces +from gymnasium.core import ObsType + +from primaite import getLogger +from primaite.game.agent.observations.observations import AbstractObservation, WhereType +from primaite.game.agent.utils import access_from_nested_dict, NOT_PRESENT_IN_STATE + +if TYPE_CHECKING: + from primaite.game.game import PrimaiteGame +_LOGGER = getLogger(__name__) + + +class LinkObservation(AbstractObservation, identifier="LINK"): + """Link observation, providing information about a specific link within the simulation environment.""" + + class ConfigSchema(AbstractObservation.ConfigSchema): + """Configuration schema for LinkObservation.""" + + link_reference: str + """Reference identifier for the link.""" + + def __init__(self, where: WhereType) -> None: + """ + Initialise a link observation instance. + + :param where: Where in the simulation state dictionary to find the relevant information for this link. + A typical location for a link might be ['network', 'links', ]. + :type where: WhereType + """ + self.where = where + self.default_observation: ObsType = {"PROTOCOLS": {"ALL": 0}} + + def observe(self, state: Dict) -> Any: + """ + Generate observation based on the current state of the simulation. + + :param state: Simulation state dictionary. + :type state: Dict + :return: Observation containing information about the link. + :rtype: Any + """ + link_state = access_from_nested_dict(state, self.where) + if link_state is NOT_PRESENT_IN_STATE: + return self.default_observation + + bandwidth = link_state["bandwidth"] + load = link_state["current_load"] + if load == 0: + utilisation_category = 0 + else: + utilisation_fraction = load / bandwidth + utilisation_category = int(utilisation_fraction * 9) + 1 + + return {"PROTOCOLS": {"ALL": min(utilisation_category, 10)}} + + @property + def space(self) -> spaces.Space: + """ + Gymnasium space object describing the observation space shape. + + :return: Gymnasium space representing the observation space for link status. + :rtype: spaces.Space + """ + return spaces.Dict({"PROTOCOLS": spaces.Dict({"ALL": spaces.Discrete(11)})}) + + @classmethod + def from_config(cls, config: ConfigSchema, game: "PrimaiteGame", parent_where: WhereType = []) -> LinkObservation: + """ + Create a link observation from a configuration schema. + + :param config: Configuration schema containing the necessary information for the link observation. + :type config: ConfigSchema + :param game: The PrimaiteGame instance. + :type game: PrimaiteGame + :param parent_where: Where in the simulation state dictionary to find the information about this link. + A typical location might be ['network', 'links', ]. + :type parent_where: WhereType, optional + :return: Constructed link observation instance. + :rtype: LinkObservation + """ + link_reference = game.ref_map_links[config.link_reference] + if parent_where == []: + where = ["network", "links", link_reference] + else: + where = parent_where + ["links", link_reference] + return cls(where=where) + + +class LinksObservation(AbstractObservation, identifier="LINKS"): + """Collection of link observations representing multiple links within the simulation environment.""" + + class ConfigSchema(AbstractObservation.ConfigSchema): + """Configuration schema for LinksObservation.""" + + link_references: List[str] + """List of reference identifiers for the links.""" + + def __init__(self, where: WhereType, links: List[LinkObservation]) -> None: + """ + Initialise a links observation instance. + + :param where: Where in the simulation state dictionary to find the relevant information for these links. + A typical location for links might be ['network', 'links']. + :type where: WhereType + :param links: List of link observations. + :type links: List[LinkObservation] + """ + self.where: WhereType = where + self.links: List[LinkObservation] = links + self.default_observation: ObsType = {i + 1: l.default_observation for i, l in enumerate(self.links)} + + def observe(self, state: Dict) -> ObsType: + """ + Generate observation based on the current state of the simulation. + + :param state: Simulation state dictionary. + :type state: Dict + :return: Observation containing information about multiple links. + :rtype: ObsType + """ + return {i + 1: l.observe(state) for i, l in enumerate(self.links)} + + @property + def space(self) -> spaces.Space: + """ + Gymnasium space object describing the observation space shape. + + :return: Gymnasium space representing the observation space for multiple links. + :rtype: spaces.Space + """ + return {i + 1: l.space for i, l in enumerate(self.links)} + + @classmethod + def from_config(cls, config: ConfigSchema, game: "PrimaiteGame", parent_where: WhereType = []) -> LinksObservation: + """ + Create a links observation from a configuration schema. + + :param config: Configuration schema containing the necessary information for the links observation. + :type config: ConfigSchema + :param game: The PrimaiteGame instance. + :type game: PrimaiteGame + :param parent_where: Where in the simulation state dictionary to find the information about these links. + A typical location might be ['network']. + :type parent_where: WhereType, optional + :return: Constructed links observation instance. + :rtype: LinksObservation + """ + where = parent_where + ["network"] + link_cfgs = [LinkObservation.ConfigSchema(link_reference=ref) for ref in config.link_references] + links = [LinkObservation.from_config(c, game=game, parent_where=where) for c in link_cfgs] + return cls(where=where, links=links) diff --git a/src/primaite/game/agent/observations/nic_observations.py b/src/primaite/game/agent/observations/nic_observations.py index ff2731ff..19826f84 100644 --- a/src/primaite/game/agent/observations/nic_observations.py +++ b/src/primaite/game/agent/observations/nic_observations.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Dict, Optional +from typing import Dict, Optional, TYPE_CHECKING from gymnasium import spaces from gymnasium.core import ObsType @@ -8,6 +8,9 @@ from gymnasium.core import ObsType from primaite.game.agent.observations.observations import AbstractObservation, WhereType from primaite.game.agent.utils import access_from_nested_dict, NOT_PRESENT_IN_STATE +if TYPE_CHECKING: + from primaite.game.game import PrimaiteGame + class NICObservation(AbstractObservation, identifier="NETWORK_INTERFACE"): """Status information about a network interface within the simulation environment.""" @@ -82,7 +85,7 @@ class NICObservation(AbstractObservation, identifier="NETWORK_INTERFACE"): return space @classmethod - def from_config(cls, config: ConfigSchema, parent_where: WhereType = []) -> NICObservation: + def from_config(cls, config: ConfigSchema, game: "PrimaiteGame", parent_where: WhereType = []) -> NICObservation: """ Create a network interface observation from a configuration schema. @@ -142,7 +145,7 @@ class PortObservation(AbstractObservation, identifier="PORT"): return spaces.Dict({"operating_status": spaces.Discrete(3)}) @classmethod - def from_config(cls, config: ConfigSchema, parent_where: WhereType = []) -> PortObservation: + def from_config(cls, config: ConfigSchema, game: "PrimaiteGame", parent_where: WhereType = []) -> PortObservation: """ Create a port observation from a configuration schema. diff --git a/src/primaite/game/agent/observations/node_observations.py b/src/primaite/game/agent/observations/node_observations.py index 3f384ece..7d227bb7 100644 --- a/src/primaite/game/agent/observations/node_observations.py +++ b/src/primaite/game/agent/observations/node_observations.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Dict, List +from typing import Dict, List, TYPE_CHECKING from gymnasium import spaces from gymnasium.core import ObsType @@ -11,6 +11,8 @@ from primaite.game.agent.observations.host_observations import HostObservation from primaite.game.agent.observations.observations import AbstractObservation, WhereType from primaite.game.agent.observations.router_observation import RouterObservation +if TYPE_CHECKING: + from primaite.game.game import PrimaiteGame _LOGGER = getLogger(__name__) @@ -119,7 +121,7 @@ class NodesObservation(AbstractObservation, identifier="NODES"): return space @classmethod - def from_config(cls, config: ConfigSchema, parent_where: WhereType = []) -> NodesObservation: + def from_config(cls, config: ConfigSchema, game: "PrimaiteGame", parent_where: WhereType = []) -> NodesObservation: """ Create a nodes observation from a configuration schema. @@ -178,8 +180,8 @@ class NodesObservation(AbstractObservation, identifier="NODES"): if firewall_config.num_rules is None: firewall_config.num_rules = config.num_rules - hosts = [HostObservation.from_config(config=c, parent_where=where) for c in config.hosts] - routers = [RouterObservation.from_config(config=c, parent_where=where) for c in config.routers] - firewalls = [FirewallObservation.from_config(config=c, parent_where=where) for c in config.firewalls] + hosts = [HostObservation.from_config(config=c, game=game, parent_where=where) for c in config.hosts] + routers = [RouterObservation.from_config(config=c, game=game, parent_where=where) for c in config.routers] + firewalls = [FirewallObservation.from_config(config=c, game=game, parent_where=where) for c in config.firewalls] return cls(where=where, hosts=hosts, routers=routers, firewalls=firewalls) diff --git a/src/primaite/game/agent/observations/observation_manager.py b/src/primaite/game/agent/observations/observation_manager.py index a6981ddc..84311984 100644 --- a/src/primaite/game/agent/observations/observation_manager.py +++ b/src/primaite/game/agent/observations/observation_manager.py @@ -1,12 +1,12 @@ from __future__ import annotations -from typing import Any, Dict, List, TYPE_CHECKING +from typing import Dict, List, TYPE_CHECKING from gymnasium import spaces from gymnasium.core import ObsType from pydantic import BaseModel, ConfigDict, model_validator, ValidationError -from primaite.game.agent.observations.observations import AbstractObservation +from primaite.game.agent.observations.observations import AbstractObservation, WhereType if TYPE_CHECKING: from primaite.game.game import PrimaiteGame @@ -43,7 +43,7 @@ class NestedObservation(AbstractObservation, identifier="CUSTOM"): class ConfigSchema(AbstractObservation.ConfigSchema): """Configuration schema for NestedObservation.""" - components: List[NestedObservation.NestedObservationItem] + components: List[NestedObservation.NestedObservationItem] = [] """List of observation components to be part of this space.""" def __init__(self, components: Dict[str, AbstractObservation]) -> None: @@ -54,7 +54,7 @@ class NestedObservation(AbstractObservation, identifier="CUSTOM"): self.default_observation = {label: obs.default_observation for label, obs in self.components.items()} """Default observation is just the default observations of constituents.""" - def observe(self, state: Dict) -> Any: + def observe(self, state: Dict) -> ObsType: """ Generate observation based on the current state of the simulation. @@ -76,7 +76,7 @@ class NestedObservation(AbstractObservation, identifier="CUSTOM"): return spaces.Dict({label: obs.space for label, obs in self.components.items()}) @classmethod - def from_config(cls, config: ConfigSchema) -> NestedObservation: + def from_config(cls, config: ConfigSchema, game: "PrimaiteGame", parent_where: WhereType = []) -> NestedObservation: """ Read the Nested observation config and create all defined subcomponents. @@ -115,7 +115,7 @@ class NestedObservation(AbstractObservation, identifier="CUSTOM"): instances = dict() for component in config.components: obs_class = AbstractObservation._registry[component.type] - obs_instance = obs_class.from_config(obs_class.ConfigSchema(**component.options)) + obs_instance = obs_class.from_config(config=obs_class.ConfigSchema(**component.options), game=game) instances[component.label] = obs_instance return cls(components=instances) @@ -170,6 +170,6 @@ class ObservationManager: """ obs_type = config["type"] obs_class = AbstractObservation._registry[obs_type] - observation = obs_class.from_config(obs_class.ConfigSchema(**config["options"])) + observation = obs_class.from_config(config=obs_class.ConfigSchema(**config["options"]), game=game) obs_manager = cls(observation) return obs_manager diff --git a/src/primaite/game/agent/observations/observations.py b/src/primaite/game/agent/observations/observations.py index feddc3ed..6c9db571 100644 --- a/src/primaite/game/agent/observations/observations.py +++ b/src/primaite/game/agent/observations/observations.py @@ -1,6 +1,6 @@ """Manages the observation space for the agent.""" from abc import ABC, abstractmethod -from typing import Any, Dict, Iterable, Type +from typing import Any, Dict, Iterable, Type, TYPE_CHECKING from gymnasium import spaces from gymnasium.core import ObsType @@ -8,8 +8,9 @@ from pydantic import BaseModel, ConfigDict from primaite import getLogger +if TYPE_CHECKING: + from primaite.game.game import PrimaiteGame _LOGGER = getLogger(__name__) - WhereType = Iterable[str | int] | None @@ -64,272 +65,8 @@ class AbstractObservation(ABC): @classmethod @abstractmethod - def from_config(cls, config: ConfigSchema) -> "AbstractObservation": + def from_config( + cls, config: ConfigSchema, game: "PrimaiteGame", parent_where: WhereType = [] + ) -> "AbstractObservation": """Create this observation space component form a serialised format.""" return cls() - - -''' -class LinkObservation(AbstractObservation): - """Observation of a link in the network.""" - - default_observation: spaces.Space = {"PROTOCOLS": {"ALL": 0}} - "Default observation is what should be returned when the link doesn't exist." - - def __init__(self, where: Optional[Tuple[str]] = None) -> None: - """Initialise link observation. - - :param where: Store information about where in the simulation state dictionary to find the relevant information. - Optional. If None, this corresponds that the file does not exist and the observation will be populated with - zeroes. - - A typical location for a service looks like this: - `['network','nodes',,'servics', ]` - :type where: Optional[List[str]] - """ - super().__init__() - self.where: Optional[Tuple[str]] = where - - def observe(self, state: Dict) -> Dict: - """Generate observation based on the current state of the simulation. - - :param state: Simulation state dictionary - :type state: Dict - :return: Observation - :rtype: Dict - """ - if self.where is None: - return self.default_observation - - link_state = access_from_nested_dict(state, self.where) - if link_state is NOT_PRESENT_IN_STATE: - return self.default_observation - - bandwidth = link_state["bandwidth"] - load = link_state["current_load"] - if load == 0: - utilisation_category = 0 - else: - utilisation_fraction = load / bandwidth - # 0 is UNUSED, 1 is 0%-10%. 2 is 10%-20%. 3 is 20%-30%. And so on... 10 is exactly 100% - utilisation_category = int(utilisation_fraction * 9) + 1 - - # TODO: once the links support separte load per protocol, this needs amendment to reflect that. - return {"PROTOCOLS": {"ALL": min(utilisation_category, 10)}} - - @property - def space(self) -> spaces.Space: - """Gymnasium space object describing the observation space shape. - - :return: Gymnasium space - :rtype: spaces.Space - """ - return spaces.Dict({"PROTOCOLS": spaces.Dict({"ALL": spaces.Discrete(11)})}) - - @classmethod - def from_config(cls, config: Dict, game: "PrimaiteGame") -> "LinkObservation": - """Create link observation from a config. - - :param config: Dictionary containing the configuration for this link observation. - :type config: Dict - :param game: Reference to the PrimaiteGame object that spawned this observation. - :type game: PrimaiteGame - :return: Constructed link observation - :rtype: LinkObservation - """ - return cls(where=["network", "links", game.ref_map_links[config["link_ref"]]]) - - -class AclObservation(AbstractObservation): - """Observation of an Access Control List (ACL) in the network.""" - - # TODO: should where be optional, and we can use where=None to pad the observation space? - # definitely the current approach does not support tracking files that aren't specified by name, for example - # if a file is created at runtime, we have currently got no way of telling the observation space to track it. - # this needs adding, but not for the MVP. - def __init__( - self, - node_ip_to_id: Dict[str, int], - ports: List[int], - protocols: List[str], - where: Optional[Tuple[str]] = None, - num_rules: int = 10, - ) -> None: - """Initialise ACL observation. - - :param node_ip_to_id: Mapping between IP address and ID. - :type node_ip_to_id: Dict[str, int] - :param ports: List of ports which are part of the game that define the ordering when converting to an ID - :type ports: List[int] - :param protocols: List of protocols which are part of the game, defines ordering when converting to an ID - :type protocols: list[str] - :param where: Where in the simulation state dictionary to find the relevant information for this ACL. A typical - example may look like this: - ['network','nodes',,'acl','acl'] - :type where: Optional[Tuple[str]], optional - :param num_rules: , defaults to 10 - :type num_rules: int, optional - """ - super().__init__() - self.where: Optional[Tuple[str]] = where - self.num_rules: int = num_rules - self.node_to_id: Dict[str, int] = node_ip_to_id - "List of node IP addresses, order in this list determines how they are converted to an ID" - self.port_to_id: Dict[int, int] = {port: i + 2 for i, port in enumerate(ports)} - "List of ports which are part of the game that define the ordering when converting to an ID" - self.protocol_to_id: Dict[str, int] = {protocol: i + 2 for i, protocol in enumerate(protocols)} - "List of protocols which are part of the game, defines ordering when converting to an ID" - self.default_observation: Dict = { - i - + 1: { - "position": i, - "permission": 0, - "source_node_id": 0, - "source_port": 0, - "dest_node_id": 0, - "dest_port": 0, - "protocol": 0, - } - for i in range(self.num_rules) - } - - def observe(self, state: Dict) -> Dict: - """Generate observation based on the current state of the simulation. - - :param state: Simulation state dictionary - :type state: Dict - :return: Observation - :rtype: Dict - """ - if self.where is None: - return self.default_observation - acl_state: Dict = access_from_nested_dict(state, self.where) - if acl_state is NOT_PRESENT_IN_STATE: - return self.default_observation - - # TODO: what if the ACL has more rules than num of max rules for obs space - obs = {} - acl_items = dict(acl_state.items()) - i = 1 # don't show rule 0 for compatibility reasons. - while i < self.num_rules + 1: - rule_state = acl_items[i] - if rule_state is None: - obs[i] = { - "position": i - 1, - "permission": 0, - "source_node_id": 0, - "source_port": 0, - "dest_node_id": 0, - "dest_port": 0, - "protocol": 0, - } - else: - src_ip = rule_state["src_ip_address"] - src_node_id = 1 if src_ip is None else self.node_to_id[IPv4Address(src_ip)] - dst_ip = rule_state["dst_ip_address"] - dst_node_ip = 1 if dst_ip is None else self.node_to_id[IPv4Address(dst_ip)] - src_port = rule_state["src_port"] - src_port_id = 1 if src_port is None else self.port_to_id[src_port] - dst_port = rule_state["dst_port"] - dst_port_id = 1 if dst_port is None else self.port_to_id[dst_port] - protocol = rule_state["protocol"] - protocol_id = 1 if protocol is None else self.protocol_to_id[protocol] - obs[i] = { - "position": i - 1, - "permission": rule_state["action"], - "source_node_id": src_node_id, - "source_port": src_port_id, - "dest_node_id": dst_node_ip, - "dest_port": dst_port_id, - "protocol": protocol_id, - } - i += 1 - return obs - - @property - def space(self) -> spaces.Space: - """Gymnasium space object describing the observation space shape. - - :return: Gymnasium space - :rtype: spaces.Space - """ - return spaces.Dict( - { - i - + 1: spaces.Dict( - { - "position": spaces.Discrete(self.num_rules), - "permission": spaces.Discrete(3), - # adding two to lengths is to account for reserved values 0 (unused) and 1 (any) - "source_node_id": spaces.Discrete(len(set(self.node_to_id.values())) + 2), - "source_port": spaces.Discrete(len(self.port_to_id) + 2), - "dest_node_id": spaces.Discrete(len(set(self.node_to_id.values())) + 2), - "dest_port": spaces.Discrete(len(self.port_to_id) + 2), - "protocol": spaces.Discrete(len(self.protocol_to_id) + 2), - } - ) - for i in range(self.num_rules) - } - ) - - @classmethod - def from_config(cls, config: Dict, game: "PrimaiteGame") -> "AclObservation": - """Generate ACL observation from a config. - - :param config: Dictionary containing the configuration for this ACL observation. - :type config: Dict - :param game: Reference to the PrimaiteGame object that spawned this observation. - :type game: PrimaiteGame - :return: Observation object - :rtype: AclObservation - """ - max_acl_rules = config["options"]["max_acl_rules"] - node_ip_to_idx = {} - for ip_idx, ip_map_config in enumerate(config["ip_address_order"]): - node_ref = ip_map_config["node_hostname"] - nic_num = ip_map_config["nic_num"] - node_obj = game.simulation.network.nodes[game.ref_map_nodes[node_ref]] - nic_obj = node_obj.network_interface[nic_num] - node_ip_to_idx[nic_obj.ip_address] = ip_idx + 2 - - router_hostname = config["router_hostname"] - return cls( - node_ip_to_id=node_ip_to_idx, - ports=game.options.ports, - protocols=game.options.protocols, - where=["network", "nodes", router_hostname, "acl", "acl"], - num_rules=max_acl_rules, - ) - - -class NullObservation(AbstractObservation): - """Null observation, returns a single 0 value for the observation space.""" - - def __init__(self, where: Optional[List[str]] = None): - """Initialise null observation.""" - self.default_observation: Dict = {} - - def observe(self, state: Dict) -> Dict: - """Generate observation based on the current state of the simulation.""" - return 0 - - @property - def space(self) -> spaces.Space: - """Gymnasium space object describing the observation space shape.""" - return spaces.Discrete(1) - - @classmethod - def from_config(cls, config: Dict, game: Optional["PrimaiteGame"] = None) -> "NullObservation": - """ - Create null observation from a config. - - The parameters are ignored, they are here to match the signature of the other observation classes. - """ - return cls() - - -class ICSObservation(NullObservation): - """ICS observation placeholder, currently not implemented so always returns a single 0.""" - - pass -''' diff --git a/src/primaite/game/agent/observations/router_observation.py b/src/primaite/game/agent/observations/router_observation.py index 97d8ab41..c2919770 100644 --- a/src/primaite/game/agent/observations/router_observation.py +++ b/src/primaite/game/agent/observations/router_observation.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Dict, List, Optional +from typing import Dict, List, Optional, TYPE_CHECKING from gymnasium import spaces from gymnasium.core import ObsType @@ -11,6 +11,8 @@ from primaite.game.agent.observations.nic_observations import PortObservation from primaite.game.agent.observations.observations import AbstractObservation, WhereType from primaite.game.agent.utils import access_from_nested_dict, NOT_PRESENT_IN_STATE +if TYPE_CHECKING: + from primaite.game.game import PrimaiteGame _LOGGER = getLogger(__name__) @@ -107,7 +109,7 @@ class RouterObservation(AbstractObservation, identifier="ROUTER"): ) @classmethod - def from_config(cls, config: ConfigSchema, parent_where: WhereType = []) -> RouterObservation: + def from_config(cls, config: ConfigSchema, game: "PrimaiteGame", parent_where: WhereType = []) -> RouterObservation: """ Create a router observation from a configuration schema. @@ -137,6 +139,6 @@ class RouterObservation(AbstractObservation, identifier="ROUTER"): if config.ports is None: config.ports = [PortObservation.ConfigSchema(port_id=i + 1) for i in range(config.num_ports)] - ports = [PortObservation.from_config(config=c, parent_where=where) for c in config.ports] - acl = ACLObservation.from_config(config=config.acl, parent_where=where) + ports = [PortObservation.from_config(config=c, game=game, parent_where=where) for c in config.ports] + acl = ACLObservation.from_config(config=config.acl, game=game, parent_where=where) return cls(where=where, ports=ports, num_ports=config.num_ports, acl=acl) diff --git a/src/primaite/game/agent/observations/software_observation.py b/src/primaite/game/agent/observations/software_observation.py index 0c031345..40788760 100644 --- a/src/primaite/game/agent/observations/software_observation.py +++ b/src/primaite/game/agent/observations/software_observation.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Dict +from typing import Dict, TYPE_CHECKING from gymnasium import spaces from gymnasium.core import ObsType @@ -8,6 +8,9 @@ from gymnasium.core import ObsType from primaite.game.agent.observations.observations import AbstractObservation, WhereType from primaite.game.agent.utils import access_from_nested_dict, NOT_PRESENT_IN_STATE +if TYPE_CHECKING: + from primaite.game.game import PrimaiteGame + class ServiceObservation(AbstractObservation, identifier="SERVICE"): """Service observation, shows status of a service in the simulation environment.""" @@ -57,7 +60,9 @@ class ServiceObservation(AbstractObservation, identifier="SERVICE"): return spaces.Dict({"operating_status": spaces.Discrete(7), "health_status": spaces.Discrete(5)}) @classmethod - def from_config(cls, config: ConfigSchema, parent_where: WhereType = []) -> ServiceObservation: + def from_config( + cls, config: ConfigSchema, game: "PrimaiteGame", parent_where: WhereType = [] + ) -> ServiceObservation: """ Create a service observation from a configuration schema. @@ -128,7 +133,9 @@ class ApplicationObservation(AbstractObservation, identifier="APPLICATION"): ) @classmethod - def from_config(cls, config: ConfigSchema, parent_where: WhereType = []) -> ApplicationObservation: + def from_config( + cls, config: ConfigSchema, game: "PrimaiteGame", parent_where: WhereType = [] + ) -> ApplicationObservation: """ Create an application observation from a configuration schema. diff --git a/src/primaite/simulator/network/nmne.py b/src/primaite/simulator/network/nmne.py index 87839712..1b3d838d 100644 --- a/src/primaite/simulator/network/nmne.py +++ b/src/primaite/simulator/network/nmne.py @@ -6,7 +6,7 @@ CAPTURE_NMNE: bool = True NMNE_CAPTURE_KEYWORDS: List[str] = [] """List of keywords to identify malicious network events.""" -# TODO: Remove final and make configurable after example layout when the NicObservation creates nmne structure dynamically +# TODO: Remove final and make configurable after example layout when the NICObservation creates nmne structure dynamically CAPTURE_BY_DIRECTION: Final[bool] = True """Flag to determine if captures should be organized by traffic direction (inbound/outbound).""" CAPTURE_BY_IP_ADDRESS: Final[bool] = False diff --git a/tests/conftest.py b/tests/conftest.py index 078a78bd..b08fd838 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -10,8 +10,7 @@ from _pytest.monkeypatch import MonkeyPatch from primaite import getLogger, PRIMAITE_PATHS from primaite.game.agent.actions import ActionManager from primaite.game.agent.interface import AbstractAgent -from primaite.game.agent.observations.observation_manager import ObservationManager -from primaite.game.agent.observations.observations import ICSObservation +from primaite.game.agent.observations.observation_manager import NestedObservation, ObservationManager from primaite.game.agent.rewards import RewardFunction from primaite.game.game import PrimaiteGame from primaite.session.session import PrimaiteSession @@ -525,7 +524,7 @@ def game_and_agent(): ip_address_list=["10.0.1.1", "10.0.1.2", "10.0.2.1", "10.0.2.2", "10.0.2.3"], act_map={}, ) - observation_space = ObservationManager(ICSObservation()) + observation_space = ObservationManager(NestedObservation(components={})) reward_function = RewardFunction() test_agent = ControlledAgent( diff --git a/tests/integration_tests/game_layer/observations/test_acl_observations.py b/tests/integration_tests/game_layer/observations/test_acl_observations.py index 93867edd..d0710f5f 100644 --- a/tests/integration_tests/game_layer/observations/test_acl_observations.py +++ b/tests/integration_tests/game_layer/observations/test_acl_observations.py @@ -1,6 +1,6 @@ import pytest -from primaite.game.agent.observations.observations import AclObservation +from primaite.game.agent.observations.acl_observation import ACLObservation from primaite.simulator.network.hardware.nodes.host.computer import Computer from primaite.simulator.network.hardware.nodes.network.router import ACLAction, Router from primaite.simulator.network.transmission.transport_layer import Port @@ -34,7 +34,7 @@ def test_acl_observations(simulation): # add router acl rule router.acl.add_rule(action=ACLAction.PERMIT, dst_port=Port.NTP, src_port=Port.NTP, position=1) - acl_obs = AclObservation( + acl_obs = ACLObservation( where=["network", "nodes", router.hostname, "acl", "acl"], node_ip_to_id={}, ports=["NTP", "HTTP", "POSTGRES_SERVER"], diff --git a/tests/integration_tests/game_layer/observations/test_link_observations.py b/tests/integration_tests/game_layer/observations/test_link_observations.py index bfe4d5cc..b13314f1 100644 --- a/tests/integration_tests/game_layer/observations/test_link_observations.py +++ b/tests/integration_tests/game_layer/observations/test_link_observations.py @@ -1,7 +1,7 @@ import pytest from gymnasium import spaces -from primaite.game.agent.observations.observations import LinkObservation +from primaite.game.agent.observations.link_observation import LinkObservation from primaite.simulator.network.container import Network from primaite.simulator.network.hardware.base import Link, Node from primaite.simulator.network.hardware.nodes.host.computer import Computer diff --git a/tests/integration_tests/game_layer/observations/test_nic_observations.py b/tests/integration_tests/game_layer/observations/test_nic_observations.py index 332bc1f7..bc4261ce 100644 --- a/tests/integration_tests/game_layer/observations/test_nic_observations.py +++ b/tests/integration_tests/game_layer/observations/test_nic_observations.py @@ -5,7 +5,7 @@ import pytest import yaml from gymnasium import spaces -from primaite.game.agent.observations.nic_observations import NicObservation +from primaite.game.agent.observations.nic_observations import NICObservation from primaite.game.game import PrimaiteGame from primaite.simulator.network.hardware.nodes.host.computer import Computer from primaite.simulator.network.hardware.nodes.host.host_node import NIC @@ -40,7 +40,7 @@ def test_nic(simulation): nic: NIC = pc.network_interface[1] - nic_obs = NicObservation(where=["network", "nodes", pc.hostname, "NICs", 1]) + nic_obs = NICObservation(where=["network", "nodes", pc.hostname, "NICs", 1]) assert nic_obs.space["nic_status"] == spaces.Discrete(3) assert nic_obs.space["NMNE"]["inbound"] == spaces.Discrete(4) @@ -61,13 +61,13 @@ def test_nic_categories(simulation): """Test the NIC observation nmne count categories.""" pc: Computer = simulation.network.get_node_by_hostname("client_1") - nic_obs = NicObservation(where=["network", "nodes", pc.hostname, "NICs", 1]) + nic_obs = NICObservation(where=["network", "nodes", pc.hostname, "NICs", 1]) assert nic_obs.high_nmne_threshold == 10 # default assert nic_obs.med_nmne_threshold == 5 # default assert nic_obs.low_nmne_threshold == 0 # default - nic_obs = NicObservation( + nic_obs = NICObservation( where=["network", "nodes", pc.hostname, "NICs", 1], low_nmne_threshold=3, med_nmne_threshold=6, @@ -80,7 +80,7 @@ def test_nic_categories(simulation): with pytest.raises(Exception): # should throw an error - NicObservation( + NICObservation( where=["network", "nodes", pc.hostname, "NICs", 1], low_nmne_threshold=9, med_nmne_threshold=6, @@ -89,7 +89,7 @@ def test_nic_categories(simulation): with pytest.raises(Exception): # should throw an error - NicObservation( + NICObservation( where=["network", "nodes", pc.hostname, "NICs", 1], low_nmne_threshold=3, med_nmne_threshold=9, diff --git a/tests/integration_tests/game_layer/observations/test_node_observations.py b/tests/integration_tests/game_layer/observations/test_node_observations.py index dce05b6a..2926ffa6 100644 --- a/tests/integration_tests/game_layer/observations/test_node_observations.py +++ b/tests/integration_tests/game_layer/observations/test_node_observations.py @@ -4,7 +4,7 @@ from uuid import uuid4 import pytest from gymnasium import spaces -from primaite.game.agent.observations.node_observations import NodeObservation +from primaite.game.agent.observations.host_observations import HostObservation from primaite.simulator.network.hardware.nodes.host.computer import Computer from primaite.simulator.sim_container import Simulation @@ -23,7 +23,7 @@ def test_node_observation(simulation): """Test a Node observation.""" pc: Computer = simulation.network.get_node_by_hostname("client_1") - node_obs = NodeObservation(where=["network", "nodes", pc.hostname]) + node_obs = HostObservation(where=["network", "nodes", pc.hostname]) assert node_obs.space["operating_status"] == spaces.Discrete(5) diff --git a/tests/integration_tests/network/test_capture_nmne.py b/tests/integration_tests/network/test_capture_nmne.py index 9efc70f7..1578305b 100644 --- a/tests/integration_tests/network/test_capture_nmne.py +++ b/tests/integration_tests/network/test_capture_nmne.py @@ -1,4 +1,4 @@ -from primaite.game.agent.observations.nic_observations import NicObservation +from primaite.game.agent.observations.nic_observations import NICObservation from primaite.simulator.network.hardware.nodes.host.server import Server from primaite.simulator.network.nmne import set_nmne_config from primaite.simulator.sim_container import Simulation @@ -141,9 +141,9 @@ def test_describe_state_nmne(uc2_network): def test_capture_nmne_observations(uc2_network): """ - Tests the NicObservation class's functionality within a simulated network environment. + Tests the NICObservation class's functionality within a simulated network environment. - This test ensures the observation space, as defined by instances of NicObservation, accurately reflects the + This test ensures the observation space, as defined by instances of NICObservation, accurately reflects the number of MNEs detected based on network activities over multiple iterations. The test employs a series of "DELETE" SQL operations, considered as MNEs, to validate the dynamic update @@ -168,8 +168,8 @@ def test_capture_nmne_observations(uc2_network): set_nmne_config(nmne_config) # Define observations for the NICs of the database and web servers - db_server_nic_obs = NicObservation(where=["network", "nodes", "database_server", "NICs", 1]) - web_server_nic_obs = NicObservation(where=["network", "nodes", "web_server", "NICs", 1]) + db_server_nic_obs = NICObservation(where=["network", "nodes", "database_server", "NICs", 1]) + web_server_nic_obs = NICObservation(where=["network", "nodes", "web_server", "NICs", 1]) # Iterate through a set of test cases to simulate multiple DELETE queries for i in range(0, 20): diff --git a/tests/unit_tests/_primaite/_game/_agent/test_probabilistic_agent.py b/tests/unit_tests/_primaite/_game/_agent/test_probabilistic_agent.py index c556cfad..7eacb30d 100644 --- a/tests/unit_tests/_primaite/_game/_agent/test_probabilistic_agent.py +++ b/tests/unit_tests/_primaite/_game/_agent/test_probabilistic_agent.py @@ -1,6 +1,5 @@ from primaite.game.agent.actions import ActionManager -from primaite.game.agent.observations.observation_manager import ObservationManager -from primaite.game.agent.observations.observations import ICSObservation +from primaite.game.agent.observations.observation_manager import NestedObservation, ObservationManager from primaite.game.agent.rewards import RewardFunction from primaite.game.agent.scripted_agents.probabilistic_agent import ProbabilisticAgent @@ -52,7 +51,7 @@ def test_probabilistic_agent(): 2: {"action": "NODE_FILE_DELETE", "options": {"node_id": 0, "folder_id": 0, "file_id": 0}}, }, ) - observation_space = ObservationManager(ICSObservation()) + observation_space = ObservationManager(NestedObservation(components={})) reward_function = RewardFunction() pa = ProbabilisticAgent( From 8da53db82224c0d9543e74ca2825030125a411b9 Mon Sep 17 00:00:00 2001 From: Marek Wolan Date: Sun, 31 Mar 2024 23:20:48 +0100 Subject: [PATCH 075/124] #2417 Finalise parsing of observation space --- .../_package_data/data_manipulation.yaml | 172 +++++++----------- .../game/agent/observations/__init__.py | 12 ++ .../agent/observations/host_observations.py | 17 +- .../agent/observations/link_observation.py | 2 +- .../agent/observations/node_observations.py | 59 ++++-- .../agent/observations/observation_manager.py | 31 +++- 6 files changed, 167 insertions(+), 126 deletions(-) diff --git a/src/primaite/config/_package_data/data_manipulation.yaml b/src/primaite/config/_package_data/data_manipulation.yaml index 06028ee1..d810e58a 100644 --- a/src/primaite/config/_package_data/data_manipulation.yaml +++ b/src/primaite/config/_package_data/data_manipulation.yaml @@ -41,8 +41,7 @@ agents: 0: 0.3 1: 0.6 2: 0.1 - observation_space: - type: UC2GreenObservation + observation_space: null action_space: action_list: - type: DONOTHING @@ -91,8 +90,7 @@ agents: 0: 0.3 1: 0.6 2: 0.1 - observation_space: - type: UC2GreenObservation + observation_space: null action_space: action_list: - type: DONOTHING @@ -141,10 +139,7 @@ agents: team: RED type: RedDatabaseCorruptingAgent - observation_space: - type: UC2RedObservation - options: - nodes: {} + observation_space: null action_space: action_list: @@ -177,102 +172,73 @@ agents: type: ProxyAgent observation_space: - - type: NODES - label: NODES # What is the dictionary key called - options: - hosts: - - hostname: domain_controller - - hostname: web_server - - hostname: database_server - - hostname: backup_server - - hostname: security_suite - - hostname: client_1 - - hostname: client_2 - routers: - - hostname: router_1 - firewalls: {} - - num_host_services: 1 - num_host_applications: 0 - num_host_folders: 1 - num_host_files: 1 - num_host_network_interfaces: 2 - num_router_ports: 4 - num_acl_rules: 10 - num_firewall_ports: 4 - firewalls_internal_inbound_acl: true - firewalls_internal_outbound_acl: true - firewalls_dmz_inbound_acl: true - firewalls_dmz_outbound_acl: true - firewalls_external_inbound_acl: true - firewalls_external_outbound_acl: true - - type: LINKS - label: "LINKS" - options: - links: - - link_ref: router_1___switch_1 - - link_ref: router_1___switch_2 - - link_ref: switch_1___domain_controller - - link_ref: switch_1___web_server - - link_ref: switch_1___database_server - - link_ref: switch_1___backup_server - - link_ref: switch_1___security_suite - - link_ref: switch_2___client_1 - - link_ref: switch_2___client_2 - - link_ref: switch_2___security_suite - - observation_space: - type: UC2BlueObservation + type: CUSTOM options: - nodes: - - node_hostname: domain_controller - services: - - service_name: DNSServer - - node_hostname: web_server - services: - - service_name: WebServer - - node_hostname: database_server - folders: - - folder_name: database - files: - - file_name: database.db - - node_hostname: backup_server - - node_hostname: security_suite - - node_hostname: client_1 - - node_hostname: client_2 - links: - - link_ref: router_1___switch_1 - - link_ref: router_1___switch_2 - - link_ref: switch_1___domain_controller - - link_ref: switch_1___web_server - - link_ref: switch_1___database_server - - link_ref: switch_1___backup_server - - link_ref: switch_1___security_suite - - link_ref: switch_2___client_1 - - link_ref: switch_2___client_2 - - link_ref: switch_2___security_suite - acl: - options: - max_acl_rules: 10 - router_hostname: router_1 - ip_address_order: - - node_hostname: domain_controller - nic_num: 1 - - node_hostname: web_server - nic_num: 1 - - node_hostname: database_server - nic_num: 1 - - node_hostname: backup_server - nic_num: 1 - - node_hostname: security_suite - nic_num: 1 - - node_hostname: client_1 - nic_num: 1 - - node_hostname: client_2 - nic_num: 1 - - node_hostname: security_suite - nic_num: 2 - ics: null + components: + - type: NODES + label: NODES + options: + hosts: + - hostname: domain_controller + - hostname: web_server + services: + - service_name: WebServer + - hostname: database_server + folders: + - folder_name: database + files: + - file_name: database.db + - hostname: backup_server + - hostname: security_suite + - hostname: client_1 + - hostname: client_2 + num_services: 1 + num_applications: 0 + num_folders: 1 + num_files: 1 + num_nics: 2 + include_num_access: false + include_nmne: true + routers: + - hostname: router_1 + num_ports: 0 + ip_list: + - 192.168.1.10 + - 192.168.1.12 + - 192.168.1.14 + - 192.168.1.16 + - 192.168.1.110 + - 192.168.10.21 + - 192.168.10.22 + - 192.168.10.110 + wildcard_list: + - 0.0.0.1 + port_list: + - 80 + - 5432 + protocol_list: + - ICMP + - TCP + - UDP + num_rules: 10 + + - type: LINKS + label: LINKS + options: + link_references: + - router_1___switch_1 + - router_1___switch_2 + - switch_1___domain_controller + - switch_1___web_server + - switch_1___database_server + - switch_1___backup_server + - switch_1___security_suite + - switch_2___client_1 + - switch_2___client_2 + - switch_2___security_suite + - type: "NONE" + label: ICS + options: {} action_space: action_list: diff --git a/src/primaite/game/agent/observations/__init__.py b/src/primaite/game/agent/observations/__init__.py index e69de29b..b9d97ae6 100644 --- a/src/primaite/game/agent/observations/__init__.py +++ b/src/primaite/game/agent/observations/__init__.py @@ -0,0 +1,12 @@ +# flake8: noqa +from primaite.game.agent.observations.acl_observation import ACLObservation +from primaite.game.agent.observations.file_system_observations import FileObservation, FolderObservation +from primaite.game.agent.observations.firewall_observation import FirewallObservation +from primaite.game.agent.observations.host_observations import HostObservation +from primaite.game.agent.observations.link_observation import LinkObservation, LinksObservation +from primaite.game.agent.observations.nic_observations import NICObservation, PortObservation +from primaite.game.agent.observations.node_observations import NodesObservation +from primaite.game.agent.observations.observation_manager import NestedObservation, NullObservation, ObservationManager +from primaite.game.agent.observations.observations import AbstractObservation +from primaite.game.agent.observations.router_observation import RouterObservation +from primaite.game.agent.observations.software_observation import ApplicationObservation, ServiceObservation diff --git a/src/primaite/game/agent/observations/host_observations.py b/src/primaite/game/agent/observations/host_observations.py index d71583b3..3ee5f2c7 100644 --- a/src/primaite/game/agent/observations/host_observations.py +++ b/src/primaite/game/agent/observations/host_observations.py @@ -94,6 +94,8 @@ class HostObservation(AbstractObservation, identifier="HOST"): """ self.where: WhereType = where + self.include_num_access = include_num_access + # Ensure lists have lengths equal to specified counts by truncating or padding self.services: List[ServiceObservation] = services while len(self.services) < num_services: @@ -135,9 +137,10 @@ class HostObservation(AbstractObservation, identifier="HOST"): "FOLDERS": {i + 1: f.default_observation for i, f in enumerate(self.folders)}, "NICS": {i + 1: n.default_observation for i, n in enumerate(self.network_interfaces)}, "operating_status": 0, - "num_file_creations": 0, - "num_file_deletions": 0, } + if self.include_num_access: + self.default_observation["num_file_creations"] = 0 + self.default_observation["num_file_deletions"] = 0 def observe(self, state: Dict) -> ObsType: """ @@ -160,8 +163,9 @@ class HostObservation(AbstractObservation, identifier="HOST"): obs["NICS"] = { i + 1: network_interface.observe(state) for i, network_interface in enumerate(self.network_interfaces) } - obs["num_file_creations"] = node_state["file_system"]["num_file_creations"] - obs["num_file_deletions"] = node_state["file_system"]["num_file_deletions"] + if self.include_num_access: + obs["num_file_creations"] = node_state["file_system"]["num_file_creations"] + obs["num_file_deletions"] = node_state["file_system"]["num_file_deletions"] return obs @property @@ -180,9 +184,10 @@ class HostObservation(AbstractObservation, identifier="HOST"): "NICS": spaces.Dict( {i + 1: network_interface.space for i, network_interface in enumerate(self.network_interfaces)} ), - "num_file_creations": spaces.Discrete(4), - "num_file_deletions": spaces.Discrete(4), } + if self.include_num_access: + shape["num_file_creations"] = spaces.Discrete(4) + shape["num_file_deletions"] = spaces.Discrete(4) return spaces.Dict(shape) @classmethod diff --git a/src/primaite/game/agent/observations/link_observation.py b/src/primaite/game/agent/observations/link_observation.py index f810bb36..be08657d 100644 --- a/src/primaite/game/agent/observations/link_observation.py +++ b/src/primaite/game/agent/observations/link_observation.py @@ -132,7 +132,7 @@ class LinksObservation(AbstractObservation, identifier="LINKS"): :return: Gymnasium space representing the observation space for multiple links. :rtype: spaces.Space """ - return {i + 1: l.space for i, l in enumerate(self.links)} + return spaces.Dict({i + 1: l.space for i, l in enumerate(self.links)}) @classmethod def from_config(cls, config: ConfigSchema, game: "PrimaiteGame", parent_where: WhereType = []) -> LinksObservation: diff --git a/src/primaite/game/agent/observations/node_observations.py b/src/primaite/game/agent/observations/node_observations.py index 7d227bb7..dce33a04 100644 --- a/src/primaite/game/agent/observations/node_observations.py +++ b/src/primaite/game/agent/observations/node_observations.py @@ -1,9 +1,10 @@ from __future__ import annotations -from typing import Dict, List, TYPE_CHECKING +from typing import Dict, List, Optional, TYPE_CHECKING from gymnasium import spaces from gymnasium.core import ObsType +from pydantic import model_validator from primaite import getLogger from primaite.game.agent.observations.firewall_observation import FirewallObservation @@ -28,33 +29,63 @@ class NodesObservation(AbstractObservation, identifier="NODES"): """List of configurations for router observations.""" firewalls: List[FirewallObservation.ConfigSchema] = [] """List of configurations for firewall observations.""" - num_services: int + num_services: Optional[int] = None """Number of services.""" - num_applications: int + num_applications: Optional[int] = None """Number of applications.""" - num_folders: int + num_folders: Optional[int] = None """Number of folders.""" - num_files: int + num_files: Optional[int] = None """Number of files.""" - num_nics: int + num_nics: Optional[int] = None """Number of network interface cards (NICs).""" - include_nmne: bool + include_nmne: Optional[bool] = None """Flag to include nmne.""" - include_num_access: bool + include_num_access: Optional[bool] = None """Flag to include the number of accesses.""" - num_ports: int + num_ports: Optional[int] = None """Number of ports.""" - ip_list: List[str] + ip_list: Optional[List[str]] = None """List of IP addresses for encoding ACLs.""" - wildcard_list: List[str] + wildcard_list: Optional[List[str]] = None """List of IP wildcards for encoding ACLs.""" - port_list: List[int] + port_list: Optional[List[int]] = None """List of ports for encoding ACLs.""" - protocol_list: List[str] + protocol_list: Optional[List[str]] = None """List of protocols for encoding ACLs.""" - num_rules: int + num_rules: Optional[int] = None """Number of rules ACL rules to show.""" + @model_validator(mode="after") + def force_optional_fields(self) -> NodesObservation.ConfigSchema: + """Check that options are specified only if they are needed for the nodes that are part of the config.""" + # check for hosts: + host_fields = ( + self.num_services, + self.num_applications, + self.num_folders, + self.num_files, + self.num_nics, + self.include_nmne, + self.include_num_access, + ) + router_fields = ( + self.num_ports, + self.ip_list, + self.wildcard_list, + self.port_list, + self.protocol_list, + self.num_rules, + ) + firewall_fields = (self.ip_list, self.wildcard_list, self.port_list, self.protocol_list, self.num_rules) + if len(self.hosts) > 0 and any([x is None for x in host_fields]): + raise ValueError("Configuration error: Host observation options were not fully specified.") + if len(self.routers) > 0 and any([x is None for x in router_fields]): + raise ValueError("Configuration error: Router observation options were not fully specified.") + if len(self.firewalls) > 0 and any([x is None for x in firewall_fields]): + raise ValueError("Configuration error: Firewall observation options were not fully specified.") + return self + def __init__( self, where: WhereType, diff --git a/src/primaite/game/agent/observations/observation_manager.py b/src/primaite/game/agent/observations/observation_manager.py index 84311984..3703fa1c 100644 --- a/src/primaite/game/agent/observations/observation_manager.py +++ b/src/primaite/game/agent/observations/observation_manager.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Dict, List, TYPE_CHECKING +from typing import Any, Dict, List, Optional, TYPE_CHECKING from gymnasium import spaces from gymnasium.core import ObsType @@ -120,6 +120,30 @@ class NestedObservation(AbstractObservation, identifier="CUSTOM"): return cls(components=instances) +class NullObservation(AbstractObservation, identifier="NONE"): + """Empty observation that acts as a placeholder.""" + + def __init__(self) -> None: + """Initialise the empty observation.""" + self.default_observation = 0 + + def observe(self, state: Dict) -> Any: + """Simply return 0.""" + return 0 + + @property + def space(self) -> spaces.Space: + """Essentially empty space.""" + return spaces.Discrete(1) + + @classmethod + def from_config( + cls, config: NullObservation.ConfigSchema, game: "PrimaiteGame", parent_where: WhereType = [] + ) -> NullObservation: + """Instantiate a NullObservation. Accepts parameters to comply with API.""" + return cls() + + class ObservationManager: """ Manage the observations of an Agent. @@ -156,7 +180,7 @@ class ObservationManager: return self.obs.space @classmethod - def from_config(cls, config: Dict, game: "PrimaiteGame") -> "ObservationManager": + def from_config(cls, config: Optional[Dict], game: "PrimaiteGame") -> "ObservationManager": """ Create observation space from a config. @@ -168,6 +192,9 @@ class ObservationManager: :param game: Reference to the PrimaiteGame object that spawned this observation. :type game: PrimaiteGame """ + if config is None: + return cls(NullObservation()) + print(config) obs_type = config["type"] obs_class = AbstractObservation._registry[obs_type] observation = obs_class.from_config(config=obs_class.ConfigSchema(**config["options"]), game=game) From 0e0df1012fb20e0fe1b9f1963de2bbb74c03b0d7 Mon Sep 17 00:00:00 2001 From: Marek Wolan Date: Sun, 31 Mar 2024 23:39:24 +0100 Subject: [PATCH 076/124] #2417 update observations init to autoimport all obs types --- src/primaite/game/agent/observations/__init__.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/primaite/game/agent/observations/__init__.py b/src/primaite/game/agent/observations/__init__.py index b9d97ae6..15fdf7ed 100644 --- a/src/primaite/game/agent/observations/__init__.py +++ b/src/primaite/game/agent/observations/__init__.py @@ -1,4 +1,5 @@ # flake8: noqa +# Pre-import all the observations when we load up the observations module so that they can be resolved by the parser. from primaite.game.agent.observations.acl_observation import ACLObservation from primaite.game.agent.observations.file_system_observations import FileObservation, FolderObservation from primaite.game.agent.observations.firewall_observation import FirewallObservation @@ -10,3 +11,10 @@ from primaite.game.agent.observations.observation_manager import NestedObservati from primaite.game.agent.observations.observations import AbstractObservation from primaite.game.agent.observations.router_observation import RouterObservation from primaite.game.agent.observations.software_observation import ApplicationObservation, ServiceObservation + +# fmt: off +__all__ = [ + "ACLObservation", "FileObservation", "FolderObservation", "FirewallObservation", "HostObservation", + "LinksObservation", "NICObservation", "PortObservation", "NodesObservation", "NestedObservation", + "ObservationManager", "ApplicationObservation", "ServiceObservation",] +# fmt: on From 0ba767d2a0988c404524a042d3d5a4396ac053d4 Mon Sep 17 00:00:00 2001 From: Marek Wolan Date: Mon, 1 Apr 2024 00:54:55 +0100 Subject: [PATCH 077/124] #2417 update observation tests and make old tests pass --- .../_package_data/data_manipulation_marl.yaml | 251 +++++++++-------- .../agent/observations/acl_observation.py | 22 +- .../observations/file_system_observations.py | 16 +- .../agent/observations/host_observations.py | 52 ++-- .../agent/observations/nic_observations.py | 36 ++- .../agent/observations/router_observation.py | 13 +- .../assets/configs/bad_primaite_session.yaml | 130 ++++----- tests/assets/configs/basic_firewall.yaml | 3 +- .../configs/basic_switched_network.yaml | 3 +- tests/assets/configs/dmz_network.yaml | 3 +- .../configs/eval_only_primaite_session.yaml | 130 ++++----- tests/assets/configs/multi_agent_session.yaml | 252 ++++++++++-------- tests/assets/configs/shared_rewards.yaml | 131 ++++----- .../assets/configs/test_primaite_session.yaml | 132 ++++----- .../configs/train_only_primaite_session.yaml | 130 ++++----- .../test_primaite_session.py | 8 +- .../observations/test_acl_observations.py | 28 +- .../test_file_system_observations.py | 8 +- .../observations/test_nic_observations.py | 11 +- .../observations/test_node_observations.py | 27 +- .../game_layer/test_observations.py | 3 +- .../network/test_capture_nmne.py | 4 +- 22 files changed, 767 insertions(+), 626 deletions(-) diff --git a/src/primaite/config/_package_data/data_manipulation_marl.yaml b/src/primaite/config/_package_data/data_manipulation_marl.yaml index b632f626..3e95a6ee 100644 --- a/src/primaite/config/_package_data/data_manipulation_marl.yaml +++ b/src/primaite/config/_package_data/data_manipulation_marl.yaml @@ -40,8 +40,7 @@ agents: 0: 0.3 1: 0.6 2: 0.1 - observation_space: - type: UC2GreenObservation + observation_space: null action_space: action_list: - type: DONOTHING @@ -90,8 +89,7 @@ agents: 0: 0.3 1: 0.6 2: 0.1 - observation_space: - type: UC2GreenObservation + observation_space: null action_space: action_list: - type: DONOTHING @@ -140,10 +138,7 @@ agents: team: RED type: RedDatabaseCorruptingAgent - observation_space: - type: UC2RedObservation - options: - nodes: {} + observation_space: null action_space: action_list: @@ -179,61 +174,73 @@ agents: type: ProxyAgent observation_space: - type: UC2BlueObservation + type: CUSTOM options: - num_services_per_node: 1 - num_folders_per_node: 1 - num_files_per_folder: 1 - num_nics_per_node: 2 - nodes: - - node_hostname: domain_controller - services: - - service_name: DNSServer - - node_hostname: web_server - services: - - service_name: WebServer - - node_hostname: database_server - folders: - - folder_name: database - files: - - file_name: database.db - - node_hostname: backup_server - - node_hostname: security_suite - - node_hostname: client_1 - - node_hostname: client_2 - links: - - link_ref: router_1___switch_1 - - link_ref: router_1___switch_2 - - link_ref: switch_1___domain_controller - - link_ref: switch_1___web_server - - link_ref: switch_1___database_server - - link_ref: switch_1___backup_server - - link_ref: switch_1___security_suite - - link_ref: switch_2___client_1 - - link_ref: switch_2___client_2 - - link_ref: switch_2___security_suite - acl: - options: - max_acl_rules: 10 - router_hostname: router_1 - ip_address_order: - - node_hostname: domain_controller - nic_num: 1 - - node_hostname: web_server - nic_num: 1 - - node_hostname: database_server - nic_num: 1 - - node_hostname: backup_server - nic_num: 1 - - node_hostname: security_suite - nic_num: 1 - - node_hostname: client_1 - nic_num: 1 - - node_hostname: client_2 - nic_num: 1 - - node_hostname: security_suite - nic_num: 2 - ics: null + components: + - type: NODES + label: NODES + options: + hosts: + - hostname: domain_controller + - hostname: web_server + services: + - service_name: WebServer + - hostname: database_server + folders: + - folder_name: database + files: + - file_name: database.db + - hostname: backup_server + - hostname: security_suite + - hostname: client_1 + - hostname: client_2 + num_services: 1 + num_applications: 0 + num_folders: 1 + num_files: 1 + num_nics: 2 + include_num_access: false + include_nmne: true + routers: + - hostname: router_1 + num_ports: 0 + ip_list: + - 192.168.1.10 + - 192.168.1.12 + - 192.168.1.14 + - 192.168.1.16 + - 192.168.1.110 + - 192.168.10.21 + - 192.168.10.22 + - 192.168.10.110 + wildcard_list: + - 0.0.0.1 + port_list: + - 80 + - 5432 + protocol_list: + - ICMP + - TCP + - UDP + num_rules: 10 + + - type: LINKS + label: LINKS + options: + link_references: + - router_1___switch_1 + - router_1___switch_2 + - switch_1___domain_controller + - switch_1___web_server + - switch_1___database_server + - switch_1___backup_server + - switch_1___security_suite + - switch_2___client_1 + - switch_2___client_2 + - switch_2___security_suite + - type: "NONE" + label: ICS + options: {} action_space: action_list: @@ -730,61 +737,73 @@ agents: type: ProxyAgent observation_space: - type: UC2BlueObservation + type: CUSTOM options: - num_services_per_node: 1 - num_folders_per_node: 1 - num_files_per_folder: 1 - num_nics_per_node: 2 - nodes: - - node_hostname: domain_controller - services: - - service_name: DNSServer - - node_hostname: web_server - services: - - service_name: WebServer - - node_hostname: database_server - folders: - - folder_name: database - files: - - file_name: database.db - - node_hostname: backup_server - - node_hostname: security_suite - - node_hostname: client_1 - - node_hostname: client_2 - links: - - link_ref: router_1___switch_1 - - link_ref: router_1___switch_2 - - link_ref: switch_1___domain_controller - - link_ref: switch_1___web_server - - link_ref: switch_1___database_server - - link_ref: switch_1___backup_server - - link_ref: switch_1___security_suite - - link_ref: switch_2___client_1 - - link_ref: switch_2___client_2 - - link_ref: switch_2___security_suite - acl: - options: - max_acl_rules: 10 - router_hostname: router_1 - ip_address_order: - - node_hostname: domain_controller - nic_num: 1 - - node_hostname: web_server - nic_num: 1 - - node_hostname: database_server - nic_num: 1 - - node_hostname: backup_server - nic_num: 1 - - node_hostname: security_suite - nic_num: 1 - - node_hostname: client_1 - nic_num: 1 - - node_hostname: client_2 - nic_num: 1 - - node_hostname: security_suite - nic_num: 2 - ics: null + components: + - type: NODES + label: NODES + options: + hosts: + - hostname: domain_controller + - hostname: web_server + services: + - service_name: WebServer + - hostname: database_server + folders: + - folder_name: database + files: + - file_name: database.db + - hostname: backup_server + - hostname: security_suite + - hostname: client_1 + - hostname: client_2 + num_services: 1 + num_applications: 0 + num_folders: 1 + num_files: 1 + num_nics: 2 + include_num_access: false + include_nmne: true + routers: + - hostname: router_1 + num_ports: 0 + ip_list: + - 192.168.1.10 + - 192.168.1.12 + - 192.168.1.14 + - 192.168.1.16 + - 192.168.1.110 + - 192.168.10.21 + - 192.168.10.22 + - 192.168.10.110 + wildcard_list: + - 0.0.0.1 + port_list: + - 80 + - 5432 + protocol_list: + - ICMP + - TCP + - UDP + num_rules: 10 + + - type: LINKS + label: LINKS + options: + link_references: + - router_1___switch_1 + - router_1___switch_2 + - switch_1___domain_controller + - switch_1___web_server + - switch_1___database_server + - switch_1___backup_server + - switch_1___security_suite + - switch_2___client_1 + - switch_2___client_2 + - switch_2___security_suite + - type: "NONE" + label: ICS + options: {} action_space: action_list: diff --git a/src/primaite/game/agent/observations/acl_observation.py b/src/primaite/game/agent/observations/acl_observation.py index ac599ea0..fc603a8a 100644 --- a/src/primaite/game/agent/observations/acl_observation.py +++ b/src/primaite/game/agent/observations/acl_observation.py @@ -59,10 +59,10 @@ class ACLObservation(AbstractObservation, identifier="ACL"): """ self.where = where self.num_rules: int = num_rules - self.ip_to_id: Dict[str, int] = {i + 2: p for i, p in enumerate(ip_list)} - self.wildcard_to_id: Dict[str, int] = {i + 2: p for i, p in enumerate(wildcard_list)} - self.port_to_id: Dict[int, int] = {i + 2: p for i, p in enumerate(port_list)} - self.protocol_to_id: Dict[str, int] = {i + 2: p for i, p in enumerate(protocol_list)} + self.ip_to_id: Dict[str, int] = {p: i + 2 for i, p in enumerate(ip_list)} + self.wildcard_to_id: Dict[str, int] = {p: i + 2 for i, p in enumerate(wildcard_list)} + self.port_to_id: Dict[int, int] = {p: i + 2 for i, p in enumerate(port_list)} + self.protocol_to_id: Dict[str, int] = {p: i + 2 for i, p in enumerate(protocol_list)} self.default_observation: Dict = { i + 1: { @@ -110,16 +110,16 @@ class ACLObservation(AbstractObservation, identifier="ACL"): } else: src_ip = rule_state["src_ip_address"] - src_node_id = self.ip_to_id.get(src_ip, 1) + src_node_id = 1 if src_ip is None else self.ip_to_id[src_ip] dst_ip = rule_state["dst_ip_address"] - dst_node_ip = self.ip_to_id.get(dst_ip, 1) - src_wildcard = rule_state["source_wildcard_id"] + dst_node_id = 1 if dst_ip is None else self.ip_to_id[dst_ip] + src_wildcard = rule_state["src_wildcard_mask"] src_wildcard_id = self.wildcard_to_id.get(src_wildcard, 1) - dst_wildcard = rule_state["dest_wildcard_id"] + dst_wildcard = rule_state["dst_wildcard_mask"] dst_wildcard_id = self.wildcard_to_id.get(dst_wildcard, 1) - src_port = rule_state["source_port_id"] + src_port = rule_state["src_port"] src_port_id = self.port_to_id.get(src_port, 1) - dst_port = rule_state["dest_port_id"] + dst_port = rule_state["dst_port"] dst_port_id = self.port_to_id.get(dst_port, 1) protocol = rule_state["protocol"] protocol_id = self.protocol_to_id.get(protocol, 1) @@ -129,7 +129,7 @@ class ACLObservation(AbstractObservation, identifier="ACL"): "source_ip_id": src_node_id, "source_wildcard_id": src_wildcard_id, "source_port_id": src_port_id, - "dest_ip_id": dst_node_ip, + "dest_ip_id": dst_node_id, "dest_wildcard_id": dst_wildcard_id, "dest_port_id": dst_port_id, "protocol_id": protocol_id, diff --git a/src/primaite/game/agent/observations/file_system_observations.py b/src/primaite/game/agent/observations/file_system_observations.py index a7c56a89..90bca35f 100644 --- a/src/primaite/game/agent/observations/file_system_observations.py +++ b/src/primaite/game/agent/observations/file_system_observations.py @@ -133,8 +133,9 @@ class FolderObservation(AbstractObservation, identifier="FOLDER"): self.default_observation = { "health_status": 0, - "FILES": {i + 1: f.default_observation for i, f in enumerate(self.files)}, } + if self.files: + self.default_observation["FILES"] = {i + 1: f.default_observation for i, f in enumerate(self.files)} def observe(self, state: Dict) -> ObsType: """ @@ -154,7 +155,8 @@ class FolderObservation(AbstractObservation, identifier="FOLDER"): obs = {} obs["health_status"] = health_status - obs["FILES"] = {i + 1: file.observe(state) for i, file in enumerate(self.files)} + if self.files: + obs["FILES"] = {i + 1: file.observe(state) for i, file in enumerate(self.files)} return obs @@ -166,12 +168,10 @@ class FolderObservation(AbstractObservation, identifier="FOLDER"): :return: Gymnasium space representing the observation space for folder status. :rtype: spaces.Space """ - return spaces.Dict( - { - "health_status": spaces.Discrete(6), - "FILES": spaces.Dict({i + 1: f.space for i, f in enumerate(self.files)}), - } - ) + shape = {"health_status": spaces.Discrete(6)} + if self.files: + shape["FILES"] = spaces.Dict({i + 1: f.space for i, f in enumerate(self.files)}) + return spaces.Dict(shape) @classmethod def from_config(cls, config: ConfigSchema, game: "PrimaiteGame", parent_where: WhereType = []) -> FolderObservation: diff --git a/src/primaite/game/agent/observations/host_observations.py b/src/primaite/game/agent/observations/host_observations.py index 3ee5f2c7..8ea40be7 100644 --- a/src/primaite/game/agent/observations/host_observations.py +++ b/src/primaite/game/agent/observations/host_observations.py @@ -123,21 +123,27 @@ class HostObservation(AbstractObservation, identifier="HOST"): msg = f"Too many folders in Node observation space for node. Truncating folder {truncated_folder.where}" _LOGGER.warning(msg) - self.network_interfaces: List[NICObservation] = network_interfaces - while len(self.network_interfaces) < num_nics: - self.network_interfaces.append(NICObservation(where=None, include_nmne=include_nmne)) - while len(self.network_interfaces) > num_nics: - truncated_nic = self.network_interfaces.pop() + self.nics: List[NICObservation] = network_interfaces + while len(self.nics) < num_nics: + self.nics.append(NICObservation(where=None, include_nmne=include_nmne)) + while len(self.nics) > num_nics: + truncated_nic = self.nics.pop() msg = f"Too many network_interfaces in Node observation space for node. Truncating {truncated_nic.where}" _LOGGER.warning(msg) self.default_observation: ObsType = { - "SERVICES": {i + 1: s.default_observation for i, s in enumerate(self.services)}, - "APPLICATIONS": {i + 1: a.default_observation for i, a in enumerate(self.applications)}, - "FOLDERS": {i + 1: f.default_observation for i, f in enumerate(self.folders)}, - "NICS": {i + 1: n.default_observation for i, n in enumerate(self.network_interfaces)}, "operating_status": 0, } + if self.services: + self.default_observation["SERVICES"] = {i + 1: s.default_observation for i, s in enumerate(self.services)} + if self.applications: + self.default_observation["APPLICATIONS"] = { + i + 1: a.default_observation for i, a in enumerate(self.applications) + } + if self.folders: + self.default_observation["FOLDERS"] = {i + 1: f.default_observation for i, f in enumerate(self.folders)} + if self.nics: + self.default_observation["NICS"] = {i + 1: n.default_observation for i, n in enumerate(self.nics)} if self.include_num_access: self.default_observation["num_file_creations"] = 0 self.default_observation["num_file_deletions"] = 0 @@ -156,13 +162,15 @@ class HostObservation(AbstractObservation, identifier="HOST"): return self.default_observation obs = {} - obs["SERVICES"] = {i + 1: service.observe(state) for i, service in enumerate(self.services)} - obs["APPLICATIONS"] = {i + 1: app.observe(state) for i, app in enumerate(self.applications)} - obs["FOLDERS"] = {i + 1: folder.observe(state) for i, folder in enumerate(self.folders)} obs["operating_status"] = node_state["operating_state"] - obs["NICS"] = { - i + 1: network_interface.observe(state) for i, network_interface in enumerate(self.network_interfaces) - } + if self.services: + obs["SERVICES"] = {i + 1: service.observe(state) for i, service in enumerate(self.services)} + if self.applications: + obs["APPLICATIONS"] = {i + 1: app.observe(state) for i, app in enumerate(self.applications)} + if self.folders: + obs["FOLDERS"] = {i + 1: folder.observe(state) for i, folder in enumerate(self.folders)} + if self.nics: + obs["NICS"] = {i + 1: nic.observe(state) for i, nic in enumerate(self.nics)} if self.include_num_access: obs["num_file_creations"] = node_state["file_system"]["num_file_creations"] obs["num_file_deletions"] = node_state["file_system"]["num_file_deletions"] @@ -177,14 +185,16 @@ class HostObservation(AbstractObservation, identifier="HOST"): :rtype: spaces.Space """ shape = { - "SERVICES": spaces.Dict({i + 1: service.space for i, service in enumerate(self.services)}), - "APPLICATIONS": spaces.Dict({i + 1: app.space for i, app in enumerate(self.applications)}), - "FOLDERS": spaces.Dict({i + 1: folder.space for i, folder in enumerate(self.folders)}), "operating_status": spaces.Discrete(5), - "NICS": spaces.Dict( - {i + 1: network_interface.space for i, network_interface in enumerate(self.network_interfaces)} - ), } + if self.services: + shape["SERVICES"] = spaces.Dict({i + 1: service.space for i, service in enumerate(self.services)}) + if self.applications: + shape["APPLICATIONS"] = spaces.Dict({i + 1: app.space for i, app in enumerate(self.applications)}) + if self.folders: + shape["FOLDERS"] = spaces.Dict({i + 1: folder.space for i, folder in enumerate(self.folders)}) + if self.nics: + shape["NICS"] = spaces.Dict({i + 1: nic.space for i, nic in enumerate(self.nics)}) if self.include_num_access: shape["num_file_creations"] = spaces.Discrete(4) shape["num_file_deletions"] = spaces.Discrete(4) diff --git a/src/primaite/game/agent/observations/nic_observations.py b/src/primaite/game/agent/observations/nic_observations.py index 19826f84..44cc7f8f 100644 --- a/src/primaite/game/agent/observations/nic_observations.py +++ b/src/primaite/game/agent/observations/nic_observations.py @@ -23,7 +23,11 @@ class NICObservation(AbstractObservation, identifier="NETWORK_INTERFACE"): include_nmne: Optional[bool] = None """Whether to include number of malicious network events (NMNE) in the observation.""" - def __init__(self, where: WhereType, include_nmne: bool) -> None: + def __init__( + self, + where: WhereType, + include_nmne: bool, + ) -> None: """ Initialise a network interface observation instance. @@ -40,6 +44,36 @@ class NICObservation(AbstractObservation, identifier="NETWORK_INTERFACE"): self.default_observation: ObsType = {"nic_status": 0} if self.include_nmne: self.default_observation.update({"NMNE": {"inbound": 0, "outbound": 0}}) + self.nmne_inbound_last_step: int = 0 + self.nmne_outbound_last_step: int = 0 + + # TODO: allow these to be configured in yaml + self.high_nmne_threshold = 10 + self.med_nmne_threshold = 5 + self.low_nmne_threshold = 0 + + def _categorise_mne_count(self, nmne_count: int) -> int: + """ + Categorise the number of Malicious Network Events (NMNEs) into discrete bins. + + This helps in classifying the severity or volume of MNEs into manageable levels for the agent. + + Bins are defined as follows: + - 0: No MNEs detected (0 events). + - 1: Low number of MNEs (default 1-5 events). + - 2: Moderate number of MNEs (default 6-10 events). + - 3: High number of MNEs (default more than 10 events). + + :param nmne_count: Number of MNEs detected. + :return: Bin number corresponding to the number of MNEs. Returns 0, 1, 2, or 3 based on the detected MNE count. + """ + if nmne_count > self.high_nmne_threshold: + return 3 + elif nmne_count > self.med_nmne_threshold: + return 2 + elif nmne_count > self.low_nmne_threshold: + return 1 + return 0 def observe(self, state: Dict) -> ObsType: """ diff --git a/src/primaite/game/agent/observations/router_observation.py b/src/primaite/game/agent/observations/router_observation.py index c2919770..a7879f09 100644 --- a/src/primaite/game/agent/observations/router_observation.py +++ b/src/primaite/game/agent/observations/router_observation.py @@ -74,9 +74,10 @@ class RouterObservation(AbstractObservation, identifier="ROUTER"): _LOGGER.warning(msg) self.default_observation = { - "PORTS": {i + 1: p.default_observation for i, p in enumerate(self.ports)}, "ACL": self.acl.default_observation, } + if self.ports: + self.default_observation["PORTS"] = {i + 1: p.default_observation for i, p in enumerate(self.ports)} def observe(self, state: Dict) -> ObsType: """ @@ -92,8 +93,9 @@ class RouterObservation(AbstractObservation, identifier="ROUTER"): return self.default_observation obs = {} - obs["PORTS"] = {i + 1: p.observe(state) for i, p in enumerate(self.ports)} obs["ACL"] = self.acl.observe(state) + if self.ports: + obs["PORTS"] = {i + 1: p.observe(state) for i, p in enumerate(self.ports)} return obs @property @@ -104,9 +106,10 @@ class RouterObservation(AbstractObservation, identifier="ROUTER"): :return: Gymnasium space representing the observation space for router status. :rtype: spaces.Space """ - return spaces.Dict( - {"PORTS": spaces.Dict({i + 1: p.space for i, p in enumerate(self.ports)}), "ACL": self.acl.space} - ) + shape = {"ACL": self.acl.space} + if self.ports: + shape["PORTS"] = spaces.Dict({i + 1: p.space for i, p in enumerate(self.ports)}) + return spaces.Dict(shape) @classmethod def from_config(cls, config: ConfigSchema, game: "PrimaiteGame", parent_where: WhereType = []) -> RouterObservation: diff --git a/tests/assets/configs/bad_primaite_session.yaml b/tests/assets/configs/bad_primaite_session.yaml index e599ee7e..c613008e 100644 --- a/tests/assets/configs/bad_primaite_session.yaml +++ b/tests/assets/configs/bad_primaite_session.yaml @@ -22,8 +22,7 @@ agents: - ref: client_2_green_user team: GREEN type: ProbabilisticAgent - observation_space: - type: UC2GreenObservation + observation_space: null action_space: action_list: - type: DONOTHING @@ -50,10 +49,7 @@ agents: team: RED type: RedDatabaseCorruptingAgent - observation_space: - type: UC2RedObservation - options: - nodes: {} + observation_space: null action_space: action_list: @@ -86,63 +82,73 @@ agents: type: ProxyAgent observation_space: - type: UC2BlueObservation + type: CUSTOM options: - num_services_per_node: 1 - num_folders_per_node: 1 - num_files_per_folder: 1 - num_nics_per_node: 2 - nodes: - - node_hostname: domain_controller - services: - - service_name: domain_controller_dns_server - - node_hostname: web_server - services: - - service_name: web_server_database_client - - node_hostname: database_server - services: - - service_name: database_service - folders: - - folder_name: database - files: - - file_name: database.db - - node_hostname: backup_server - - node_hostname: security_suite - - node_hostname: client_1 - - node_hostname: client_2 - links: - - link_ref: router_1___switch_1 - - link_ref: router_1___switch_2 - - link_ref: switch_1___domain_controller - - link_ref: switch_1___web_server - - link_ref: switch_1___database_server - - link_ref: switch_1___backup_server - - link_ref: switch_1___security_suite - - link_ref: switch_2___client_1 - - link_ref: switch_2___client_2 - - link_ref: switch_2___security_suite - acl: - options: - max_acl_rules: 10 - router_hostname: router_1 - ip_address_order: - - node_hostname: domain_controller - nic_num: 1 - - node_hostname: web_server - nic_num: 1 - - node_hostname: database_server - nic_num: 1 - - node_hostname: backup_server - nic_num: 1 - - node_hostname: security_suite - nic_num: 1 - - node_hostname: client_1 - nic_num: 1 - - node_hostname: client_2 - nic_num: 1 - - node_hostname: security_suite - nic_num: 2 - ics: null + components: + - type: NODES + label: NODES + options: + hosts: + - hostname: domain_controller + - hostname: web_server + services: + - service_name: WebServer + - hostname: database_server + folders: + - folder_name: database + files: + - file_name: database.db + - hostname: backup_server + - hostname: security_suite + - hostname: client_1 + - hostname: client_2 + num_services: 1 + num_applications: 0 + num_folders: 1 + num_files: 1 + num_nics: 2 + include_num_access: false + include_nmne: true + routers: + - hostname: router_1 + num_ports: 0 + ip_list: + - 192.168.1.10 + - 192.168.1.12 + - 192.168.1.14 + - 192.168.1.16 + - 192.168.1.110 + - 192.168.10.21 + - 192.168.10.22 + - 192.168.10.110 + wildcard_list: + - 0.0.0.1 + port_list: + - 80 + - 5432 + protocol_list: + - ICMP + - TCP + - UDP + num_rules: 10 + + - type: LINKS + label: LINKS + options: + link_references: + - router_1___switch_1 + - router_1___switch_2 + - switch_1___domain_controller + - switch_1___web_server + - switch_1___database_server + - switch_1___backup_server + - switch_1___security_suite + - switch_2___client_1 + - switch_2___client_2 + - switch_2___security_suite + - type: "NONE" + label: ICS + options: {} action_space: action_list: diff --git a/tests/assets/configs/basic_firewall.yaml b/tests/assets/configs/basic_firewall.yaml index 9d7b34cb..5de704dc 100644 --- a/tests/assets/configs/basic_firewall.yaml +++ b/tests/assets/configs/basic_firewall.yaml @@ -41,8 +41,7 @@ agents: - ref: client_2_green_user team: GREEN type: ProbabilisticAgent - observation_space: - type: UC2GreenObservation + observation_space: null action_space: action_list: - type: DONOTHING diff --git a/tests/assets/configs/basic_switched_network.yaml b/tests/assets/configs/basic_switched_network.yaml index 9a0d5313..aab6b780 100644 --- a/tests/assets/configs/basic_switched_network.yaml +++ b/tests/assets/configs/basic_switched_network.yaml @@ -41,8 +41,7 @@ agents: - ref: client_2_green_user team: GREEN type: ProbabilisticAgent - observation_space: - type: UC2GreenObservation + observation_space: null action_space: action_list: - type: DONOTHING diff --git a/tests/assets/configs/dmz_network.yaml b/tests/assets/configs/dmz_network.yaml index 95e09e16..076c174a 100644 --- a/tests/assets/configs/dmz_network.yaml +++ b/tests/assets/configs/dmz_network.yaml @@ -66,8 +66,7 @@ agents: - ref: client_1_green_user team: GREEN type: ProbabilisticAgent - observation_space: - type: UC2GreenObservation + observation_space: null action_space: action_list: - type: DONOTHING diff --git a/tests/assets/configs/eval_only_primaite_session.yaml b/tests/assets/configs/eval_only_primaite_session.yaml index 9d1404d8..a4450264 100644 --- a/tests/assets/configs/eval_only_primaite_session.yaml +++ b/tests/assets/configs/eval_only_primaite_session.yaml @@ -26,8 +26,7 @@ agents: - ref: client_2_green_user team: GREEN type: ProbabilisticAgent - observation_space: - type: UC2GreenObservation + observation_space: null action_space: action_list: - type: DONOTHING @@ -55,10 +54,7 @@ agents: team: RED type: RedDatabaseCorruptingAgent - observation_space: - type: UC2RedObservation - options: - nodes: {} + observation_space: null action_space: action_list: @@ -90,63 +86,73 @@ agents: type: ProxyAgent observation_space: - type: UC2BlueObservation + type: CUSTOM options: - num_services_per_node: 1 - num_folders_per_node: 1 - num_files_per_folder: 1 - num_nics_per_node: 2 - nodes: - - node_hostname: domain_controller - services: - - service_name: domain_controller_dns_server - - node_hostname: web_server - services: - - service_name: web_server_database_client - - node_hostname: database_server - services: - - service_name: database_service - folders: - - folder_name: database - files: - - file_name: database.db - - node_hostname: backup_server - - node_hostname: security_suite - - node_hostname: client_1 - - node_hostname: client_2 - links: - - link_ref: router_1___switch_1 - - link_ref: router_1___switch_2 - - link_ref: switch_1___domain_controller - - link_ref: switch_1___web_server - - link_ref: switch_1___database_server - - link_ref: switch_1___backup_server - - link_ref: switch_1___security_suite - - link_ref: switch_2___client_1 - - link_ref: switch_2___client_2 - - link_ref: switch_2___security_suite - acl: - options: - max_acl_rules: 10 - router_hostname: router_1 - ip_address_order: - - node_hostname: domain_controller - nic_num: 1 - - node_hostname: web_server - nic_num: 1 - - node_hostname: database_server - nic_num: 1 - - node_hostname: backup_server - nic_num: 1 - - node_hostname: security_suite - nic_num: 1 - - node_hostname: client_1 - nic_num: 1 - - node_hostname: client_2 - nic_num: 1 - - node_hostname: security_suite - nic_num: 2 - ics: null + components: + - type: NODES + label: NODES + options: + hosts: + - hostname: domain_controller + - hostname: web_server + services: + - service_name: WebServer + - hostname: database_server + folders: + - folder_name: database + files: + - file_name: database.db + - hostname: backup_server + - hostname: security_suite + - hostname: client_1 + - hostname: client_2 + num_services: 1 + num_applications: 0 + num_folders: 1 + num_files: 1 + num_nics: 2 + include_num_access: false + include_nmne: true + routers: + - hostname: router_1 + num_ports: 0 + ip_list: + - 192.168.1.10 + - 192.168.1.12 + - 192.168.1.14 + - 192.168.1.16 + - 192.168.1.110 + - 192.168.10.21 + - 192.168.10.22 + - 192.168.10.110 + wildcard_list: + - 0.0.0.1 + port_list: + - 80 + - 5432 + protocol_list: + - ICMP + - TCP + - UDP + num_rules: 10 + + - type: LINKS + label: LINKS + options: + link_references: + - router_1___switch_1 + - router_1___switch_2 + - switch_1___domain_controller + - switch_1___web_server + - switch_1___database_server + - switch_1___backup_server + - switch_1___security_suite + - switch_2___client_1 + - switch_2___client_2 + - switch_2___security_suite + - type: "NONE" + label: ICS + options: {} action_space: action_list: diff --git a/tests/assets/configs/multi_agent_session.yaml b/tests/assets/configs/multi_agent_session.yaml index acb62c96..8723e71a 100644 --- a/tests/assets/configs/multi_agent_session.yaml +++ b/tests/assets/configs/multi_agent_session.yaml @@ -32,8 +32,7 @@ agents: - ref: client_2_green_user team: GREEN type: ProbabilisticAgent - observation_space: - type: UC2GreenObservation + observation_space: null action_space: action_list: - type: DONOTHING @@ -61,10 +60,7 @@ agents: team: RED type: RedDatabaseCorruptingAgent - observation_space: - type: UC2RedObservation - options: - nodes: {} + observation_space: null action_space: action_list: @@ -97,63 +93,73 @@ agents: type: ProxyAgent observation_space: - type: UC2BlueObservation + type: CUSTOM options: - num_services_per_node: 1 - num_folders_per_node: 1 - num_files_per_folder: 1 - num_nics_per_node: 2 - nodes: - - node_hostname: domain_controller - services: - - service_name: domain_controller_dns_server - - node_hostname: web_server - services: - - service_name: web_server_database_client - - node_hostname: database_server - services: - - service_name: database_service - folders: - - folder_name: database - files: - - file_name: database.db - - node_hostname: backup_server - - node_hostname: security_suite - - node_hostname: client_1 - - node_hostname: client_2 - links: - - link_ref: router_1___switch_1 - - link_ref: router_1___switch_2 - - link_ref: switch_1___domain_controller - - link_ref: switch_1___web_server - - link_ref: switch_1___database_server - - link_ref: switch_1___backup_server - - link_ref: switch_1___security_suite - - link_ref: switch_2___client_1 - - link_ref: switch_2___client_2 - - link_ref: switch_2___security_suite - acl: - options: - max_acl_rules: 10 - router_hostname: router_1 - ip_address_order: - - node_hostname: domain_controller - nic_num: 1 - - node_hostname: web_server - nic_num: 1 - - node_hostname: database_server - nic_num: 1 - - node_hostname: backup_server - nic_num: 1 - - node_hostname: security_suite - nic_num: 1 - - node_hostname: client_1 - nic_num: 1 - - node_hostname: client_2 - nic_num: 1 - - node_hostname: security_suite - nic_num: 2 - ics: null + components: + - type: NODES + label: NODES + options: + hosts: + - hostname: domain_controller + - hostname: web_server + services: + - service_name: WebServer + - hostname: database_server + folders: + - folder_name: database + files: + - file_name: database.db + - hostname: backup_server + - hostname: security_suite + - hostname: client_1 + - hostname: client_2 + num_services: 1 + num_applications: 0 + num_folders: 1 + num_files: 1 + num_nics: 2 + include_num_access: false + include_nmne: true + routers: + - hostname: router_1 + num_ports: 0 + ip_list: + - 192.168.1.10 + - 192.168.1.12 + - 192.168.1.14 + - 192.168.1.16 + - 192.168.1.110 + - 192.168.10.21 + - 192.168.10.22 + - 192.168.10.110 + wildcard_list: + - 0.0.0.1 + port_list: + - 80 + - 5432 + protocol_list: + - ICMP + - TCP + - UDP + num_rules: 10 + + - type: LINKS + label: LINKS + options: + link_references: + - router_1___switch_1 + - router_1___switch_2 + - switch_1___domain_controller + - switch_1___web_server + - switch_1___database_server + - switch_1___backup_server + - switch_1___security_suite + - switch_2___client_1 + - switch_2___client_2 + - switch_2___security_suite + - type: "NONE" + label: ICS + options: {} action_space: action_list: @@ -541,63 +547,73 @@ agents: type: ProxyAgent observation_space: - type: UC2BlueObservation + type: CUSTOM options: - num_services_per_node: 1 - num_folders_per_node: 1 - num_files_per_folder: 1 - num_nics_per_node: 2 - nodes: - - node_hostname: domain_controller - services: - - service_name: domain_controller_dns_server - - node_hostname: web_server - services: - - service_name: web_server_database_client - - node_hostname: database_server - services: - - service_name: database_service - folders: - - folder_name: database - files: - - file_name: database.db - - node_hostname: backup_server - - node_hostname: security_suite - - node_hostname: client_1 - - node_hostname: client_2 - links: - - link_ref: router_1___switch_1 - - link_ref: router_1___switch_2 - - link_ref: switch_1___domain_controller - - link_ref: switch_1___web_server - - link_ref: switch_1___database_server - - link_ref: switch_1___backup_server - - link_ref: switch_1___security_suite - - link_ref: switch_2___client_1 - - link_ref: switch_2___client_2 - - link_ref: switch_2___security_suite - acl: - options: - max_acl_rules: 10 - router_hostname: router_1 - ip_address_order: - - node_hostname: domain_controller - nic_num: 1 - - node_hostname: web_server - nic_num: 1 - - node_hostname: database_server - nic_num: 1 - - node_hostname: backup_server - nic_num: 1 - - node_hostname: security_suite - nic_num: 1 - - node_hostname: client_1 - nic_num: 1 - - node_hostname: client_2 - nic_num: 1 - - node_hostname: security_suite - nic_num: 2 - ics: null + components: + - type: NODES + label: NODES + options: + hosts: + - hostname: domain_controller + - hostname: web_server + services: + - service_name: WebServer + - hostname: database_server + folders: + - folder_name: database + files: + - file_name: database.db + - hostname: backup_server + - hostname: security_suite + - hostname: client_1 + - hostname: client_2 + num_services: 1 + num_applications: 0 + num_folders: 1 + num_files: 1 + num_nics: 2 + include_num_access: false + include_nmne: true + routers: + - hostname: router_1 + num_ports: 0 + ip_list: + - 192.168.1.10 + - 192.168.1.12 + - 192.168.1.14 + - 192.168.1.16 + - 192.168.1.110 + - 192.168.10.21 + - 192.168.10.22 + - 192.168.10.110 + wildcard_list: + - 0.0.0.1 + port_list: + - 80 + - 5432 + protocol_list: + - ICMP + - TCP + - UDP + num_rules: 10 + + - type: LINKS + label: LINKS + options: + link_references: + - router_1___switch_1 + - router_1___switch_2 + - switch_1___domain_controller + - switch_1___web_server + - switch_1___database_server + - switch_1___backup_server + - switch_1___security_suite + - switch_2___client_1 + - switch_2___client_2 + - switch_2___security_suite + - type: "NONE" + label: ICS + options: {} action_space: action_list: diff --git a/tests/assets/configs/shared_rewards.yaml b/tests/assets/configs/shared_rewards.yaml index 10feba9d..9acf3ad5 100644 --- a/tests/assets/configs/shared_rewards.yaml +++ b/tests/assets/configs/shared_rewards.yaml @@ -41,8 +41,7 @@ agents: 0: 0.3 1: 0.6 2: 0.1 - observation_space: - type: UC2GreenObservation + observation_space: null action_space: action_list: - type: DONOTHING @@ -91,8 +90,7 @@ agents: 0: 0.3 1: 0.6 2: 0.1 - observation_space: - type: UC2GreenObservation + observation_space: null action_space: action_list: - type: DONOTHING @@ -141,10 +139,7 @@ agents: team: RED type: RedDatabaseCorruptingAgent - observation_space: - type: UC2RedObservation - options: - nodes: {} + observation_space: null action_space: action_list: @@ -177,61 +172,73 @@ agents: type: ProxyAgent observation_space: - type: UC2BlueObservation + type: CUSTOM options: - num_services_per_node: 1 - num_folders_per_node: 1 - num_files_per_folder: 1 - num_nics_per_node: 2 - nodes: - - node_hostname: domain_controller - services: - - service_name: DNSServer - - node_hostname: web_server - services: - - service_name: WebServer - - node_hostname: database_server - folders: - - folder_name: database - files: - - file_name: database.db - - node_hostname: backup_server - - node_hostname: security_suite - - node_hostname: client_1 - - node_hostname: client_2 - links: - - link_ref: router_1___switch_1 - - link_ref: router_1___switch_2 - - link_ref: switch_1___domain_controller - - link_ref: switch_1___web_server - - link_ref: switch_1___database_server - - link_ref: switch_1___backup_server - - link_ref: switch_1___security_suite - - link_ref: switch_2___client_1 - - link_ref: switch_2___client_2 - - link_ref: switch_2___security_suite - acl: - options: - max_acl_rules: 10 - router_hostname: router_1 - ip_address_order: - - node_hostname: domain_controller - nic_num: 1 - - node_hostname: web_server - nic_num: 1 - - node_hostname: database_server - nic_num: 1 - - node_hostname: backup_server - nic_num: 1 - - node_hostname: security_suite - nic_num: 1 - - node_hostname: client_1 - nic_num: 1 - - node_hostname: client_2 - nic_num: 1 - - node_hostname: security_suite - nic_num: 2 - ics: null + components: + - type: NODES + label: NODES + options: + hosts: + - hostname: domain_controller + - hostname: web_server + services: + - service_name: WebServer + - hostname: database_server + folders: + - folder_name: database + files: + - file_name: database.db + - hostname: backup_server + - hostname: security_suite + - hostname: client_1 + - hostname: client_2 + num_services: 1 + num_applications: 0 + num_folders: 1 + num_files: 1 + num_nics: 2 + include_num_access: false + include_nmne: true + routers: + - hostname: router_1 + num_ports: 0 + ip_list: + - 192.168.1.10 + - 192.168.1.12 + - 192.168.1.14 + - 192.168.1.16 + - 192.168.1.110 + - 192.168.10.21 + - 192.168.10.22 + - 192.168.10.110 + wildcard_list: + - 0.0.0.1 + port_list: + - 80 + - 5432 + protocol_list: + - ICMP + - TCP + - UDP + num_rules: 10 + + - type: LINKS + label: LINKS + options: + link_references: + - router_1___switch_1 + - router_1___switch_2 + - switch_1___domain_controller + - switch_1___web_server + - switch_1___database_server + - switch_1___backup_server + - switch_1___security_suite + - switch_2___client_1 + - switch_2___client_2 + - switch_2___security_suite + - type: "NONE" + label: ICS + options: {} action_space: action_list: diff --git a/tests/assets/configs/test_primaite_session.yaml b/tests/assets/configs/test_primaite_session.yaml index a8b33032..9391084a 100644 --- a/tests/assets/configs/test_primaite_session.yaml +++ b/tests/assets/configs/test_primaite_session.yaml @@ -33,8 +33,7 @@ agents: - ref: client_2_green_user team: GREEN type: ProbabilisticAgent - observation_space: - type: UC2GreenObservation + observation_space: null action_space: action_list: - type: DONOTHING @@ -62,10 +61,7 @@ agents: team: RED type: RedDatabaseCorruptingAgent - observation_space: - type: UC2RedObservation - options: - nodes: {} + observation_space: null action_space: action_list: @@ -98,65 +94,73 @@ agents: type: ProxyAgent observation_space: - type: UC2BlueObservation + type: CUSTOM options: - num_services_per_node: 1 - num_folders_per_node: 1 - num_files_per_folder: 1 - num_nics_per_node: 2 - nodes: - - node_hostname: domain_controller - services: - - service_name: domain_controller_dns_server - - node_hostname: web_server - services: - - service_name: web_server_database_client - - node_hostname: database_server - services: - - service_name: database_service - folders: - - folder_name: database - files: - - file_name: database.db - - node_hostname: backup_server - # services: - # - service_name: backup_service - - node_hostname: security_suite - - node_hostname: client_1 - - node_hostname: client_2 - links: - - link_ref: router_1___switch_1 - - link_ref: router_1___switch_2 - - link_ref: switch_1___domain_controller - - link_ref: switch_1___web_server - - link_ref: switch_1___database_server - - link_ref: switch_1___backup_server - - link_ref: switch_1___security_suite - - link_ref: switch_2___client_1 - - link_ref: switch_2___client_2 - - link_ref: switch_2___security_suite - acl: - options: - max_acl_rules: 10 - router_hostname: router_1 - ip_address_order: - - node_hostname: domain_controller - nic_num: 1 - - node_hostname: web_server - nic_num: 1 - - node_hostname: database_server - nic_num: 1 - - node_hostname: backup_server - nic_num: 1 - - node_hostname: security_suite - nic_num: 1 - - node_hostname: client_1 - nic_num: 1 - - node_hostname: client_2 - nic_num: 1 - - node_hostname: security_suite - nic_num: 2 - ics: null + components: + - type: NODES + label: NODES + options: + hosts: + - hostname: domain_controller + - hostname: web_server + services: + - service_name: WebServer + - hostname: database_server + folders: + - folder_name: database + files: + - file_name: database.db + - hostname: backup_server + - hostname: security_suite + - hostname: client_1 + - hostname: client_2 + num_services: 1 + num_applications: 0 + num_folders: 1 + num_files: 1 + num_nics: 2 + include_num_access: false + include_nmne: true + routers: + - hostname: router_1 + num_ports: 0 + ip_list: + - 192.168.1.10 + - 192.168.1.12 + - 192.168.1.14 + - 192.168.1.16 + - 192.168.1.110 + - 192.168.10.21 + - 192.168.10.22 + - 192.168.10.110 + wildcard_list: + - 0.0.0.1 + port_list: + - 80 + - 5432 + protocol_list: + - ICMP + - TCP + - UDP + num_rules: 10 + + - type: LINKS + label: LINKS + options: + link_references: + - router_1___switch_1 + - router_1___switch_2 + - switch_1___domain_controller + - switch_1___web_server + - switch_1___database_server + - switch_1___backup_server + - switch_1___security_suite + - switch_2___client_1 + - switch_2___client_2 + - switch_2___security_suite + - type: "NONE" + label: ICS + options: {} action_space: action_list: diff --git a/tests/assets/configs/train_only_primaite_session.yaml b/tests/assets/configs/train_only_primaite_session.yaml index d0cbaab3..5e00928b 100644 --- a/tests/assets/configs/train_only_primaite_session.yaml +++ b/tests/assets/configs/train_only_primaite_session.yaml @@ -26,8 +26,7 @@ agents: - ref: client_2_green_user team: GREEN type: ProbabilisticAgent - observation_space: - type: UC2GreenObservation + observation_space: null action_space: action_list: - type: DONOTHING @@ -62,10 +61,7 @@ agents: team: RED type: RedDatabaseCorruptingAgent - observation_space: - type: UC2RedObservation - options: - nodes: {} + observation_space: null action_space: action_list: @@ -98,63 +94,73 @@ agents: type: ProxyAgent observation_space: - type: UC2BlueObservation + type: CUSTOM options: - num_services_per_node: 1 - num_folders_per_node: 1 - num_files_per_folder: 1 - num_nics_per_node: 2 - nodes: - - node_hostname: domain_controller - services: - - service_name: domain_controller_dns_server - - node_hostname: web_server - services: - - service_name: web_server_database_client - - node_hostname: database_server - services: - - service_name: database_service - folders: - - folder_name: database - files: - - file_name: database.db - - node_hostname: backup_server - - node_hostname: security_suite - - node_hostname: client_1 - - node_hostname: client_2 - links: - - link_ref: router_1___switch_1 - - link_ref: router_1___switch_2 - - link_ref: switch_1___domain_controller - - link_ref: switch_1___web_server - - link_ref: switch_1___database_server - - link_ref: switch_1___backup_server - - link_ref: switch_1___security_suite - - link_ref: switch_2___client_1 - - link_ref: switch_2___client_2 - - link_ref: switch_2___security_suite - acl: - options: - max_acl_rules: 10 - router_hostname: router_1 - ip_address_order: - - node_hostname: domain_controller - nic_num: 1 - - node_hostname: web_server - nic_num: 1 - - node_hostname: database_server - nic_num: 1 - - node_hostname: backup_server - nic_num: 1 - - node_hostname: security_suite - nic_num: 1 - - node_hostname: client_1 - nic_num: 1 - - node_hostname: client_2 - nic_num: 1 - - node_hostname: security_suite - nic_num: 2 - ics: null + components: + - type: NODES + label: NODES + options: + hosts: + - hostname: domain_controller + - hostname: web_server + services: + - service_name: WebServer + - hostname: database_server + folders: + - folder_name: database + files: + - file_name: database.db + - hostname: backup_server + - hostname: security_suite + - hostname: client_1 + - hostname: client_2 + num_services: 1 + num_applications: 0 + num_folders: 1 + num_files: 1 + num_nics: 2 + include_num_access: false + include_nmne: true + routers: + - hostname: router_1 + num_ports: 0 + ip_list: + - 192.168.1.10 + - 192.168.1.12 + - 192.168.1.14 + - 192.168.1.16 + - 192.168.1.110 + - 192.168.10.21 + - 192.168.10.22 + - 192.168.10.110 + wildcard_list: + - 0.0.0.1 + port_list: + - 80 + - 5432 + protocol_list: + - ICMP + - TCP + - UDP + num_rules: 10 + + - type: LINKS + label: LINKS + options: + link_references: + - router_1___switch_1 + - router_1___switch_2 + - switch_1___domain_controller + - switch_1___web_server + - switch_1___database_server + - switch_1___backup_server + - switch_1___security_suite + - switch_2___client_1 + - switch_2___client_2 + - switch_2___security_suite + - type: "NONE" + label: ICS + options: {} action_space: action_list: diff --git a/tests/e2e_integration_tests/test_primaite_session.py b/tests/e2e_integration_tests/test_primaite_session.py index c45a4690..4e9ba723 100644 --- a/tests/e2e_integration_tests/test_primaite_session.py +++ b/tests/e2e_integration_tests/test_primaite_session.py @@ -11,8 +11,9 @@ MISCONFIGURED_PATH = TEST_ASSETS_ROOT / "configs/bad_primaite_session.yaml" MULTI_AGENT_PATH = TEST_ASSETS_ROOT / "configs/multi_agent_session.yaml" -# @pytest.mark.skip(reason="no way of currently testing this") +@pytest.mark.skip(reason="Session is not being maintained and will be removed in the subsequent beta release.") class TestPrimaiteSession: + @pytest.mark.skip(reason="Session is not being maintained and will be removed in the subsequent beta release.") @pytest.mark.parametrize("temp_primaite_session", [[CFG_PATH]], indirect=True) def test_creating_session(self, temp_primaite_session): """Check that creating a session from config works.""" @@ -51,6 +52,7 @@ class TestPrimaiteSession: assert checkpoint_2.exists() assert not checkpoint_3.exists() + @pytest.mark.skip(reason="Session is not being maintained and will be removed in the subsequent beta release.") @pytest.mark.parametrize("temp_primaite_session", [[TRAINING_ONLY_PATH]], indirect=True) def test_training_only_session(self, temp_primaite_session): """Check that you can run a training-only session.""" @@ -59,6 +61,7 @@ class TestPrimaiteSession: session.start_session() # TODO: include checks that the model was trained, e.g. that the loss changed and checkpoints were saved? + @pytest.mark.skip(reason="Session is not being maintained and will be removed in the subsequent beta release.") @pytest.mark.parametrize("temp_primaite_session", [[EVAL_ONLY_PATH]], indirect=True) def test_eval_only_session(self, temp_primaite_session): """Check that you can load a model and run an eval-only session.""" @@ -67,6 +70,7 @@ class TestPrimaiteSession: session.start_session() # TODO: include checks that the model was loaded and that the eval-only session ran + @pytest.mark.skip(reason="Session is not being maintained and will be removed in the subsequent beta release.") @pytest.mark.skip(reason="Slow, reenable later") @pytest.mark.parametrize("temp_primaite_session", [[MULTI_AGENT_PATH]], indirect=True) def test_multi_agent_session(self, temp_primaite_session): @@ -74,10 +78,12 @@ class TestPrimaiteSession: with temp_primaite_session as session: session.start_session() + @pytest.mark.skip(reason="Session is not being maintained and will be removed in the subsequent beta release.") def test_error_thrown_on_bad_configuration(self): with pytest.raises(pydantic.ValidationError): session = TempPrimaiteSession.from_config(MISCONFIGURED_PATH) + @pytest.mark.skip(reason="Session is not being maintained and will be removed in the subsequent beta release.") @pytest.mark.skip( reason="Currently software cannot be dynamically created/destroyed during simulation. Therefore, " "reset doesn't implement software restore." diff --git a/tests/integration_tests/game_layer/observations/test_acl_observations.py b/tests/integration_tests/game_layer/observations/test_acl_observations.py index d0710f5f..5aa2ec2a 100644 --- a/tests/integration_tests/game_layer/observations/test_acl_observations.py +++ b/tests/integration_tests/game_layer/observations/test_acl_observations.py @@ -36,9 +36,11 @@ def test_acl_observations(simulation): acl_obs = ACLObservation( where=["network", "nodes", router.hostname, "acl", "acl"], - node_ip_to_id={}, - ports=["NTP", "HTTP", "POSTGRES_SERVER"], - protocols=["TCP", "UDP", "ICMP"], + ip_list=[], + port_list=["NTP", "HTTP", "POSTGRES_SERVER"], + protocol_list=["TCP", "UDP", "ICMP"], + num_rules=10, + wildcard_list=[], ) observation_space = acl_obs.observe(simulation.describe_state()) @@ -46,11 +48,11 @@ def test_acl_observations(simulation): rule_obs = observation_space.get(1) # this is the ACL Rule added to allow NTP assert rule_obs.get("position") == 0 # rule was put at position 1 (0 because counting from 1 instead of 1) assert rule_obs.get("permission") == 1 # permit = 1 deny = 2 - assert rule_obs.get("source_node_id") == 1 # applies to all source nodes - assert rule_obs.get("dest_node_id") == 1 # applies to all destination nodes - assert rule_obs.get("source_port") == 2 # NTP port is mapped to value 2 (1 = ALL, so 1+1 = 2 quik mafs) - assert rule_obs.get("dest_port") == 2 # NTP port is mapped to value 2 - assert rule_obs.get("protocol") == 1 # 1 = No Protocol + assert rule_obs.get("source_ip_id") == 1 # applies to all source nodes + assert rule_obs.get("dest_ip_id") == 1 # applies to all destination nodes + assert rule_obs.get("source_port_id") == 2 # NTP port is mapped to value 2 (1 = ALL, so 1+1 = 2 quik mafs) + assert rule_obs.get("dest_port_id") == 2 # NTP port is mapped to value 2 + assert rule_obs.get("protocol_id") == 1 # 1 = No Protocol router.acl.remove_rule(1) @@ -59,8 +61,8 @@ def test_acl_observations(simulation): rule_obs = observation_space.get(1) # this is the ACL Rule added to allow NTP assert rule_obs.get("position") == 0 assert rule_obs.get("permission") == 0 - assert rule_obs.get("source_node_id") == 0 - assert rule_obs.get("dest_node_id") == 0 - assert rule_obs.get("source_port") == 0 - assert rule_obs.get("dest_port") == 0 - assert rule_obs.get("protocol") == 0 + assert rule_obs.get("source_ip_id") == 0 + assert rule_obs.get("dest_ip_id") == 0 + assert rule_obs.get("source_port_id") == 0 + assert rule_obs.get("dest_port_id") == 0 + assert rule_obs.get("protocol_id") == 0 diff --git a/tests/integration_tests/game_layer/observations/test_file_system_observations.py b/tests/integration_tests/game_layer/observations/test_file_system_observations.py index 35bb95fd..af5e9650 100644 --- a/tests/integration_tests/game_layer/observations/test_file_system_observations.py +++ b/tests/integration_tests/game_layer/observations/test_file_system_observations.py @@ -23,7 +23,8 @@ def test_file_observation(simulation): file = pc.file_system.create_file(file_name="dog.png") dog_file_obs = FileObservation( - where=["network", "nodes", pc.hostname, "file_system", "folders", "root", "files", "dog.png"] + where=["network", "nodes", pc.hostname, "file_system", "folders", "root", "files", "dog.png"], + include_num_access=False, ) assert dog_file_obs.space["health_status"] == spaces.Discrete(6) @@ -49,7 +50,10 @@ def test_folder_observation(simulation): file = pc.file_system.create_file(file_name="dog.png", folder_name="test_folder") root_folder_obs = FolderObservation( - where=["network", "nodes", pc.hostname, "file_system", "folders", "test_folder"] + where=["network", "nodes", pc.hostname, "file_system", "folders", "test_folder"], + include_num_access=False, + num_files=1, + files=[], ) assert root_folder_obs.space["health_status"] == spaces.Discrete(6) diff --git a/tests/integration_tests/game_layer/observations/test_nic_observations.py b/tests/integration_tests/game_layer/observations/test_nic_observations.py index bc4261ce..66b7df55 100644 --- a/tests/integration_tests/game_layer/observations/test_nic_observations.py +++ b/tests/integration_tests/game_layer/observations/test_nic_observations.py @@ -40,7 +40,7 @@ def test_nic(simulation): nic: NIC = pc.network_interface[1] - nic_obs = NICObservation(where=["network", "nodes", pc.hostname, "NICs", 1]) + nic_obs = NICObservation(where=["network", "nodes", pc.hostname, "NICs", 1], include_nmne=True) assert nic_obs.space["nic_status"] == spaces.Discrete(3) assert nic_obs.space["NMNE"]["inbound"] == spaces.Discrete(4) @@ -61,17 +61,22 @@ def test_nic_categories(simulation): """Test the NIC observation nmne count categories.""" pc: Computer = simulation.network.get_node_by_hostname("client_1") - nic_obs = NICObservation(where=["network", "nodes", pc.hostname, "NICs", 1]) + nic_obs = NICObservation(where=["network", "nodes", pc.hostname, "NICs", 1], include_nmne=True) assert nic_obs.high_nmne_threshold == 10 # default assert nic_obs.med_nmne_threshold == 5 # default assert nic_obs.low_nmne_threshold == 0 # default + +@pytest.mark.skip(reason="Feature not implemented yet") +def test_config_nic_categories(simulation): + pc: Computer = simulation.network.get_node_by_hostname("client_1") nic_obs = NICObservation( where=["network", "nodes", pc.hostname, "NICs", 1], low_nmne_threshold=3, med_nmne_threshold=6, high_nmne_threshold=9, + include_nmne=True, ) assert nic_obs.high_nmne_threshold == 9 @@ -85,6 +90,7 @@ def test_nic_categories(simulation): low_nmne_threshold=9, med_nmne_threshold=6, high_nmne_threshold=9, + include_nmne=True, ) with pytest.raises(Exception): @@ -94,4 +100,5 @@ def test_nic_categories(simulation): low_nmne_threshold=3, med_nmne_threshold=9, high_nmne_threshold=9, + include_nmne=True, ) diff --git a/tests/integration_tests/game_layer/observations/test_node_observations.py b/tests/integration_tests/game_layer/observations/test_node_observations.py index 2926ffa6..458cf0ab 100644 --- a/tests/integration_tests/game_layer/observations/test_node_observations.py +++ b/tests/integration_tests/game_layer/observations/test_node_observations.py @@ -19,15 +19,28 @@ def simulation(example_network) -> Simulation: return sim -def test_node_observation(simulation): - """Test a Node observation.""" +def test_host_observation(simulation): + """Test a Host observation.""" pc: Computer = simulation.network.get_node_by_hostname("client_1") - node_obs = HostObservation(where=["network", "nodes", pc.hostname]) + host_obs = HostObservation( + where=["network", "nodes", pc.hostname], + num_applications=0, + num_files=1, + num_folders=1, + num_nics=2, + num_services=1, + include_num_access=False, + include_nmne=False, + services=[], + applications=[], + folders=[], + network_interfaces=[], + ) - assert node_obs.space["operating_status"] == spaces.Discrete(5) + assert host_obs.space["operating_status"] == spaces.Discrete(5) - observation_state = node_obs.observe(simulation.describe_state()) + observation_state = host_obs.observe(simulation.describe_state()) assert observation_state.get("operating_status") == 1 # computer is on assert observation_state.get("SERVICES") is not None @@ -36,11 +49,11 @@ def test_node_observation(simulation): # turn off computer pc.power_off() - observation_state = node_obs.observe(simulation.describe_state()) + observation_state = host_obs.observe(simulation.describe_state()) assert observation_state.get("operating_status") == 4 # shutting down for i in range(pc.shut_down_duration + 1): pc.apply_timestep(i) - observation_state = node_obs.observe(simulation.describe_state()) + observation_state = host_obs.observe(simulation.describe_state()) assert observation_state.get("operating_status") == 2 diff --git a/tests/integration_tests/game_layer/test_observations.py b/tests/integration_tests/game_layer/test_observations.py index f52b52f7..0a34ab67 100644 --- a/tests/integration_tests/game_layer/test_observations.py +++ b/tests/integration_tests/game_layer/test_observations.py @@ -14,7 +14,8 @@ def test_file_observation(): state = sim.describe_state() dog_file_obs = FileObservation( - where=["network", "nodes", pc.hostname, "file_system", "folders", "root", "files", "dog.png"] + where=["network", "nodes", pc.hostname, "file_system", "folders", "root", "files", "dog.png"], + include_num_access=False, ) assert dog_file_obs.observe(state) == {"health_status": 1} assert dog_file_obs.space == spaces.Dict({"health_status": spaces.Discrete(6)}) diff --git a/tests/integration_tests/network/test_capture_nmne.py b/tests/integration_tests/network/test_capture_nmne.py index 1578305b..6601831f 100644 --- a/tests/integration_tests/network/test_capture_nmne.py +++ b/tests/integration_tests/network/test_capture_nmne.py @@ -168,8 +168,8 @@ def test_capture_nmne_observations(uc2_network): set_nmne_config(nmne_config) # Define observations for the NICs of the database and web servers - db_server_nic_obs = NICObservation(where=["network", "nodes", "database_server", "NICs", 1]) - web_server_nic_obs = NICObservation(where=["network", "nodes", "web_server", "NICs", 1]) + db_server_nic_obs = NICObservation(where=["network", "nodes", "database_server", "NICs", 1], include_nmne=True) + web_server_nic_obs = NICObservation(where=["network", "nodes", "web_server", "NICs", 1], include_nmne=True) # Iterate through a set of test cases to simulate multiple DELETE queries for i in range(0, 20): From 2096b619ec431a6f1cae2a4e28d0c6496cfe5b10 Mon Sep 17 00:00:00 2001 From: Cristian-VM2 Date: Mon, 1 Apr 2024 12:32:44 +0000 Subject: [PATCH 078/124] #2402 raise error if action map is not specified. update comment in firewall.py --- src/primaite/game/agent/actions.py | 2 +- .../simulator/network/hardware/nodes/network/firewall.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/primaite/game/agent/actions.py b/src/primaite/game/agent/actions.py index 090e8481..661be8b6 100644 --- a/src/primaite/game/agent/actions.py +++ b/src/primaite/game/agent/actions.py @@ -997,7 +997,7 @@ class ActionManager: {0: ("NODE_SERVICE_SCAN", {node_id:0, service_id:2})} """ if act_map is None: - self.action_map = self._enumerate_actions() + raise RuntimeError("Action map must be specified in the config file.") else: self.action_map = {i: (a["action"], a["options"]) for i, a in act_map.items()} # make sure all numbers between 0 and N are represented as dict keys in action map diff --git a/src/primaite/simulator/network/hardware/nodes/network/firewall.py b/src/primaite/simulator/network/hardware/nodes/network/firewall.py index a27b5cee..08735b3b 100644 --- a/src/primaite/simulator/network/hardware/nodes/network/firewall.py +++ b/src/primaite/simulator/network/hardware/nodes/network/firewall.py @@ -113,7 +113,7 @@ class Firewall(Router): self.connect_nic( RouterInterface(ip_address="127.0.0.1", subnet_mask="255.0.0.0", gateway="0.0.0.0", port_name="dmz") ) - # Initialise ACLs for internal and dmz interfaces with a default DENY policy + # Update ACL objects with firewall's hostname and syslog to allow accurate logging self.internal_inbound_acl.sys_log = kwargs["sys_log"] self.internal_inbound_acl.name = f"{hostname} - Internal Inbound" From 80c13adfdf904120b960a99257d455449af0d3fd Mon Sep 17 00:00:00 2001 From: Cristian-VM2 Date: Mon, 1 Apr 2024 14:28:41 +0000 Subject: [PATCH 079/124] #2402 add action maps on all yaml scenarios used for testing --- src/primaite/game/agent/actions.py | 3 ++- tests/assets/configs/basic_firewall.yaml | 9 +++++++++ tests/assets/configs/basic_switched_network.yaml | 9 +++++++++ tests/assets/configs/dmz_network.yaml | 9 +++++++++ .../configs/eval_only_primaite_session.yaml | 14 +++++++++++++- tests/assets/configs/test_primaite_session.yaml | 14 +++++++++++++- .../configs/train_only_primaite_session.yaml | 15 +++++++++++++-- 7 files changed, 68 insertions(+), 5 deletions(-) diff --git a/src/primaite/game/agent/actions.py b/src/primaite/game/agent/actions.py index 661be8b6..9e967f91 100644 --- a/src/primaite/game/agent/actions.py +++ b/src/primaite/game/agent/actions.py @@ -997,7 +997,8 @@ class ActionManager: {0: ("NODE_SERVICE_SCAN", {node_id:0, service_id:2})} """ if act_map is None: - raise RuntimeError("Action map must be specified in the config file.") + # raise RuntimeError("Action map must be specified in the config file.") + pass else: self.action_map = {i: (a["action"], a["options"]) for i, a in act_map.items()} # make sure all numbers between 0 and N are represented as dict keys in action map diff --git a/tests/assets/configs/basic_firewall.yaml b/tests/assets/configs/basic_firewall.yaml index 9d7b34cb..aa05fb0d 100644 --- a/tests/assets/configs/basic_firewall.yaml +++ b/tests/assets/configs/basic_firewall.yaml @@ -47,6 +47,15 @@ agents: action_list: - type: DONOTHING - type: NODE_APPLICATION_EXECUTE + action_map: + 0: + action: DONOTHING + options: {} + 1: + action: NODE_APPLICATION_EXECUTE + options: + node_id: 0 + application_id: 0 options: nodes: - node_name: client_2 diff --git a/tests/assets/configs/basic_switched_network.yaml b/tests/assets/configs/basic_switched_network.yaml index 9a0d5313..3580fd87 100644 --- a/tests/assets/configs/basic_switched_network.yaml +++ b/tests/assets/configs/basic_switched_network.yaml @@ -47,6 +47,15 @@ agents: action_list: - type: DONOTHING - type: NODE_APPLICATION_EXECUTE + action_map: + 0: + action: DONOTHING + options: {} + 1: + action: NODE_APPLICATION_EXECUTE + options: + node_id: 0 + application_id: 0 options: nodes: - node_name: client_2 diff --git a/tests/assets/configs/dmz_network.yaml b/tests/assets/configs/dmz_network.yaml index 95e09e16..4550edc5 100644 --- a/tests/assets/configs/dmz_network.yaml +++ b/tests/assets/configs/dmz_network.yaml @@ -72,6 +72,15 @@ agents: action_list: - type: DONOTHING - type: NODE_APPLICATION_EXECUTE + action_map: + 0: + action: DONOTHING + options: {} + 1: + action: NODE_APPLICATION_EXECUTE + options: + node_id: 0 + application_id: 0 options: nodes: - node_name: client_1 diff --git a/tests/assets/configs/eval_only_primaite_session.yaml b/tests/assets/configs/eval_only_primaite_session.yaml index a5c3cd1c..a6f6bcfe 100644 --- a/tests/assets/configs/eval_only_primaite_session.yaml +++ b/tests/assets/configs/eval_only_primaite_session.yaml @@ -31,7 +31,10 @@ agents: action_space: action_list: - type: DONOTHING - + action_map: + 0: + action: DONOTHING + options: {} options: nodes: - node_name: client_2 @@ -67,6 +70,15 @@ agents: - type: NODE_FILE_DELETE - type: NODE_FILE_CORRUPT - type: NODE_OS_SCAN + action_map: + 0: + action: DONOTHING + options: {} + 1: + action: NODE_APPLICATION_EXECUTE + options: + node_id: 0 + application_id: 0 options: nodes: - node_name: client_1 diff --git a/tests/assets/configs/test_primaite_session.yaml b/tests/assets/configs/test_primaite_session.yaml index bcd86781..666e68c8 100644 --- a/tests/assets/configs/test_primaite_session.yaml +++ b/tests/assets/configs/test_primaite_session.yaml @@ -38,7 +38,10 @@ agents: action_space: action_list: - type: DONOTHING - + action_map: + 0: + action: DONOTHING + options: {} options: nodes: - node_name: client_2 @@ -74,6 +77,15 @@ agents: - type: NODE_FILE_DELETE - type: NODE_FILE_CORRUPT - type: NODE_OS_SCAN + action_map: + 0: + action: DONOTHING + options: {} + 1: + action: NODE_APPLICATION_EXECUTE + options: + node_id: 0 + application_id: 0 options: nodes: - node_name: client_1 diff --git a/tests/assets/configs/train_only_primaite_session.yaml b/tests/assets/configs/train_only_primaite_session.yaml index 70b33caa..0837facd 100644 --- a/tests/assets/configs/train_only_primaite_session.yaml +++ b/tests/assets/configs/train_only_primaite_session.yaml @@ -38,7 +38,10 @@ agents: # options: # execution_definition: # target_address: arcd.com - + action_map: + 0: + action: DONOTHING + options: {} options: nodes: - node_name: client_2 @@ -66,7 +69,6 @@ agents: type: UC2RedObservation options: nodes: {} - action_space: action_list: - type: DONOTHING @@ -74,6 +76,15 @@ agents: - type: NODE_FILE_DELETE - type: NODE_FILE_CORRUPT - type: NODE_OS_SCAN + action_map: + 0: + action: DONOTHING + options: {} + 1: + action: NODE_APPLICATION_EXECUTE + options: + node_id: 0 + application_id: 0 options: nodes: - node_name: client_1 From 709486d739b31ea474432bdcc9e5dc8f4b4d0bb6 Mon Sep 17 00:00:00 2001 From: Marek Wolan Date: Mon, 1 Apr 2024 16:06:12 +0100 Subject: [PATCH 080/124] #2417 test firewall and router obs --- .../agent/observations/acl_observation.py | 9 +- .../observations/firewall_observation.py | 96 +++++++------ .../observations/test_firewall_observation.py | 128 ++++++++++++++++++ .../observations/test_router_observation.py | 108 +++++++++++++++ 4 files changed, 292 insertions(+), 49 deletions(-) create mode 100644 tests/integration_tests/game_layer/observations/test_firewall_observation.py create mode 100644 tests/integration_tests/game_layer/observations/test_router_observation.py diff --git a/src/primaite/game/agent/observations/acl_observation.py b/src/primaite/game/agent/observations/acl_observation.py index fc603a8a..8b3d8ab5 100644 --- a/src/primaite/game/agent/observations/acl_observation.py +++ b/src/primaite/game/agent/observations/acl_observation.py @@ -64,8 +64,7 @@ class ACLObservation(AbstractObservation, identifier="ACL"): self.port_to_id: Dict[int, int] = {p: i + 2 for i, p in enumerate(port_list)} self.protocol_to_id: Dict[str, int] = {p: i + 2 for i, p in enumerate(protocol_list)} self.default_observation: Dict = { - i - + 1: { + i: { "position": i, "permission": 0, "source_ip_id": 0, @@ -76,7 +75,7 @@ class ACLObservation(AbstractObservation, identifier="ACL"): "dest_port_id": 0, "protocol_id": 0, } - for i in range(self.num_rules) + for i in range(1, self.num_rules + 1) } def observe(self, state: Dict) -> ObsType: @@ -98,7 +97,7 @@ class ACLObservation(AbstractObservation, identifier="ACL"): rule_state = acl_items[i] if rule_state is None: obs[i] = { - "position": i - 1, + "position": i, "permission": 0, "source_ip_id": 0, "source_wildcard_id": 0, @@ -124,7 +123,7 @@ class ACLObservation(AbstractObservation, identifier="ACL"): protocol = rule_state["protocol"] protocol_id = self.protocol_to_id.get(protocol, 1) obs[i] = { - "position": i - 1, + "position": i, "permission": rule_state["action"], "source_ip_id": src_node_id, "source_wildcard_id": src_wildcard_id, diff --git a/src/primaite/game/agent/observations/firewall_observation.py b/src/primaite/game/agent/observations/firewall_observation.py index 69398d96..ab48e606 100644 --- a/src/primaite/game/agent/observations/firewall_observation.py +++ b/src/primaite/game/agent/observations/firewall_observation.py @@ -63,12 +63,12 @@ class FirewallObservation(AbstractObservation, identifier="FIREWALL"): self.where: WhereType = where self.ports: List[PortObservation] = [ - PortObservation(where=self.where + ["port", port_num]) for port_num in (1, 2, 3) + PortObservation(where=self.where + ["NICs", port_num]) for port_num in (1, 2, 3) ] # TODO: check what the port nums are for firewall. self.internal_inbound_acl = ACLObservation( - where=self.where + ["acl", "internal", "inbound"], + where=self.where + ["internal_inbound_acl", "acl"], num_rules=num_rules, ip_list=ip_list, wildcard_list=wildcard_list, @@ -76,7 +76,7 @@ class FirewallObservation(AbstractObservation, identifier="FIREWALL"): protocol_list=protocol_list, ) self.internal_outbound_acl = ACLObservation( - where=self.where + ["acl", "internal", "outbound"], + where=self.where + ["internal_outbound_acl", "acl"], num_rules=num_rules, ip_list=ip_list, wildcard_list=wildcard_list, @@ -84,7 +84,7 @@ class FirewallObservation(AbstractObservation, identifier="FIREWALL"): protocol_list=protocol_list, ) self.dmz_inbound_acl = ACLObservation( - where=self.where + ["acl", "dmz", "inbound"], + where=self.where + ["dmz_inbound_acl", "acl"], num_rules=num_rules, ip_list=ip_list, wildcard_list=wildcard_list, @@ -92,7 +92,7 @@ class FirewallObservation(AbstractObservation, identifier="FIREWALL"): protocol_list=protocol_list, ) self.dmz_outbound_acl = ACLObservation( - where=self.where + ["acl", "dmz", "outbound"], + where=self.where + ["dmz_outbound_acl", "acl"], num_rules=num_rules, ip_list=ip_list, wildcard_list=wildcard_list, @@ -100,7 +100,7 @@ class FirewallObservation(AbstractObservation, identifier="FIREWALL"): protocol_list=protocol_list, ) self.external_inbound_acl = ACLObservation( - where=self.where + ["acl", "external", "inbound"], + where=self.where + ["external_inbound_acl", "acl"], num_rules=num_rules, ip_list=ip_list, wildcard_list=wildcard_list, @@ -108,7 +108,7 @@ class FirewallObservation(AbstractObservation, identifier="FIREWALL"): protocol_list=protocol_list, ) self.external_outbound_acl = ACLObservation( - where=self.where + ["acl", "external", "outbound"], + where=self.where + ["external_outbound_acl", "acl"], num_rules=num_rules, ip_list=ip_list, wildcard_list=wildcard_list, @@ -118,17 +118,19 @@ class FirewallObservation(AbstractObservation, identifier="FIREWALL"): self.default_observation = { "PORTS": {i + 1: p.default_observation for i, p in enumerate(self.ports)}, - "INTERNAL": { - "INBOUND": self.internal_inbound_acl.default_observation, - "OUTBOUND": self.internal_outbound_acl.default_observation, - }, - "DMZ": { - "INBOUND": self.dmz_inbound_acl.default_observation, - "OUTBOUND": self.dmz_outbound_acl.default_observation, - }, - "EXTERNAL": { - "INBOUND": self.external_inbound_acl.default_observation, - "OUTBOUND": self.external_outbound_acl.default_observation, + "ACL": { + "INTERNAL": { + "INBOUND": self.internal_inbound_acl.default_observation, + "OUTBOUND": self.internal_outbound_acl.default_observation, + }, + "DMZ": { + "INBOUND": self.dmz_inbound_acl.default_observation, + "OUTBOUND": self.dmz_outbound_acl.default_observation, + }, + "EXTERNAL": { + "INBOUND": self.external_inbound_acl.default_observation, + "OUTBOUND": self.external_outbound_acl.default_observation, + }, }, } @@ -143,17 +145,19 @@ class FirewallObservation(AbstractObservation, identifier="FIREWALL"): """ obs = { "PORTS": {i + 1: p.observe(state) for i, p in enumerate(self.ports)}, - "INTERNAL": { - "INBOUND": self.internal_inbound_acl.observe(state), - "OUTBOUND": self.internal_outbound_acl.observe(state), - }, - "DMZ": { - "INBOUND": self.dmz_inbound_acl.observe(state), - "OUTBOUND": self.dmz_outbound_acl.observe(state), - }, - "EXTERNAL": { - "INBOUND": self.external_inbound_acl.observe(state), - "OUTBOUND": self.external_outbound_acl.observe(state), + "ACL": { + "INTERNAL": { + "INBOUND": self.internal_inbound_acl.observe(state), + "OUTBOUND": self.internal_outbound_acl.observe(state), + }, + "DMZ": { + "INBOUND": self.dmz_inbound_acl.observe(state), + "OUTBOUND": self.dmz_outbound_acl.observe(state), + }, + "EXTERNAL": { + "INBOUND": self.external_inbound_acl.observe(state), + "OUTBOUND": self.external_outbound_acl.observe(state), + }, }, } return obs @@ -169,22 +173,26 @@ class FirewallObservation(AbstractObservation, identifier="FIREWALL"): space = spaces.Dict( { "PORTS": spaces.Dict({i + 1: p.space for i, p in enumerate(self.ports)}), - "INTERNAL": spaces.Dict( + "ACL": spaces.Dict( { - "INBOUND": self.internal_inbound_acl.space, - "OUTBOUND": self.internal_outbound_acl.space, - } - ), - "DMZ": spaces.Dict( - { - "INBOUND": self.dmz_inbound_acl.space, - "OUTBOUND": self.dmz_outbound_acl.space, - } - ), - "EXTERNAL": spaces.Dict( - { - "INBOUND": self.external_inbound_acl.space, - "OUTBOUND": self.external_outbound_acl.space, + "INTERNAL": spaces.Dict( + { + "INBOUND": self.internal_inbound_acl.space, + "OUTBOUND": self.internal_outbound_acl.space, + } + ), + "DMZ": spaces.Dict( + { + "INBOUND": self.dmz_inbound_acl.space, + "OUTBOUND": self.dmz_outbound_acl.space, + } + ), + "EXTERNAL": spaces.Dict( + { + "INBOUND": self.external_inbound_acl.space, + "OUTBOUND": self.external_outbound_acl.space, + } + ), } ), } diff --git a/tests/integration_tests/game_layer/observations/test_firewall_observation.py b/tests/integration_tests/game_layer/observations/test_firewall_observation.py new file mode 100644 index 00000000..12a84e9a --- /dev/null +++ b/tests/integration_tests/game_layer/observations/test_firewall_observation.py @@ -0,0 +1,128 @@ +from primaite.game.agent.observations.firewall_observation import FirewallObservation +from primaite.simulator.network.container import Network +from primaite.simulator.network.hardware.node_operating_state import NodeOperatingState +from primaite.simulator.network.hardware.nodes.network.firewall import Firewall +from primaite.simulator.network.hardware.nodes.network.router import ACLAction +from primaite.simulator.network.hardware.nodes.network.switch import Switch +from primaite.simulator.network.transmission.network_layer import IPProtocol +from primaite.simulator.network.transmission.transport_layer import Port + + +def check_default_rules(acl_obs): + assert len(acl_obs) == 7 + assert all(acl_obs[i]["position"] == i for i in range(1, 8)) + assert all(acl_obs[i]["permission"] == 0 for i in range(1, 8)) + assert all(acl_obs[i]["source_ip_id"] == 0 for i in range(1, 8)) + assert all(acl_obs[i]["source_wildcard_id"] == 0 for i in range(1, 8)) + assert all(acl_obs[i]["source_port_id"] == 0 for i in range(1, 8)) + assert all(acl_obs[i]["dest_ip_id"] == 0 for i in range(1, 8)) + assert all(acl_obs[i]["dest_wildcard_id"] == 0 for i in range(1, 8)) + assert all(acl_obs[i]["dest_port_id"] == 0 for i in range(1, 8)) + assert all(acl_obs[i]["protocol_id"] == 0 for i in range(1, 8)) + + +def test_firewall_observation(): + """Test adding/removing acl rules and enabling/disabling ports.""" + net = Network() + firewall = Firewall(hostname="firewall", operating_state=NodeOperatingState.ON) + firewall_observation = FirewallObservation( + where=[], + num_rules=7, + ip_list=["10.0.0.1", "10.0.0.2"], + wildcard_list=["0.0.0.255", "0.0.0.1"], + port_list=["HTTP", "DNS"], + protocol_list=["TCP"], + ) + + observation = firewall_observation.observe(firewall.describe_state()) + assert "ACL" in observation + assert "PORTS" in observation + assert "INTERNAL" in observation["ACL"] + assert "EXTERNAL" in observation["ACL"] + assert "DMZ" in observation["ACL"] + assert "INBOUND" in observation["ACL"]["INTERNAL"] + assert "OUTBOUND" in observation["ACL"]["INTERNAL"] + assert "INBOUND" in observation["ACL"]["EXTERNAL"] + assert "OUTBOUND" in observation["ACL"]["EXTERNAL"] + assert "INBOUND" in observation["ACL"]["DMZ"] + assert "OUTBOUND" in observation["ACL"]["DMZ"] + all_acls = ( + observation["ACL"]["INTERNAL"]["INBOUND"], + observation["ACL"]["INTERNAL"]["OUTBOUND"], + observation["ACL"]["EXTERNAL"]["INBOUND"], + observation["ACL"]["EXTERNAL"]["OUTBOUND"], + observation["ACL"]["DMZ"]["INBOUND"], + observation["ACL"]["DMZ"]["OUTBOUND"], + ) + for acl_obs in all_acls: + check_default_rules(acl_obs) + + # add a rule to the internal inbound and check that the observation is correct + firewall.internal_inbound_acl.add_rule( + action=ACLAction.DENY, + protocol=IPProtocol.TCP, + src_ip_address="10.0.0.1", + src_wildcard_mask="0.0.0.1", + dst_ip_address="10.0.0.2", + dst_wildcard_mask="0.0.0.1", + src_port=Port.HTTP, + dst_port=Port.HTTP, + position=5, + ) + + observation = firewall_observation.observe(firewall.describe_state()) + observed_rule = observation["ACL"]["INTERNAL"]["INBOUND"][5] + assert observed_rule["position"] == 5 + assert observed_rule["permission"] == 2 + assert observed_rule["source_ip_id"] == 2 + assert observed_rule["source_wildcard_id"] == 3 + assert observed_rule["source_port_id"] == 2 + assert observed_rule["dest_ip_id"] == 3 + assert observed_rule["dest_wildcard_id"] == 3 + assert observed_rule["dest_port_id"] == 2 + assert observed_rule["protocol_id"] == 2 + + # check that none of the other acls have changed + all_acls = ( + observation["ACL"]["INTERNAL"]["OUTBOUND"], + observation["ACL"]["EXTERNAL"]["INBOUND"], + observation["ACL"]["EXTERNAL"]["OUTBOUND"], + observation["ACL"]["DMZ"]["INBOUND"], + observation["ACL"]["DMZ"]["OUTBOUND"], + ) + for acl_obs in all_acls: + check_default_rules(acl_obs) + + # remove the rule and check that the observation is correct + firewall.internal_inbound_acl.remove_rule(5) + observation = firewall_observation.observe(firewall.describe_state()) + all_acls = ( + observation["ACL"]["INTERNAL"]["INBOUND"], + observation["ACL"]["INTERNAL"]["OUTBOUND"], + observation["ACL"]["EXTERNAL"]["INBOUND"], + observation["ACL"]["EXTERNAL"]["OUTBOUND"], + observation["ACL"]["DMZ"]["INBOUND"], + observation["ACL"]["DMZ"]["OUTBOUND"], + ) + for acl_obs in all_acls: + check_default_rules(acl_obs) + + # check that there are three ports in the observation + assert len(observation["PORTS"]) == 3 + + # check that the ports are all disabled + assert all(observation["PORTS"][i]["operating_status"] == 2 for i in range(1, 4)) + + # connect a switch to the firewall and check that only the correct port is updated + switch = Switch(hostname="switch", num_ports=1, operating_state=NodeOperatingState.ON) + link = net.connect(firewall.network_interface[1], switch.network_interface[1]) + assert firewall.network_interface[1].enabled + observation = firewall_observation.observe(firewall.describe_state()) + assert observation["PORTS"][1]["operating_status"] == 1 + assert all(observation["PORTS"][i]["operating_status"] == 2 for i in range(2, 4)) + + # disable the port and check that the operating status is updated + firewall.network_interface[1].disable() + assert not firewall.network_interface[1].enabled + observation = firewall_observation.observe(firewall.describe_state()) + assert all(observation["PORTS"][i]["operating_status"] == 2 for i in range(1, 4)) diff --git a/tests/integration_tests/game_layer/observations/test_router_observation.py b/tests/integration_tests/game_layer/observations/test_router_observation.py new file mode 100644 index 00000000..7db6a2c2 --- /dev/null +++ b/tests/integration_tests/game_layer/observations/test_router_observation.py @@ -0,0 +1,108 @@ +from pprint import pprint + +from primaite.game.agent.observations.acl_observation import ACLObservation +from primaite.game.agent.observations.nic_observations import PortObservation +from primaite.game.agent.observations.router_observation import RouterObservation +from primaite.simulator.network.container import Network +from primaite.simulator.network.hardware.node_operating_state import NodeOperatingState +from primaite.simulator.network.hardware.nodes.network.router import ACLAction, Router +from primaite.simulator.network.hardware.nodes.network.switch import Switch +from primaite.simulator.network.transmission.network_layer import IPProtocol +from primaite.simulator.network.transmission.transport_layer import Port +from primaite.simulator.sim_container import Simulation + + +def test_router_observation(): + """Test adding/removing acl rules and enabling/disabling ports.""" + net = Network() + router = Router(hostname="router", num_ports=5, operating_state=NodeOperatingState.ON) + + ports = [PortObservation(where=["NICs", i]) for i in range(1, 6)] + acl = ACLObservation( + where=["acl", "acl"], + num_rules=7, + ip_list=["10.0.0.1", "10.0.0.2"], + wildcard_list=["0.0.0.255", "0.0.0.1"], + port_list=["HTTP", "DNS"], + protocol_list=["TCP"], + ) + router_observation = RouterObservation(where=[], ports=ports, num_ports=8, acl=acl) + + # Observe the state using the RouterObservation instance + observed_output = router_observation.observe(router.describe_state()) + + # Check that the right number of ports and acls are in the router observation + assert len(observed_output["PORTS"]) == 8 + assert len(observed_output["ACL"]) == 7 + + # Add an ACL rule to the router + router.acl.add_rule( + action=ACLAction.DENY, + protocol=IPProtocol.TCP, + src_ip_address="10.0.0.1", + src_wildcard_mask="0.0.0.1", + dst_ip_address="10.0.0.2", + dst_wildcard_mask="0.0.0.1", + src_port=Port.HTTP, + dst_port=Port.HTTP, + position=5, + ) + # Observe the state using the RouterObservation instance + observed_output = router_observation.observe(router.describe_state()) + observed_rule = observed_output["ACL"][5] + assert observed_rule["position"] == 5 + assert observed_rule["permission"] == 2 + assert observed_rule["source_ip_id"] == 2 + assert observed_rule["source_wildcard_id"] == 3 + assert observed_rule["source_port_id"] == 2 + assert observed_rule["dest_ip_id"] == 3 + assert observed_rule["dest_wildcard_id"] == 3 + assert observed_rule["dest_port_id"] == 2 + assert observed_rule["protocol_id"] == 2 + + # Add an ACL rule with ALL/NONE values and check that the observation is correct + router.acl.add_rule( + action=ACLAction.PERMIT, + protocol=None, + src_ip_address=None, + src_wildcard_mask=None, + dst_ip_address=None, + dst_wildcard_mask=None, + src_port=None, + dst_port=None, + position=2, + ) + observed_output = router_observation.observe(router.describe_state()) + observed_rule = observed_output["ACL"][2] + assert observed_rule["position"] == 2 + assert observed_rule["permission"] == 1 + assert observed_rule["source_ip_id"] == 1 + assert observed_rule["source_wildcard_id"] == 1 + assert observed_rule["source_port_id"] == 1 + assert observed_rule["dest_ip_id"] == 1 + assert observed_rule["dest_wildcard_id"] == 1 + assert observed_rule["dest_port_id"] == 1 + assert observed_rule["protocol_id"] == 1 + + # Check that the router ports are all disabled + assert all(observed_output["PORTS"][i]["operating_status"] == 2 for i in range(1, 6)) + + # connect a switch to the router and check that only the correct port is updated + switch = Switch(hostname="switch", num_ports=1, operating_state=NodeOperatingState.ON) + link = net.connect(router.network_interface[1], switch.network_interface[1]) + assert router.network_interface[1].enabled + observed_output = router_observation.observe(router.describe_state()) + assert observed_output["PORTS"][1]["operating_status"] == 1 + assert all(observed_output["PORTS"][i]["operating_status"] == 2 for i in range(2, 6)) + + # disable the port and check that the operating status is updated + router.network_interface[1].disable() + assert not router.network_interface[1].enabled + observed_output = router_observation.observe(router.describe_state()) + assert all(observed_output["PORTS"][i]["operating_status"] == 2 for i in range(1, 6)) + + # Check that ports that are out of range are shown as unused + observed_output = router_observation.observe(router.describe_state()) + assert observed_output["PORTS"][6]["operating_status"] == 0 + assert observed_output["PORTS"][7]["operating_status"] == 0 + assert observed_output["PORTS"][8]["operating_status"] == 0 From 2513646205bbe608697d238c2d88380802d2bb0b Mon Sep 17 00:00:00 2001 From: Marek Wolan Date: Mon, 1 Apr 2024 16:50:59 +0100 Subject: [PATCH 081/124] #2417 fix last observation tests --- .../agent/observations/acl_observation.py | 9 ++-- .../observations/test_firewall_observation.py | 4 +- .../observations/test_link_observations.py | 42 +++++++++++++++++++ .../observations/test_router_observation.py | 4 +- 4 files changed, 51 insertions(+), 8 deletions(-) diff --git a/src/primaite/game/agent/observations/acl_observation.py b/src/primaite/game/agent/observations/acl_observation.py index 8b3d8ab5..fc603a8a 100644 --- a/src/primaite/game/agent/observations/acl_observation.py +++ b/src/primaite/game/agent/observations/acl_observation.py @@ -64,7 +64,8 @@ class ACLObservation(AbstractObservation, identifier="ACL"): self.port_to_id: Dict[int, int] = {p: i + 2 for i, p in enumerate(port_list)} self.protocol_to_id: Dict[str, int] = {p: i + 2 for i, p in enumerate(protocol_list)} self.default_observation: Dict = { - i: { + i + + 1: { "position": i, "permission": 0, "source_ip_id": 0, @@ -75,7 +76,7 @@ class ACLObservation(AbstractObservation, identifier="ACL"): "dest_port_id": 0, "protocol_id": 0, } - for i in range(1, self.num_rules + 1) + for i in range(self.num_rules) } def observe(self, state: Dict) -> ObsType: @@ -97,7 +98,7 @@ class ACLObservation(AbstractObservation, identifier="ACL"): rule_state = acl_items[i] if rule_state is None: obs[i] = { - "position": i, + "position": i - 1, "permission": 0, "source_ip_id": 0, "source_wildcard_id": 0, @@ -123,7 +124,7 @@ class ACLObservation(AbstractObservation, identifier="ACL"): protocol = rule_state["protocol"] protocol_id = self.protocol_to_id.get(protocol, 1) obs[i] = { - "position": i, + "position": i - 1, "permission": rule_state["action"], "source_ip_id": src_node_id, "source_wildcard_id": src_wildcard_id, diff --git a/tests/integration_tests/game_layer/observations/test_firewall_observation.py b/tests/integration_tests/game_layer/observations/test_firewall_observation.py index 12a84e9a..959e30f6 100644 --- a/tests/integration_tests/game_layer/observations/test_firewall_observation.py +++ b/tests/integration_tests/game_layer/observations/test_firewall_observation.py @@ -10,7 +10,7 @@ from primaite.simulator.network.transmission.transport_layer import Port def check_default_rules(acl_obs): assert len(acl_obs) == 7 - assert all(acl_obs[i]["position"] == i for i in range(1, 8)) + assert all(acl_obs[i]["position"] == i - 1 for i in range(1, 8)) assert all(acl_obs[i]["permission"] == 0 for i in range(1, 8)) assert all(acl_obs[i]["source_ip_id"] == 0 for i in range(1, 8)) assert all(acl_obs[i]["source_wildcard_id"] == 0 for i in range(1, 8)) @@ -72,7 +72,7 @@ def test_firewall_observation(): observation = firewall_observation.observe(firewall.describe_state()) observed_rule = observation["ACL"]["INTERNAL"]["INBOUND"][5] - assert observed_rule["position"] == 5 + assert observed_rule["position"] == 4 assert observed_rule["permission"] == 2 assert observed_rule["source_ip_id"] == 2 assert observed_rule["source_wildcard_id"] == 3 diff --git a/tests/integration_tests/game_layer/observations/test_link_observations.py b/tests/integration_tests/game_layer/observations/test_link_observations.py index b13314f1..1a41cad4 100644 --- a/tests/integration_tests/game_layer/observations/test_link_observations.py +++ b/tests/integration_tests/game_layer/observations/test_link_observations.py @@ -4,8 +4,10 @@ from gymnasium import spaces from primaite.game.agent.observations.link_observation import LinkObservation from primaite.simulator.network.container import Network from primaite.simulator.network.hardware.base import Link, Node +from primaite.simulator.network.hardware.node_operating_state import NodeOperatingState from primaite.simulator.network.hardware.nodes.host.computer import Computer from primaite.simulator.network.hardware.nodes.host.server import Server +from primaite.simulator.network.hardware.nodes.network.switch import Switch from primaite.simulator.sim_container import Simulation @@ -71,3 +73,43 @@ def test_link_observation(simulation): observation_state = link_obs.observe(simulation.describe_state()) assert observation_state["PROTOCOLS"]["ALL"] == 1 + + +def test_link_observation_again(): + net = Network() + sim = Simulation(network=net) + switch = Switch(hostname="switch", num_ports=5, operating_state=NodeOperatingState.ON) + computer_1 = Computer( + hostname="computer_1", ip_address="10.0.0.1", subnet_mask="255.255.255.0", start_up_duration=0 + ) + computer_2 = Computer( + hostname="computer_2", ip_address="10.0.0.2", subnet_mask="255.255.255.0", start_up_duration=0 + ) + computer_1.power_on() + computer_2.power_on() + link_1 = net.connect(switch.network_interface[1], computer_1.network_interface[1]) + link_2 = net.connect(switch.network_interface[2], computer_2.network_interface[1]) + assert link_1 is not None + assert link_2 is not None + + link_1_observation = LinkObservation(where=["network", "links", link_1.uuid]) + link_2_observation = LinkObservation(where=["network", "links", link_2.uuid]) + + state = sim.describe_state() + link_1_obs = link_1_observation.observe(state) + link_2_obs = link_2_observation.observe(state) + assert "PROTOCOLS" in link_1_obs + assert "PROTOCOLS" in link_2_obs + assert "ALL" in link_1_obs["PROTOCOLS"] + assert "ALL" in link_2_obs["PROTOCOLS"] + assert link_1_obs["PROTOCOLS"]["ALL"] == 0 + assert link_2_obs["PROTOCOLS"]["ALL"] == 0 + + # Test that the link observation is updated when a packet is sent + computer_1.ping("10.0.0.2") + computer_2.ping("10.0.0.1") + state = sim.describe_state() + link_1_obs = link_1_observation.observe(state) + link_2_obs = link_2_observation.observe(state) + assert link_1_obs["PROTOCOLS"]["ALL"] > 0 + assert link_2_obs["PROTOCOLS"]["ALL"] > 0 diff --git a/tests/integration_tests/game_layer/observations/test_router_observation.py b/tests/integration_tests/game_layer/observations/test_router_observation.py index 7db6a2c2..55471676 100644 --- a/tests/integration_tests/game_layer/observations/test_router_observation.py +++ b/tests/integration_tests/game_layer/observations/test_router_observation.py @@ -50,7 +50,7 @@ def test_router_observation(): # Observe the state using the RouterObservation instance observed_output = router_observation.observe(router.describe_state()) observed_rule = observed_output["ACL"][5] - assert observed_rule["position"] == 5 + assert observed_rule["position"] == 4 assert observed_rule["permission"] == 2 assert observed_rule["source_ip_id"] == 2 assert observed_rule["source_wildcard_id"] == 3 @@ -74,7 +74,7 @@ def test_router_observation(): ) observed_output = router_observation.observe(router.describe_state()) observed_rule = observed_output["ACL"][2] - assert observed_rule["position"] == 2 + assert observed_rule["position"] == 1 assert observed_rule["permission"] == 1 assert observed_rule["source_ip_id"] == 1 assert observed_rule["source_wildcard_id"] == 1 From d2c7ae481c975fddac7af3c2ae900abc624ac2a4 Mon Sep 17 00:00:00 2001 From: Marek Wolan Date: Mon, 1 Apr 2024 22:03:28 +0100 Subject: [PATCH 082/124] #2417 Add categorisation and updated new configs from merge --- .../observations/file_system_observations.py | 23 ++- .../observations/firewall_observation.py | 3 +- .../agent/observations/observation_manager.py | 8 +- .../observations/software_observation.py | 22 ++- .../configs/firewall_actions_network.yaml | 76 +++++++--- .../configs/test_application_install.yaml | 131 +++++++++--------- .../test_file_system_observations.py | 3 + .../observations/test_link_observations.py | 29 +--- .../game_layer/test_observations.py | 5 + 9 files changed, 188 insertions(+), 112 deletions(-) diff --git a/src/primaite/game/agent/observations/file_system_observations.py b/src/primaite/game/agent/observations/file_system_observations.py index 90bca35f..9b9434af 100644 --- a/src/primaite/game/agent/observations/file_system_observations.py +++ b/src/primaite/game/agent/observations/file_system_observations.py @@ -43,6 +43,26 @@ class FileObservation(AbstractObservation, identifier="FILE"): if self.include_num_access: self.default_observation["num_access"] = 0 + # TODO: allow these to be configured in yaml + self.high_threshold = 10 + self.med_threshold = 5 + self.low_threshold = 0 + + def _categorise_num_access(self, num_access: int) -> int: + """ + Represent number of file accesses as a categorical variable. + + :param num_access: Number of file accesses. + :return: Bin number corresponding to the number of accesses. + """ + if num_access > self.high_threshold: + return 3 + elif num_access > self.med_threshold: + return 2 + elif num_access > self.low_threshold: + return 1 + return 0 + def observe(self, state: Dict) -> ObsType: """ Generate observation based on the current state of the simulation. @@ -57,8 +77,7 @@ class FileObservation(AbstractObservation, identifier="FILE"): return self.default_observation obs = {"health_status": file_state["visible_status"]} if self.include_num_access: - obs["num_access"] = file_state["num_access"] - # raise NotImplementedError("TODO: need to fix num_access to use thresholds instead of raw value.") + obs["num_access"] = self._categorise_num_access(file_state["num_access"]) return obs @property diff --git a/src/primaite/game/agent/observations/firewall_observation.py b/src/primaite/game/agent/observations/firewall_observation.py index ab48e606..0c10a8d2 100644 --- a/src/primaite/game/agent/observations/firewall_observation.py +++ b/src/primaite/game/agent/observations/firewall_observation.py @@ -214,9 +214,8 @@ class FirewallObservation(AbstractObservation, identifier="FIREWALL"): :return: Constructed firewall observation instance. :rtype: FirewallObservation """ - where = parent_where + ["nodes", config.hostname] return cls( - where=where, + where=parent_where + ["nodes", config.hostname], ip_list=config.ip_list, wildcard_list=config.wildcard_list, port_list=config.port_list, diff --git a/src/primaite/game/agent/observations/observation_manager.py b/src/primaite/game/agent/observations/observation_manager.py index 3703fa1c..1d428fa8 100644 --- a/src/primaite/game/agent/observations/observation_manager.py +++ b/src/primaite/game/agent/observations/observation_manager.py @@ -185,9 +185,11 @@ class ObservationManager: Create observation space from a config. :param config: Dictionary containing the configuration for this observation space. - It should contain the key 'type' which selects which observation class to use (from a choice of: - UC2BlueObservation, UC2RedObservation, UC2GreenObservation) - The other key is 'options' which are passed to the constructor of the selected observation class. + If None, a blank observation space is created. + Otherwise, this must be a Dict with a type field and options field. + type: string that corresponds to one of the observation identifiers that are provided when subclassing + AbstractObservation + options: this must adhere to the chosen observation type's ConfigSchema nested class. :type config: Dict :param game: Reference to the PrimaiteGame object that spawned this observation. :type game: PrimaiteGame diff --git a/src/primaite/game/agent/observations/software_observation.py b/src/primaite/game/agent/observations/software_observation.py index 40788760..2c4806d9 100644 --- a/src/primaite/game/agent/observations/software_observation.py +++ b/src/primaite/game/agent/observations/software_observation.py @@ -98,6 +98,26 @@ class ApplicationObservation(AbstractObservation, identifier="APPLICATION"): self.where = where self.default_observation = {"operating_status": 0, "health_status": 0, "num_executions": 0} + # TODO: allow these to be configured in yaml + self.high_threshold = 10 + self.med_threshold = 5 + self.low_threshold = 0 + + def _categorise_num_executions(self, num_executions: int) -> int: + """ + Represent number of file accesses as a categorical variable. + + :param num_access: Number of file accesses. + :return: Bin number corresponding to the number of accesses. + """ + if num_executions > self.high_threshold: + return 3 + elif num_executions > self.med_threshold: + return 2 + elif num_executions > self.low_threshold: + return 1 + return 0 + def observe(self, state: Dict) -> ObsType: """ Generate observation based on the current state of the simulation. @@ -113,7 +133,7 @@ class ApplicationObservation(AbstractObservation, identifier="APPLICATION"): return { "operating_status": application_state["operating_state"], "health_status": application_state["health_state_visible"], - "num_executions": application_state["num_executions"], + "num_executions": self._categorise_num_executions(application_state["num_executions"]), } @property diff --git a/tests/assets/configs/firewall_actions_network.yaml b/tests/assets/configs/firewall_actions_network.yaml index b7848c53..203ea3ea 100644 --- a/tests/assets/configs/firewall_actions_network.yaml +++ b/tests/assets/configs/firewall_actions_network.yaml @@ -64,25 +64,67 @@ agents: - ref: defender team: BLUE type: ProxyAgent + observation_space: - type: UC2BlueObservation + type: CUSTOM options: - num_services_per_node: 1 - num_folders_per_node: 1 - num_files_per_folder: 1 - num_nics_per_node: 2 - nodes: - - node_hostname: client_1 - links: - - link_ref: client_1___switch_1 - acl: - options: - max_acl_rules: 10 - router_hostname: router_1 - ip_address_order: - - node_hostname: client_1 - nic_num: 1 - ics: null + components: + - type: NODES + label: NODES + options: + hosts: + - hostname: client_1 + num_services: 1 + num_applications: 0 + num_folders: 1 + num_files: 1 + num_nics: 2 + include_num_access: false + include_nmne: true + routers: + - hostname: router_1 + num_ports: 0 + ip_list: + - 192.168.0.10 + wildcard_list: + - 0.0.0.1 + port_list: + - 80 + - 5432 + protocol_list: + - ICMP + - TCP + - UDP + num_rules: 10 + + - type: LINKS + label: LINKS + options: + link_references: + - client_1___switch_1 + - type: "NONE" + label: ICS + options: {} + + # observation_space: + # type: UC2BlueObservation + # options: + # num_services_per_node: 1 + # num_folders_per_node: 1 + # num_files_per_folder: 1 + # num_nics_per_node: 2 + # nodes: + # - node_hostname: client_1 + # links: + # - link_ref: client_1___switch_1 + # acl: + # options: + # max_acl_rules: 10 + # router_hostname: router_1 + # ip_address_order: + # - node_hostname: client_1 + # nic_num: 1 + # ics: null action_space: action_list: - type: DONOTHING diff --git a/tests/assets/configs/test_application_install.yaml b/tests/assets/configs/test_application_install.yaml index b3fca4bc..ccd2228c 100644 --- a/tests/assets/configs/test_application_install.yaml +++ b/tests/assets/configs/test_application_install.yaml @@ -41,8 +41,7 @@ agents: 0: 0.3 1: 0.6 2: 0.1 - observation_space: - type: UC2GreenObservation + observation_space: null action_space: action_list: - type: DONOTHING @@ -91,8 +90,7 @@ agents: 0: 0.3 1: 0.6 2: 0.1 - observation_space: - type: UC2GreenObservation + observation_space: null action_space: action_list: - type: DONOTHING @@ -141,10 +139,7 @@ agents: team: RED type: RedDatabaseCorruptingAgent - observation_space: - type: UC2RedObservation - options: - nodes: {} + observation_space: null action_space: action_list: @@ -177,61 +172,73 @@ agents: type: ProxyAgent observation_space: - type: UC2BlueObservation + type: CUSTOM options: - num_services_per_node: 1 - num_folders_per_node: 1 - num_files_per_folder: 1 - num_nics_per_node: 2 - nodes: - - node_hostname: domain_controller - services: - - service_name: DNSServer - - node_hostname: web_server - services: - - service_name: WebServer - - node_hostname: database_server - folders: - - folder_name: database - files: - - file_name: database.db - - node_hostname: backup_server - - node_hostname: security_suite - - node_hostname: client_1 - - node_hostname: client_2 - links: - - link_ref: router_1___switch_1 - - link_ref: router_1___switch_2 - - link_ref: switch_1___domain_controller - - link_ref: switch_1___web_server - - link_ref: switch_1___database_server - - link_ref: switch_1___backup_server - - link_ref: switch_1___security_suite - - link_ref: switch_2___client_1 - - link_ref: switch_2___client_2 - - link_ref: switch_2___security_suite - acl: - options: - max_acl_rules: 10 - router_hostname: router_1 - ip_address_order: - - node_hostname: domain_controller - nic_num: 1 - - node_hostname: web_server - nic_num: 1 - - node_hostname: database_server - nic_num: 1 - - node_hostname: backup_server - nic_num: 1 - - node_hostname: security_suite - nic_num: 1 - - node_hostname: client_1 - nic_num: 1 - - node_hostname: client_2 - nic_num: 1 - - node_hostname: security_suite - nic_num: 2 - ics: null + components: + - type: NODES + label: NODES + options: + hosts: + - hostname: domain_controller + - hostname: web_server + services: + - service_name: WebServer + - hostname: database_server + folders: + - folder_name: database + files: + - file_name: database.db + - hostname: backup_server + - hostname: security_suite + - hostname: client_1 + - hostname: client_2 + num_services: 1 + num_applications: 0 + num_folders: 1 + num_files: 1 + num_nics: 2 + include_num_access: false + include_nmne: true + routers: + - hostname: router_1 + num_ports: 0 + ip_list: + - 192.168.1.10 + - 192.168.1.12 + - 192.168.1.14 + - 192.168.1.16 + - 192.168.1.110 + - 192.168.10.21 + - 192.168.10.22 + - 192.168.10.110 + wildcard_list: + - 0.0.0.1 + port_list: + - 80 + - 5432 + protocol_list: + - ICMP + - TCP + - UDP + num_rules: 10 + + - type: LINKS + label: LINKS + options: + link_references: + - router_1___switch_1 + - router_1___switch_2 + - switch_1___domain_controller + - switch_1___web_server + - switch_1___database_server + - switch_1___backup_server + - switch_1___security_suite + - switch_2___client_1 + - switch_2___client_2 + - switch_2___security_suite + - type: "NONE" + label: ICS + options: {} action_space: action_list: diff --git a/tests/integration_tests/game_layer/observations/test_file_system_observations.py b/tests/integration_tests/game_layer/observations/test_file_system_observations.py index af5e9650..cb83ac5e 100644 --- a/tests/integration_tests/game_layer/observations/test_file_system_observations.py +++ b/tests/integration_tests/game_layer/observations/test_file_system_observations.py @@ -72,3 +72,6 @@ def test_folder_observation(simulation): observation_state = root_folder_obs.observe(simulation.describe_state()) assert observation_state.get("health_status") == 3 # file is corrupt therefore folder is corrupted too + + +# TODO: Add tests to check num access is correct. diff --git a/tests/integration_tests/game_layer/observations/test_link_observations.py b/tests/integration_tests/game_layer/observations/test_link_observations.py index 1a41cad4..3eee72e8 100644 --- a/tests/integration_tests/game_layer/observations/test_link_observations.py +++ b/tests/integration_tests/game_layer/observations/test_link_observations.py @@ -51,31 +51,8 @@ def simulation() -> Simulation: return sim -def test_link_observation(simulation): - """Test the link observation.""" - # get a link - link: Link = next(iter(simulation.network.links.values())) - - computer: Computer = simulation.network.get_node_by_hostname("computer") - server: Server = simulation.network.get_node_by_hostname("server") - - simulation.apply_timestep(0) # some pings when network was made - reset with apply timestep - - link_obs = LinkObservation(where=["network", "links", link.uuid]) - - assert link_obs.space["PROTOCOLS"]["ALL"] == spaces.Discrete(11) # test that the spaces are 0-10 including 0 and 10 - - observation_state = link_obs.observe(simulation.describe_state()) - assert observation_state.get("PROTOCOLS") is not None - assert observation_state["PROTOCOLS"]["ALL"] == 0 - - computer.ping(server.network_interface.get(1).ip_address) - - observation_state = link_obs.observe(simulation.describe_state()) - assert observation_state["PROTOCOLS"]["ALL"] == 1 - - -def test_link_observation_again(): +def test_link_observation(): + """Check the shape and contents of the link observation.""" net = Network() sim = Simulation(network=net) switch = Switch(hostname="switch", num_ports=5, operating_state=NodeOperatingState.ON) @@ -102,6 +79,8 @@ def test_link_observation_again(): assert "PROTOCOLS" in link_2_obs assert "ALL" in link_1_obs["PROTOCOLS"] assert "ALL" in link_2_obs["PROTOCOLS"] + assert link_1_observation.space["PROTOCOLS"]["ALL"] == spaces.Discrete(11) + assert link_2_observation.space["PROTOCOLS"]["ALL"] == spaces.Discrete(11) assert link_1_obs["PROTOCOLS"]["ALL"] == 0 assert link_2_obs["PROTOCOLS"]["ALL"] == 0 diff --git a/tests/integration_tests/game_layer/test_observations.py b/tests/integration_tests/game_layer/test_observations.py index 0a34ab67..ed07e030 100644 --- a/tests/integration_tests/game_layer/test_observations.py +++ b/tests/integration_tests/game_layer/test_observations.py @@ -19,3 +19,8 @@ def test_file_observation(): ) assert dog_file_obs.observe(state) == {"health_status": 1} assert dog_file_obs.space == spaces.Dict({"health_status": spaces.Discrete(6)}) + + +# TODO: +# def test_file_num_access(): +# ... From 82143a2a2efe904813e39f0dacbe0507cd266f57 Mon Sep 17 00:00:00 2001 From: Marek Wolan Date: Tue, 2 Apr 2024 00:31:06 +0100 Subject: [PATCH 083/124] #2446 Fix io config parsing order --- src/primaite/session/environment.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/primaite/session/environment.py b/src/primaite/session/environment.py index ce9699d4..4fdbbe34 100644 --- a/src/primaite/session/environment.py +++ b/src/primaite/session/environment.py @@ -28,6 +28,8 @@ class PrimaiteGymEnv(gymnasium.Env): super().__init__() self.game_config: Dict = game_config """PrimaiteGame definition. This can be changed between episodes to enable curriculum learning.""" + self.io = PrimaiteIO.from_config(game_config.get("io_settings", {})) + """Handles IO for the environment. This produces sys logs, agent logs, etc.""" self.game: PrimaiteGame = PrimaiteGame.from_config(copy.deepcopy(self.game_config)) """Current game.""" self._agent_name = next(iter(self.game.rl_agents)) @@ -36,9 +38,6 @@ class PrimaiteGymEnv(gymnasium.Env): self.episode_counter: int = 0 """Current episode number.""" - self.io = PrimaiteIO.from_config(game_config.get("io_settings", {})) - """Handles IO for the environment. This produces sys logs, agent logs, etc.""" - @property def agent(self) -> ProxyAgent: """Grab a fresh reference to the agent object because it will be reinstantiated each episode.""" @@ -168,6 +167,8 @@ class PrimaiteRayMARLEnv(MultiAgentEnv): """ self.game_config: Dict = env_config """PrimaiteGame definition. This can be changed between episodes to enable curriculum learning.""" + self.io = PrimaiteIO.from_config(env_config.get("io_settings")) + """Handles IO for the environment. This produces sys logs, agent logs, etc.""" self.game: PrimaiteGame = PrimaiteGame.from_config(copy.deepcopy(self.game_config)) """Reference to the primaite game""" self._agent_ids = list(self.game.rl_agents.keys()) @@ -187,9 +188,6 @@ class PrimaiteRayMARLEnv(MultiAgentEnv): {name: agent.action_manager.space for name, agent in self.agents.items()} ) - self.io = PrimaiteIO.from_config(env_config.get("io_settings")) - """Handles IO for the environment. This produces sys logs, agent logs, etc.""" - super().__init__() @property From bb937c10926d1ff9965b0cdf1fedb0d4fd64866d Mon Sep 17 00:00:00 2001 From: Chris McCarthy Date: Tue, 2 Apr 2024 12:56:15 +0100 Subject: [PATCH 084/124] #2149 - docstring changes following PR suggestions. --- .../simulator/network/hardware/nodes/network/router.py | 6 +++--- src/primaite/simulator/system/core/session_manager.py | 1 - 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/primaite/simulator/network/hardware/nodes/network/router.py b/src/primaite/simulator/network/hardware/nodes/network/router.py index 6571829a..f8b5623f 100644 --- a/src/primaite/simulator/network/hardware/nodes/network/router.py +++ b/src/primaite/simulator/network/hardware/nodes/network/router.py @@ -1023,11 +1023,11 @@ class RouterSessionManager(SessionManager): """ Manages network sessions, including session creation, lookup, and communication with other components. - The RouterSessionManager is a Router/Firewall specific implementation of SessionManager. It enables to resolve - outbound interface transmission details functions to leverage the route table instead of the default gateway. + The RouterSessionManager is a Router/Firewall specific implementation of SessionManager. It overrides the + resolve_outbound_network_interface and resolve_outbound_transmission_details functions, allowing them to leverage + the route table instead of the default gateway. :param sys_log: A reference to the system log component. - :param arp_cache: A reference to the ARP cache component. """ def resolve_outbound_network_interface(self, dst_ip_address: IPv4Address) -> Optional[RouterInterface]: diff --git a/src/primaite/simulator/system/core/session_manager.py b/src/primaite/simulator/system/core/session_manager.py index 3fa2aa97..68f44dca 100644 --- a/src/primaite/simulator/system/core/session_manager.py +++ b/src/primaite/simulator/system/core/session_manager.py @@ -72,7 +72,6 @@ class SessionManager: Manages network sessions, including session creation, lookup, and communication with other components. :param sys_log: A reference to the system log component. - :param arp_cache: A reference to the ARP cache component. """ def __init__(self, sys_log: SysLog): From 989e7481f3aaa0f598a4193a3b5555edd4c8456a Mon Sep 17 00:00:00 2001 From: Czar Echavez Date: Tue, 2 Apr 2024 15:10:48 +0100 Subject: [PATCH 085/124] #2437: fix the visible health status not being carried on after restoring backup file --- .../services/database/database_service.py | 18 +++++- .../system/test_database_on_node.py | 63 +++++++++++++++++++ 2 files changed, 80 insertions(+), 1 deletion(-) diff --git a/src/primaite/simulator/system/services/database/database_service.py b/src/primaite/simulator/system/services/database/database_service.py index 541a15c2..ede2a54f 100644 --- a/src/primaite/simulator/system/services/database/database_service.py +++ b/src/primaite/simulator/system/services/database/database_service.py @@ -104,14 +104,30 @@ class DatabaseService(Service): self.sys_log.error("Unable to restore database backup.") return False + old_visible_state = SoftwareHealthState.GOOD + + # get db file regardless of whether or not it was deleted + db_file = self.file_system.get_file(folder_name="database", file_name="database.db", include_deleted=True) + + if db_file is None: + self.sys_log.error("Database file not initialised.") + return False + + # if the file was deleted, get the old visible health state + if db_file.deleted: + old_visible_state = db_file.visible_health_status + else: + old_visible_state = self.db_file.visible_health_status + self.file_system.delete_file(folder_name="database", file_name="database.db") + # replace db file - self.file_system.delete_file(folder_name="database", file_name="database.db") self.file_system.copy_file(src_folder_name="downloads", src_file_name="database.db", dst_folder_name="database") if self.db_file is None: self.sys_log.error("Copying database backup failed.") return False + self.db_file.visible_health_status = old_visible_state self.set_health_state(SoftwareHealthState.GOOD) return True diff --git a/tests/integration_tests/system/test_database_on_node.py b/tests/integration_tests/system/test_database_on_node.py index ac0e65b4..c555acff 100644 --- a/tests/integration_tests/system/test_database_on_node.py +++ b/tests/integration_tests/system/test_database_on_node.py @@ -3,6 +3,7 @@ from typing import Tuple import pytest +from primaite.simulator.file_system.file_system_item_abc import FileSystemItemHealthStatus from primaite.simulator.network.container import Network from primaite.simulator.network.hardware.node_operating_state import NodeOperatingState from primaite.simulator.network.hardware.nodes.host.computer import Computer @@ -138,6 +139,68 @@ def test_restore_backup(uc2_network): assert db_service.file_system.get_file(folder_name="database", file_name="database.db") is not None +def test_restore_backup_without_updating_scan(uc2_network): + """Same test as restore backup but the file is previously seen as corrupted.""" + db_server: Server = uc2_network.get_node_by_hostname("database_server") + db_service: DatabaseService = db_server.software_manager.software["DatabaseService"] + + # create a back up + assert db_service.backup_database() is True + + db_service.db_file.corrupt() # corrupt the db + assert db_service.db_file.health_status == FileSystemItemHealthStatus.CORRUPT # db file is actually corrupt + assert db_service.db_file.visible_health_status == FileSystemItemHealthStatus.GOOD # not scanned yet + + db_service.db_file.scan() # scan the db file + + # db file is corrupt since last scan + assert db_service.db_file.visible_health_status == FileSystemItemHealthStatus.CORRUPT + + # back up should be restored + assert db_service.restore_backup() is True + + assert db_service.db_file.health_status == FileSystemItemHealthStatus.GOOD # db file is actually good + # db file is corrupt since last scan + assert db_service.db_file.visible_health_status == FileSystemItemHealthStatus.CORRUPT + + db_service.db_file.scan() # scan the db file + assert db_service.db_file.visible_health_status == FileSystemItemHealthStatus.GOOD # now looks good + + +def test_restore_backup_after_deleting_file_without_updating_scan(uc2_network): + """Same test as restore backup but the file is previously seen as corrupted.""" + db_server: Server = uc2_network.get_node_by_hostname("database_server") + db_service: DatabaseService = db_server.software_manager.software["DatabaseService"] + + # create a back up + assert db_service.backup_database() is True + + db_service.db_file.corrupt() # corrupt the db + assert db_service.db_file.health_status == FileSystemItemHealthStatus.CORRUPT # db file is actually corrupt + assert db_service.db_file.visible_health_status == FileSystemItemHealthStatus.GOOD # not scanned yet + + db_service.db_file.scan() # scan the db file + + # db file is corrupt since last scan + assert db_service.db_file.visible_health_status == FileSystemItemHealthStatus.CORRUPT + + # delete database locally + db_service.file_system.delete_file(folder_name="database", file_name="database.db") + + # db file is gone, reduced to atoms + assert db_service.db_file is None + + # back up should be restored + assert db_service.restore_backup() is True + + assert db_service.db_file.health_status == FileSystemItemHealthStatus.GOOD # db file is actually good + # db file is corrupt since last scan + assert db_service.db_file.visible_health_status == FileSystemItemHealthStatus.CORRUPT + + db_service.db_file.scan() # scan the db file + assert db_service.db_file.visible_health_status == FileSystemItemHealthStatus.GOOD # now looks good + + def test_database_client_cannot_query_offline_database_server(uc2_network): """Tests DB query across the network returns HTTP status 404 when db server is offline.""" db_server: Server = uc2_network.get_node_by_hostname("database_server") From a4caa3dfe4abbff8e9b88c8114f93d384d0927af Mon Sep 17 00:00:00 2001 From: Marek Wolan Date: Wed, 3 Apr 2024 15:58:01 +0100 Subject: [PATCH 086/124] #2449 fix observation integration --- .../game/agent/observations/file_system_observations.py | 2 +- .../game/agent/observations/firewall_observation.py | 2 +- src/primaite/game/agent/observations/host_observations.py | 2 +- src/primaite/game/agent/observations/node_observations.py | 2 +- src/primaite/game/agent/observations/router_observation.py | 2 +- .../notebooks/Data-Manipulation-E2E-Demonstration.ipynb | 6 +++--- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/primaite/game/agent/observations/file_system_observations.py b/src/primaite/game/agent/observations/file_system_observations.py index 9b9434af..3e262055 100644 --- a/src/primaite/game/agent/observations/file_system_observations.py +++ b/src/primaite/game/agent/observations/file_system_observations.py @@ -205,7 +205,7 @@ class FolderObservation(AbstractObservation, identifier="FOLDER"): :return: Constructed folder observation instance. :rtype: FolderObservation """ - where = parent_where + ["folders", config.folder_name] + where = parent_where + ["file_system", "folders", config.folder_name] # pass down shared/common config items for file_config in config.files: diff --git a/src/primaite/game/agent/observations/firewall_observation.py b/src/primaite/game/agent/observations/firewall_observation.py index 0c10a8d2..0a1498b1 100644 --- a/src/primaite/game/agent/observations/firewall_observation.py +++ b/src/primaite/game/agent/observations/firewall_observation.py @@ -215,7 +215,7 @@ class FirewallObservation(AbstractObservation, identifier="FIREWALL"): :rtype: FirewallObservation """ return cls( - where=parent_where + ["nodes", config.hostname], + where=parent_where + [config.hostname], ip_list=config.ip_list, wildcard_list=config.wildcard_list, port_list=config.port_list, diff --git a/src/primaite/game/agent/observations/host_observations.py b/src/primaite/game/agent/observations/host_observations.py index 8ea40be7..6dbde789 100644 --- a/src/primaite/game/agent/observations/host_observations.py +++ b/src/primaite/game/agent/observations/host_observations.py @@ -216,7 +216,7 @@ class HostObservation(AbstractObservation, identifier="HOST"): if parent_where == []: where = ["network", "nodes", config.hostname] else: - where = parent_where + ["nodes", config.hostname] + where = parent_where + [config.hostname] # Pass down shared/common config items for folder_config in config.folders: diff --git a/src/primaite/game/agent/observations/node_observations.py b/src/primaite/game/agent/observations/node_observations.py index dce33a04..f11ffebf 100644 --- a/src/primaite/game/agent/observations/node_observations.py +++ b/src/primaite/game/agent/observations/node_observations.py @@ -164,7 +164,7 @@ class NodesObservation(AbstractObservation, identifier="NODES"): :return: Constructed nodes observation instance. :rtype: NodesObservation """ - if parent_where is None: + if not parent_where: where = ["network", "nodes"] else: where = parent_where + ["nodes"] diff --git a/src/primaite/game/agent/observations/router_observation.py b/src/primaite/game/agent/observations/router_observation.py index a7879f09..aeac2766 100644 --- a/src/primaite/game/agent/observations/router_observation.py +++ b/src/primaite/game/agent/observations/router_observation.py @@ -124,7 +124,7 @@ class RouterObservation(AbstractObservation, identifier="ROUTER"): :return: Constructed router observation instance. :rtype: RouterObservation """ - where = parent_where + ["nodes", config.hostname] + where = parent_where + [config.hostname] if config.acl is None: config.acl = ACLObservation.ConfigSchema() diff --git a/src/primaite/notebooks/Data-Manipulation-E2E-Demonstration.ipynb b/src/primaite/notebooks/Data-Manipulation-E2E-Demonstration.ipynb index 60d40f9c..a958aa0a 100644 --- a/src/primaite/notebooks/Data-Manipulation-E2E-Demonstration.ipynb +++ b/src/primaite/notebooks/Data-Manipulation-E2E-Demonstration.ipynb @@ -592,7 +592,7 @@ "metadata": {}, "outputs": [], "source": [ - "obs['ACL']" + "obs['NODES']['ROUTER0']" ] }, { @@ -616,12 +616,12 @@ " tries += 1\n", " obs, reward, terminated, truncated, info = env.step(0)\n", "\n", - " if obs['NODES'][6]['NICS'][1]['NMNE']['outbound'] == 1:\n", + " if obs['NODES']['HOST5']['NICS'][1]['NMNE']['outbound'] == 1:\n", " # client 1 has NMNEs, let's block it\n", " obs, reward, terminated, truncated, info = env.step(50) # block client 1\n", " print(\"blocking client 1\")\n", " break\n", - " elif obs['NODES'][7]['NICS'][1]['NMNE']['outbound'] == 1:\n", + " elif obs['NODES']['HOST6']['NICS'][1]['NMNE']['outbound'] == 1:\n", " # client 2 has NMNEs, so let's block it\n", " obs, reward, terminated, truncated, info = env.step(51) # block client 2\n", " print(\"blocking client 2\")\n", From 2cd9e58994f47e960d736c6c48cffb1c0b36c352 Mon Sep 17 00:00:00 2001 From: Marek Wolan Date: Wed, 3 Apr 2024 20:18:23 +0000 Subject: [PATCH 087/124] temp disable extra platforms for build pipeline --- .azure/azure-ci-build-pipeline.yaml | 50 ++++++++++++++--------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/.azure/azure-ci-build-pipeline.yaml b/.azure/azure-ci-build-pipeline.yaml index dcfbde0e..9faaffaf 100644 --- a/.azure/azure-ci-build-pipeline.yaml +++ b/.azure/azure-ci-build-pipeline.yaml @@ -14,36 +14,36 @@ parameters: - name: matrix type: object default: - - job_name: 'UbuntuPython38' - py: '3.8' - img: 'ubuntu-latest' - every_time: false - publish_coverage: false + # - job_name: 'UbuntuPython38' + # py: '3.8' + # img: 'ubuntu-latest' + # every_time: false + # publish_coverage: false - job_name: 'UbuntuPython310' py: '3.10' img: 'ubuntu-latest' every_time: true publish_coverage: true - - job_name: 'WindowsPython38' - py: '3.8' - img: 'windows-latest' - every_time: false - publish_coverage: false - - job_name: 'WindowsPython310' - py: '3.10' - img: 'windows-latest' - every_time: false - publish_coverage: false - - job_name: 'MacOSPython38' - py: '3.8' - img: 'macOS-latest' - every_time: false - publish_coverage: false - - job_name: 'MacOSPython310' - py: '3.10' - img: 'macOS-latest' - every_time: false - publish_coverage: false + # - job_name: 'WindowsPython38' + # py: '3.8' + # img: 'windows-latest' + # every_time: false + # publish_coverage: false + # - job_name: 'WindowsPython310' + # py: '3.10' + # img: 'windows-latest' + # every_time: false + # publish_coverage: false + # - job_name: 'MacOSPython38' + # py: '3.8' + # img: 'macOS-latest' + # every_time: false + # publish_coverage: false + # - job_name: 'MacOSPython310' + # py: '3.10' + # img: 'macOS-latest' + # every_time: false + # publish_coverage: false stages: - stage: Test From e99d238568d3e8045fd848c30d32c716e6387f20 Mon Sep 17 00:00:00 2001 From: Marek Wolan Date: Wed, 3 Apr 2024 21:39:13 +0100 Subject: [PATCH 088/124] #2450 remove link refs and put nice naming convention instead --- .../_package_data/data_manipulation.yaml | 52 ++++++-------- .../_package_data/data_manipulation_marl.yaml | 70 ++++++++----------- .../agent/observations/link_observation.py | 2 +- src/primaite/game/game.py | 6 +- src/primaite/simulator/network/container.py | 13 ++-- 5 files changed, 59 insertions(+), 84 deletions(-) diff --git a/src/primaite/config/_package_data/data_manipulation.yaml b/src/primaite/config/_package_data/data_manipulation.yaml index b6899b79..c68480cf 100644 --- a/src/primaite/config/_package_data/data_manipulation.yaml +++ b/src/primaite/config/_package_data/data_manipulation.yaml @@ -226,16 +226,16 @@ agents: label: LINKS options: link_references: - - router_1___switch_1 - - router_1___switch_2 - - switch_1___domain_controller - - switch_1___web_server - - switch_1___database_server - - switch_1___backup_server - - switch_1___security_suite - - switch_2___client_1 - - switch_2___client_2 - - switch_2___security_suite + - router_1:eth-1<->switch_1:eth-8 + - router_1:eth-2<->switch_2:eth-8 + - switch_1:eth-1<->domain_controller:eth-1 + - switch_1:eth-2<->web_server:eth-1 + - switch_1:eth-3<->database_server:eth-1 + - switch_1:eth-4<->backup_server:eth-1 + - switch_1:eth-7<->security_suite:eth-1 + - switch_2:eth-1<->client_1:eth-1 + - switch_2:eth-2<->client_2:eth-1 + - switch_2:eth-7<->security_suite:eth-2 - type: "NONE" label: ICS options: {} @@ -924,56 +924,44 @@ simulation: - ref: client_2_dns_client type: DNSClient - - links: - - ref: router_1___switch_1 - endpoint_a_ref: router_1 + - endpoint_a_ref: router_1 endpoint_a_port: 1 endpoint_b_ref: switch_1 endpoint_b_port: 8 - - ref: router_1___switch_2 - endpoint_a_ref: router_1 + - endpoint_a_ref: router_1 endpoint_a_port: 2 endpoint_b_ref: switch_2 endpoint_b_port: 8 - - ref: switch_1___domain_controller - endpoint_a_ref: switch_1 + - endpoint_a_ref: switch_1 endpoint_a_port: 1 endpoint_b_ref: domain_controller endpoint_b_port: 1 - - ref: switch_1___web_server - endpoint_a_ref: switch_1 + - endpoint_a_ref: switch_1 endpoint_a_port: 2 endpoint_b_ref: web_server endpoint_b_port: 1 - - ref: switch_1___database_server - endpoint_a_ref: switch_1 + - endpoint_a_ref: switch_1 endpoint_a_port: 3 endpoint_b_ref: database_server endpoint_b_port: 1 - - ref: switch_1___backup_server - endpoint_a_ref: switch_1 + - endpoint_a_ref: switch_1 endpoint_a_port: 4 endpoint_b_ref: backup_server endpoint_b_port: 1 - - ref: switch_1___security_suite - endpoint_a_ref: switch_1 + - endpoint_a_ref: switch_1 endpoint_a_port: 7 endpoint_b_ref: security_suite endpoint_b_port: 1 - - ref: switch_2___client_1 - endpoint_a_ref: switch_2 + - endpoint_a_ref: switch_2 endpoint_a_port: 1 endpoint_b_ref: client_1 endpoint_b_port: 1 - - ref: switch_2___client_2 - endpoint_a_ref: switch_2 + - endpoint_a_ref: switch_2 endpoint_a_port: 2 endpoint_b_ref: client_2 endpoint_b_port: 1 - - ref: switch_2___security_suite - endpoint_a_ref: switch_2 + - endpoint_a_ref: switch_2 endpoint_a_port: 7 endpoint_b_ref: security_suite endpoint_b_port: 2 diff --git a/src/primaite/config/_package_data/data_manipulation_marl.yaml b/src/primaite/config/_package_data/data_manipulation_marl.yaml index 86759b2d..9ec2a1f2 100644 --- a/src/primaite/config/_package_data/data_manipulation_marl.yaml +++ b/src/primaite/config/_package_data/data_manipulation_marl.yaml @@ -228,16 +228,16 @@ agents: label: LINKS options: link_references: - - router_1___switch_1 - - router_1___switch_2 - - switch_1___domain_controller - - switch_1___web_server - - switch_1___database_server - - switch_1___backup_server - - switch_1___security_suite - - switch_2___client_1 - - switch_2___client_2 - - switch_2___security_suite + - router_1:eth-1<->switch_1:eth-8 + - router_1:eth-2<->switch_2:eth-8 + - switch_1:eth-1<->domain_controller:eth-1 + - switch_1:eth-2<->web_server:eth-1 + - switch_1:eth-3<->database_server:eth-1 + - switch_1:eth-4<->backup_server:eth-1 + - switch_1:eth-7<->security_suite:eth-1 + - switch_2:eth-1<->client_1:eth-1 + - switch_2:eth-2<->client_2:eth-1 + - switch_2:eth-7<->security_suite:eth-2 - type: "NONE" label: ICS options: {} @@ -803,16 +803,16 @@ agents: label: LINKS options: link_references: - - router_1___switch_1 - - router_1___switch_2 - - switch_1___domain_controller - - switch_1___web_server - - switch_1___database_server - - switch_1___backup_server - - switch_1___security_suite - - switch_2___client_1 - - switch_2___client_2 - - switch_2___security_suite + - router_1:eth-1<->switch_1:eth-8 + - router_1:eth-2<->switch_2:eth-8 + - switch_1:eth-1<->domain_controller:eth-1 + - switch_1:eth-2<->web_server:eth-1 + - switch_1:eth-3<->database_server:eth-1 + - switch_1:eth-4<->backup_server:eth-1 + - switch_1:eth-7<->security_suite:eth-1 + - switch_2:eth-1<->client_1:eth-1 + - switch_2:eth-2<->client_2:eth-1 + - switch_2:eth-7<->security_suite:eth-2 - type: "NONE" label: ICS options: {} @@ -1505,53 +1505,43 @@ simulation: links: - - ref: router_1___switch_1 - endpoint_a_ref: router_1 + - endpoint_a_ref: router_1 endpoint_a_port: 1 endpoint_b_ref: switch_1 endpoint_b_port: 8 - - ref: router_1___switch_2 - endpoint_a_ref: router_1 + - endpoint_a_ref: router_1 endpoint_a_port: 2 endpoint_b_ref: switch_2 endpoint_b_port: 8 - - ref: switch_1___domain_controller - endpoint_a_ref: switch_1 + - endpoint_a_ref: switch_1 endpoint_a_port: 1 endpoint_b_ref: domain_controller endpoint_b_port: 1 - - ref: switch_1___web_server - endpoint_a_ref: switch_1 + - endpoint_a_ref: switch_1 endpoint_a_port: 2 endpoint_b_ref: web_server endpoint_b_port: 1 - - ref: switch_1___database_server - endpoint_a_ref: switch_1 + - endpoint_a_ref: switch_1 endpoint_a_port: 3 endpoint_b_ref: database_server endpoint_b_port: 1 - - ref: switch_1___backup_server - endpoint_a_ref: switch_1 + - endpoint_a_ref: switch_1 endpoint_a_port: 4 endpoint_b_ref: backup_server endpoint_b_port: 1 - - ref: switch_1___security_suite - endpoint_a_ref: switch_1 + - endpoint_a_ref: switch_1 endpoint_a_port: 7 endpoint_b_ref: security_suite endpoint_b_port: 1 - - ref: switch_2___client_1 - endpoint_a_ref: switch_2 + - endpoint_a_ref: switch_2 endpoint_a_port: 1 endpoint_b_ref: client_1 endpoint_b_port: 1 - - ref: switch_2___client_2 - endpoint_a_ref: switch_2 + - endpoint_a_ref: switch_2 endpoint_a_port: 2 endpoint_b_ref: client_2 endpoint_b_port: 1 - - ref: switch_2___security_suite - endpoint_a_ref: switch_2 + - endpoint_a_ref: switch_2 endpoint_a_port: 7 endpoint_b_ref: security_suite endpoint_b_port: 2 diff --git a/src/primaite/game/agent/observations/link_observation.py b/src/primaite/game/agent/observations/link_observation.py index be08657d..b55aae46 100644 --- a/src/primaite/game/agent/observations/link_observation.py +++ b/src/primaite/game/agent/observations/link_observation.py @@ -82,7 +82,7 @@ class LinkObservation(AbstractObservation, identifier="LINK"): :return: Constructed link observation instance. :rtype: LinkObservation """ - link_reference = game.ref_map_links[config.link_reference] + link_reference = config.link_reference if parent_where == []: where = ["network", "links", link_reference] else: diff --git a/src/primaite/game/game.py b/src/primaite/game/game.py index 6ba7e63c..034d11bc 100644 --- a/src/primaite/game/game.py +++ b/src/primaite/game/game.py @@ -111,9 +111,6 @@ class PrimaiteGame: self.ref_map_applications: Dict[str, str] = {} """Mapping from human-readable application reference to application object. Used for parsing config files.""" - self.ref_map_links: Dict[str, str] = {} - """Mapping from human-readable link reference to link object. Used when parsing config files.""" - self.save_step_metadata: bool = False """Whether to save the RL agents' action, environment state, and other data at every single step.""" @@ -409,8 +406,7 @@ class PrimaiteGame: endpoint_b = node_b.network_interface[link_cfg["endpoint_b_port"]] else: endpoint_b = node_b.network_interface[link_cfg["endpoint_b_port"]] - new_link = net.connect(endpoint_a=endpoint_a, endpoint_b=endpoint_b) - game.ref_map_links[link_cfg["ref"]] = new_link.uuid + net.connect(endpoint_a=endpoint_a, endpoint_b=endpoint_b) # 3. create agents agents_cfg = cfg.get("agents", []) diff --git a/src/primaite/simulator/network/container.py b/src/primaite/simulator/network/container.py index 92ee9f0d..cfe66d89 100644 --- a/src/primaite/simulator/network/container.py +++ b/src/primaite/simulator/network/container.py @@ -225,18 +225,19 @@ class Network(SimComponent): } ) # Update the links one-by-one. The key is a 4-tuple of `hostname_a, port_a, hostname_b, port_b` - for uuid, link in self.links.items(): + for _, link in self.links.items(): node_a = link.endpoint_a._connected_node node_b = link.endpoint_b._connected_node hostname_a = node_a.hostname if node_a else None hostname_b = node_b.hostname if node_b else None port_a = link.endpoint_a.port_num port_b = link.endpoint_b.port_num - state["links"][uuid] = link.describe_state() - state["links"][uuid]["hostname_a"] = hostname_a - state["links"][uuid]["hostname_b"] = hostname_b - state["links"][uuid]["port_a"] = port_a - state["links"][uuid]["port_b"] = port_b + link_key = f"{hostname_a}:eth-{port_a}<->{hostname_b}:eth-{port_b}" + state["links"][link_key] = link.describe_state() + state["links"][link_key]["hostname_a"] = hostname_a + state["links"][link_key]["hostname_b"] = hostname_b + state["links"][link_key]["port_a"] = port_a + state["links"][link_key]["port_b"] = port_b return state From 53de4bf7ddcd11a6c0b16694ab16758f6ff9b478 Mon Sep 17 00:00:00 2001 From: Marek Wolan Date: Wed, 3 Apr 2024 21:46:42 +0100 Subject: [PATCH 089/124] Update test assets to new link naming convention --- .../assets/configs/bad_primaite_session.yaml | 50 ++++++------- .../configs/basic_switched_network.yaml | 6 +- .../configs/eval_only_primaite_session.yaml | 50 ++++++------- .../configs/firewall_actions_network.yaml | 2 +- tests/assets/configs/multi_agent_session.yaml | 70 ++++++++----------- tests/assets/configs/shared_rewards.yaml | 50 ++++++------- .../configs/test_application_install.yaml | 50 ++++++------- .../assets/configs/test_primaite_session.yaml | 50 ++++++------- .../configs/train_only_primaite_session.yaml | 50 ++++++------- .../observations/test_link_observations.py | 4 +- 10 files changed, 155 insertions(+), 227 deletions(-) diff --git a/tests/assets/configs/bad_primaite_session.yaml b/tests/assets/configs/bad_primaite_session.yaml index d07a0376..19cad586 100644 --- a/tests/assets/configs/bad_primaite_session.yaml +++ b/tests/assets/configs/bad_primaite_session.yaml @@ -136,16 +136,16 @@ agents: label: LINKS options: link_references: - - router_1___switch_1 - - router_1___switch_2 - - switch_1___domain_controller - - switch_1___web_server - - switch_1___database_server - - switch_1___backup_server - - switch_1___security_suite - - switch_2___client_1 - - switch_2___client_2 - - switch_2___security_suite + - router_1:eth-1<->switch_1:eth-8 + - router_1:eth-2<->switch_2:eth-8 + - switch_1:eth-1<->domain_controller:eth-1 + - switch_1:eth-2<->web_server:eth-1 + - switch_1:eth-3<->database_server:eth-1 + - switch_1:eth-4<->backup_server:eth-1 + - switch_1:eth-7<->security_suite:eth-1 + - switch_2:eth-1<->client_1:eth-1 + - switch_2:eth-2<->client_2:eth-1 + - switch_2:eth-7<->security_suite:eth-2 - type: "NONE" label: ICS options: {} @@ -687,53 +687,43 @@ simulation: type: DNSClient links: - - ref: router_1___switch_1 - endpoint_a_ref: router_1 + - endpoint_a_ref: router_1 endpoint_a_port: 1 endpoint_b_ref: switch_1 endpoint_b_port: 8 - - ref: router_1___switch_2 - endpoint_a_ref: router_1 + - endpoint_a_ref: router_1 endpoint_a_port: 2 endpoint_b_ref: switch_2 endpoint_b_port: 8 - - ref: switch_1___domain_controller - endpoint_a_ref: switch_1 + - endpoint_a_ref: switch_1 endpoint_a_port: 1 endpoint_b_ref: domain_controller endpoint_b_port: 1 - - ref: switch_1___web_server - endpoint_a_ref: switch_1 + - endpoint_a_ref: switch_1 endpoint_a_port: 2 endpoint_b_ref: web_server endpoint_b_port: 1 - - ref: switch_1___database_server - endpoint_a_ref: switch_1 + - endpoint_a_ref: switch_1 endpoint_a_port: 3 endpoint_b_ref: database_server endpoint_b_port: 1 - - ref: switch_1___backup_server - endpoint_a_ref: switch_1 + - endpoint_a_ref: switch_1 endpoint_a_port: 4 endpoint_b_ref: backup_server endpoint_b_port: 1 - - ref: switch_1___security_suite - endpoint_a_ref: switch_1 + - endpoint_a_ref: switch_1 endpoint_a_port: 7 endpoint_b_ref: security_suite endpoint_b_port: 1 - - ref: switch_2___client_1 - endpoint_a_ref: switch_2 + - endpoint_a_ref: switch_2 endpoint_a_port: 1 endpoint_b_ref: client_1 endpoint_b_port: 1 - - ref: switch_2___client_2 - endpoint_a_ref: switch_2 + - endpoint_a_ref: switch_2 endpoint_a_port: 2 endpoint_b_ref: client_2 endpoint_b_port: 1 - - ref: switch_2___security_suite - endpoint_a_ref: switch_2 + - endpoint_a_ref: switch_2 endpoint_a_port: 7 endpoint_b_ref: security_suite endpoint_b_port: 2 diff --git a/tests/assets/configs/basic_switched_network.yaml b/tests/assets/configs/basic_switched_network.yaml index 9dfeae06..009f239a 100644 --- a/tests/assets/configs/basic_switched_network.yaml +++ b/tests/assets/configs/basic_switched_network.yaml @@ -162,13 +162,11 @@ simulation: # pre installed services and applications links: - - ref: switch_1___client_1 - endpoint_a_ref: switch_1 + - endpoint_a_ref: switch_1 endpoint_a_port: 1 endpoint_b_ref: client_1 endpoint_b_port: 1 - - ref: switch_1___client_2 - endpoint_a_ref: switch_1 + - endpoint_a_ref: switch_1 endpoint_a_port: 2 endpoint_b_ref: client_2 endpoint_b_port: 1 diff --git a/tests/assets/configs/eval_only_primaite_session.yaml b/tests/assets/configs/eval_only_primaite_session.yaml index 8723ae38..c342ed72 100644 --- a/tests/assets/configs/eval_only_primaite_session.yaml +++ b/tests/assets/configs/eval_only_primaite_session.yaml @@ -152,16 +152,16 @@ agents: label: LINKS options: link_references: - - router_1___switch_1 - - router_1___switch_2 - - switch_1___domain_controller - - switch_1___web_server - - switch_1___database_server - - switch_1___backup_server - - switch_1___security_suite - - switch_2___client_1 - - switch_2___client_2 - - switch_2___security_suite + - router_1:eth-1<->switch_1:eth-8 + - router_1:eth-2<->switch_2:eth-8 + - switch_1:eth-1<->domain_controller:eth-1 + - switch_1:eth-2<->web_server:eth-1 + - switch_1:eth-3<->database_server:eth-1 + - switch_1:eth-4<->backup_server:eth-1 + - switch_1:eth-7<->security_suite:eth-1 + - switch_2:eth-1<->client_1:eth-1 + - switch_2:eth-2<->client_2:eth-1 + - switch_2:eth-7<->security_suite:eth-2 - type: "NONE" label: ICS options: {} @@ -703,53 +703,43 @@ simulation: type: DNSClient links: - - ref: router_1___switch_1 - endpoint_a_ref: router_1 + - endpoint_a_ref: router_1 endpoint_a_port: 1 endpoint_b_ref: switch_1 endpoint_b_port: 8 - - ref: router_1___switch_2 - endpoint_a_ref: router_1 + - endpoint_a_ref: router_1 endpoint_a_port: 2 endpoint_b_ref: switch_2 endpoint_b_port: 8 - - ref: switch_1___domain_controller - endpoint_a_ref: switch_1 + - endpoint_a_ref: switch_1 endpoint_a_port: 1 endpoint_b_ref: domain_controller endpoint_b_port: 1 - - ref: switch_1___web_server - endpoint_a_ref: switch_1 + - endpoint_a_ref: switch_1 endpoint_a_port: 2 endpoint_b_ref: web_server endpoint_b_port: 1 - - ref: switch_1___database_server - endpoint_a_ref: switch_1 + - endpoint_a_ref: switch_1 endpoint_a_port: 3 endpoint_b_ref: database_server endpoint_b_port: 1 - - ref: switch_1___backup_server - endpoint_a_ref: switch_1 + - endpoint_a_ref: switch_1 endpoint_a_port: 4 endpoint_b_ref: backup_server endpoint_b_port: 1 - - ref: switch_1___security_suite - endpoint_a_ref: switch_1 + - endpoint_a_ref: switch_1 endpoint_a_port: 7 endpoint_b_ref: security_suite endpoint_b_port: 1 - - ref: switch_2___client_1 - endpoint_a_ref: switch_2 + - endpoint_a_ref: switch_2 endpoint_a_port: 1 endpoint_b_ref: client_1 endpoint_b_port: 1 - - ref: switch_2___client_2 - endpoint_a_ref: switch_2 + - endpoint_a_ref: switch_2 endpoint_a_port: 2 endpoint_b_ref: client_2 endpoint_b_port: 1 - - ref: switch_2___security_suite - endpoint_a_ref: switch_2 + - endpoint_a_ref: switch_2 endpoint_a_port: 7 endpoint_b_ref: security_suite endpoint_b_port: 2 diff --git a/tests/assets/configs/firewall_actions_network.yaml b/tests/assets/configs/firewall_actions_network.yaml index 203ea3ea..cf10505e 100644 --- a/tests/assets/configs/firewall_actions_network.yaml +++ b/tests/assets/configs/firewall_actions_network.yaml @@ -101,7 +101,7 @@ agents: label: LINKS options: link_references: - - client_1___switch_1 + - client_1:eth-1<->switch_1:eth-1 - type: "NONE" label: ICS options: {} diff --git a/tests/assets/configs/multi_agent_session.yaml b/tests/assets/configs/multi_agent_session.yaml index dd416523..35431064 100644 --- a/tests/assets/configs/multi_agent_session.yaml +++ b/tests/assets/configs/multi_agent_session.yaml @@ -147,16 +147,16 @@ agents: label: LINKS options: link_references: - - router_1___switch_1 - - router_1___switch_2 - - switch_1___domain_controller - - switch_1___web_server - - switch_1___database_server - - switch_1___backup_server - - switch_1___security_suite - - switch_2___client_1 - - switch_2___client_2 - - switch_2___security_suite + - router_1:eth-1<->switch_1:eth-8 + - router_1:eth-2<->switch_2:eth-8 + - switch_1:eth-1<->domain_controller:eth-1 + - switch_1:eth-2<->web_server:eth-1 + - switch_1:eth-3<->database_server:eth-1 + - switch_1:eth-4<->backup_server:eth-1 + - switch_1:eth-7<->security_suite:eth-1 + - switch_2:eth-1<->client_1:eth-1 + - switch_2:eth-2<->client_2:eth-1 + - switch_2:eth-7<->security_suite:eth-2 - type: "NONE" label: ICS options: {} @@ -613,16 +613,16 @@ agents: label: LINKS options: link_references: - - router_1___switch_1 - - router_1___switch_2 - - switch_1___domain_controller - - switch_1___web_server - - switch_1___database_server - - switch_1___backup_server - - switch_1___security_suite - - switch_2___client_1 - - switch_2___client_2 - - switch_2___security_suite + - router_1:eth-1<->switch_1:eth-8 + - router_1:eth-2<->switch_2:eth-8 + - switch_1:eth-1<->domain_controller:eth-1 + - switch_1:eth-2<->web_server:eth-1 + - switch_1:eth-3<->database_server:eth-1 + - switch_1:eth-4<->backup_server:eth-1 + - switch_1:eth-7<->security_suite:eth-1 + - switch_2:eth-1<->client_1:eth-1 + - switch_2:eth-2<->client_2:eth-1 + - switch_2:eth-7<->security_suite:eth-2 - type: "NONE" label: ICS options: {} @@ -1162,53 +1162,43 @@ simulation: type: DNSClient links: - - ref: router_1___switch_1 - endpoint_a_ref: router_1 + - endpoint_a_ref: router_1 endpoint_a_port: 1 endpoint_b_ref: switch_1 endpoint_b_port: 8 - - ref: router_1___switch_2 - endpoint_a_ref: router_1 + - endpoint_a_ref: router_1 endpoint_a_port: 2 endpoint_b_ref: switch_2 endpoint_b_port: 8 - - ref: switch_1___domain_controller - endpoint_a_ref: switch_1 + - endpoint_a_ref: switch_1 endpoint_a_port: 1 endpoint_b_ref: domain_controller endpoint_b_port: 1 - - ref: switch_1___web_server - endpoint_a_ref: switch_1 + - endpoint_a_ref: switch_1 endpoint_a_port: 2 endpoint_b_ref: web_server endpoint_b_port: 1 - - ref: switch_1___database_server - endpoint_a_ref: switch_1 + - endpoint_a_ref: switch_1 endpoint_a_port: 3 endpoint_b_ref: database_server endpoint_b_port: 1 - - ref: switch_1___backup_server - endpoint_a_ref: switch_1 + - endpoint_a_ref: switch_1 endpoint_a_port: 4 endpoint_b_ref: backup_server endpoint_b_port: 1 - - ref: switch_1___security_suite - endpoint_a_ref: switch_1 + - endpoint_a_ref: switch_1 endpoint_a_port: 7 endpoint_b_ref: security_suite endpoint_b_port: 1 - - ref: switch_2___client_1 - endpoint_a_ref: switch_2 + - endpoint_a_ref: switch_2 endpoint_a_port: 1 endpoint_b_ref: client_1 endpoint_b_port: 1 - - ref: switch_2___client_2 - endpoint_a_ref: switch_2 + - endpoint_a_ref: switch_2 endpoint_a_port: 2 endpoint_b_ref: client_2 endpoint_b_port: 1 - - ref: switch_2___security_suite - endpoint_a_ref: switch_2 + - endpoint_a_ref: switch_2 endpoint_a_port: 7 endpoint_b_ref: security_suite endpoint_b_port: 2 diff --git a/tests/assets/configs/shared_rewards.yaml b/tests/assets/configs/shared_rewards.yaml index 4b925844..9cf4d17d 100644 --- a/tests/assets/configs/shared_rewards.yaml +++ b/tests/assets/configs/shared_rewards.yaml @@ -226,16 +226,16 @@ agents: label: LINKS options: link_references: - - router_1___switch_1 - - router_1___switch_2 - - switch_1___domain_controller - - switch_1___web_server - - switch_1___database_server - - switch_1___backup_server - - switch_1___security_suite - - switch_2___client_1 - - switch_2___client_2 - - switch_2___security_suite + - router_1:eth-1<->switch_1:eth-8 + - router_1:eth-2<->switch_2:eth-8 + - switch_1:eth-1<->domain_controller:eth-1 + - switch_1:eth-2<->web_server:eth-1 + - switch_1:eth-3<->database_server:eth-1 + - switch_1:eth-4<->backup_server:eth-1 + - switch_1:eth-7<->security_suite:eth-1 + - switch_2:eth-1<->client_1:eth-1 + - switch_2:eth-2<->client_2:eth-1 + - switch_2:eth-7<->security_suite:eth-2 - type: "NONE" label: ICS options: {} @@ -921,53 +921,43 @@ simulation: links: - - ref: router_1___switch_1 - endpoint_a_ref: router_1 + - endpoint_a_ref: router_1 endpoint_a_port: 1 endpoint_b_ref: switch_1 endpoint_b_port: 8 - - ref: router_1___switch_2 - endpoint_a_ref: router_1 + - endpoint_a_ref: router_1 endpoint_a_port: 2 endpoint_b_ref: switch_2 endpoint_b_port: 8 - - ref: switch_1___domain_controller - endpoint_a_ref: switch_1 + - endpoint_a_ref: switch_1 endpoint_a_port: 1 endpoint_b_ref: domain_controller endpoint_b_port: 1 - - ref: switch_1___web_server - endpoint_a_ref: switch_1 + - endpoint_a_ref: switch_1 endpoint_a_port: 2 endpoint_b_ref: web_server endpoint_b_port: 1 - - ref: switch_1___database_server - endpoint_a_ref: switch_1 + - endpoint_a_ref: switch_1 endpoint_a_port: 3 endpoint_b_ref: database_server endpoint_b_port: 1 - - ref: switch_1___backup_server - endpoint_a_ref: switch_1 + - endpoint_a_ref: switch_1 endpoint_a_port: 4 endpoint_b_ref: backup_server endpoint_b_port: 1 - - ref: switch_1___security_suite - endpoint_a_ref: switch_1 + - endpoint_a_ref: switch_1 endpoint_a_port: 7 endpoint_b_ref: security_suite endpoint_b_port: 1 - - ref: switch_2___client_1 - endpoint_a_ref: switch_2 + - endpoint_a_ref: switch_2 endpoint_a_port: 1 endpoint_b_ref: client_1 endpoint_b_port: 1 - - ref: switch_2___client_2 - endpoint_a_ref: switch_2 + - endpoint_a_ref: switch_2 endpoint_a_port: 2 endpoint_b_ref: client_2 endpoint_b_port: 1 - - ref: switch_2___security_suite - endpoint_a_ref: switch_2 + - endpoint_a_ref: switch_2 endpoint_a_port: 7 endpoint_b_ref: security_suite endpoint_b_port: 2 diff --git a/tests/assets/configs/test_application_install.yaml b/tests/assets/configs/test_application_install.yaml index ccd2228c..d2e85f30 100644 --- a/tests/assets/configs/test_application_install.yaml +++ b/tests/assets/configs/test_application_install.yaml @@ -226,16 +226,16 @@ agents: label: LINKS options: link_references: - - router_1___switch_1 - - router_1___switch_2 - - switch_1___domain_controller - - switch_1___web_server - - switch_1___database_server - - switch_1___backup_server - - switch_1___security_suite - - switch_2___client_1 - - switch_2___client_2 - - switch_2___security_suite + - router_1:eth-1<->switch_1:eth-8 + - router_1:eth-2<->switch_2:eth-8 + - switch_1:eth-1<->domain_controller:eth-1 + - switch_1:eth-2<->web_server:eth-1 + - switch_1:eth-3<->database_server:eth-1 + - switch_1:eth-4<->backup_server:eth-1 + - switch_1:eth-7<->security_suite:eth-1 + - switch_2:eth-1<->client_1:eth-1 + - switch_2:eth-2<->client_2:eth-1 + - switch_2:eth-7<->security_suite:eth-2 - type: "NONE" label: ICS options: {} @@ -953,53 +953,43 @@ simulation: links: - - ref: router_1___switch_1 - endpoint_a_ref: router_1 + - endpoint_a_ref: router_1 endpoint_a_port: 1 endpoint_b_ref: switch_1 endpoint_b_port: 8 - - ref: router_1___switch_2 - endpoint_a_ref: router_1 + - endpoint_a_ref: router_1 endpoint_a_port: 2 endpoint_b_ref: switch_2 endpoint_b_port: 8 - - ref: switch_1___domain_controller - endpoint_a_ref: switch_1 + - endpoint_a_ref: switch_1 endpoint_a_port: 1 endpoint_b_ref: domain_controller endpoint_b_port: 1 - - ref: switch_1___web_server - endpoint_a_ref: switch_1 + - endpoint_a_ref: switch_1 endpoint_a_port: 2 endpoint_b_ref: web_server endpoint_b_port: 1 - - ref: switch_1___database_server - endpoint_a_ref: switch_1 + - endpoint_a_ref: switch_1 endpoint_a_port: 3 endpoint_b_ref: database_server endpoint_b_port: 1 - - ref: switch_1___backup_server - endpoint_a_ref: switch_1 + - endpoint_a_ref: switch_1 endpoint_a_port: 4 endpoint_b_ref: backup_server endpoint_b_port: 1 - - ref: switch_1___security_suite - endpoint_a_ref: switch_1 + - endpoint_a_ref: switch_1 endpoint_a_port: 7 endpoint_b_ref: security_suite endpoint_b_port: 1 - - ref: switch_2___client_1 - endpoint_a_ref: switch_2 + - endpoint_a_ref: switch_2 endpoint_a_port: 1 endpoint_b_ref: client_1 endpoint_b_port: 1 - - ref: switch_2___client_2 - endpoint_a_ref: switch_2 + - endpoint_a_ref: switch_2 endpoint_a_port: 2 endpoint_b_ref: client_2 endpoint_b_port: 1 - - ref: switch_2___security_suite - endpoint_a_ref: switch_2 + - endpoint_a_ref: switch_2 endpoint_a_port: 7 endpoint_b_ref: security_suite endpoint_b_port: 2 diff --git a/tests/assets/configs/test_primaite_session.yaml b/tests/assets/configs/test_primaite_session.yaml index 8bad2f0b..1fd489ec 100644 --- a/tests/assets/configs/test_primaite_session.yaml +++ b/tests/assets/configs/test_primaite_session.yaml @@ -160,16 +160,16 @@ agents: label: LINKS options: link_references: - - router_1___switch_1 - - router_1___switch_2 - - switch_1___domain_controller - - switch_1___web_server - - switch_1___database_server - - switch_1___backup_server - - switch_1___security_suite - - switch_2___client_1 - - switch_2___client_2 - - switch_2___security_suite + - router_1:eth-1<->switch_1:eth-8 + - router_1:eth-2<->switch_2:eth-8 + - switch_1:eth-1<->domain_controller:eth-1 + - switch_1:eth-2<->web_server:eth-1 + - switch_1:eth-3<->database_server:eth-1 + - switch_1:eth-4<->backup_server:eth-1 + - switch_1:eth-7<->security_suite:eth-1 + - switch_2:eth-1<->client_1:eth-1 + - switch_2:eth-2<->client_2:eth-1 + - switch_2:eth-7<->security_suite:eth-2 - type: "NONE" label: ICS options: {} @@ -743,53 +743,43 @@ simulation: protocol: ICMP links: - - ref: router_1___switch_1 - endpoint_a_ref: router_1 + - endpoint_a_ref: router_1 endpoint_a_port: 1 endpoint_b_ref: switch_1 endpoint_b_port: 8 - - ref: router_1___switch_2 - endpoint_a_ref: router_1 + - endpoint_a_ref: router_1 endpoint_a_port: 2 endpoint_b_ref: switch_2 endpoint_b_port: 8 - - ref: switch_1___domain_controller - endpoint_a_ref: switch_1 + - endpoint_a_ref: switch_1 endpoint_a_port: 1 endpoint_b_ref: domain_controller endpoint_b_port: 1 - - ref: switch_1___web_server - endpoint_a_ref: switch_1 + - endpoint_a_ref: switch_1 endpoint_a_port: 2 endpoint_b_ref: web_server endpoint_b_port: 1 - - ref: switch_1___database_server - endpoint_a_ref: switch_1 + - endpoint_a_ref: switch_1 endpoint_a_port: 3 endpoint_b_ref: database_server endpoint_b_port: 1 - - ref: switch_1___backup_server - endpoint_a_ref: switch_1 + - endpoint_a_ref: switch_1 endpoint_a_port: 4 endpoint_b_ref: backup_server endpoint_b_port: 1 - - ref: switch_1___security_suite - endpoint_a_ref: switch_1 + - endpoint_a_ref: switch_1 endpoint_a_port: 7 endpoint_b_ref: security_suite endpoint_b_port: 1 - - ref: switch_2___client_1 - endpoint_a_ref: switch_2 + - endpoint_a_ref: switch_2 endpoint_a_port: 1 endpoint_b_ref: client_1 endpoint_b_port: 1 - - ref: switch_2___client_2 - endpoint_a_ref: switch_2 + - endpoint_a_ref: switch_2 endpoint_a_port: 2 endpoint_b_ref: client_2 endpoint_b_port: 1 - - ref: switch_2___security_suite - endpoint_a_ref: switch_2 + - endpoint_a_ref: switch_2 endpoint_a_port: 7 endpoint_b_ref: security_suite endpoint_b_port: 2 diff --git a/tests/assets/configs/train_only_primaite_session.yaml b/tests/assets/configs/train_only_primaite_session.yaml index fcfbaf15..ca26fc62 100644 --- a/tests/assets/configs/train_only_primaite_session.yaml +++ b/tests/assets/configs/train_only_primaite_session.yaml @@ -160,16 +160,16 @@ agents: label: LINKS options: link_references: - - router_1___switch_1 - - router_1___switch_2 - - switch_1___domain_controller - - switch_1___web_server - - switch_1___database_server - - switch_1___backup_server - - switch_1___security_suite - - switch_2___client_1 - - switch_2___client_2 - - switch_2___security_suite + - router_1:eth-1<->switch_1:eth-8 + - router_1:eth-2<->switch_2:eth-8 + - switch_1:eth-1<->domain_controller:eth-1 + - switch_1:eth-2<->web_server:eth-1 + - switch_1:eth-3<->database_server:eth-1 + - switch_1:eth-4<->backup_server:eth-1 + - switch_1:eth-7<->security_suite:eth-1 + - switch_2:eth-1<->client_1:eth-1 + - switch_2:eth-2<->client_2:eth-1 + - switch_2:eth-7<->security_suite:eth-2 - type: "NONE" label: ICS options: {} @@ -710,53 +710,43 @@ simulation: type: DNSClient links: - - ref: router_1___switch_1 - endpoint_a_ref: router_1 + - endpoint_a_ref: router_1 endpoint_a_port: 1 endpoint_b_ref: switch_1 endpoint_b_port: 8 - - ref: router_1___switch_2 - endpoint_a_ref: router_1 + - endpoint_a_ref: router_1 endpoint_a_port: 2 endpoint_b_ref: switch_2 endpoint_b_port: 8 - - ref: switch_1___domain_controller - endpoint_a_ref: switch_1 + - endpoint_a_ref: switch_1 endpoint_a_port: 1 endpoint_b_ref: domain_controller endpoint_b_port: 1 - - ref: switch_1___web_server - endpoint_a_ref: switch_1 + - endpoint_a_ref: switch_1 endpoint_a_port: 2 endpoint_b_ref: web_server endpoint_b_port: 1 - - ref: switch_1___database_server - endpoint_a_ref: switch_1 + - endpoint_a_ref: switch_1 endpoint_a_port: 3 endpoint_b_ref: database_server endpoint_b_port: 1 - - ref: switch_1___backup_server - endpoint_a_ref: switch_1 + - endpoint_a_ref: switch_1 endpoint_a_port: 4 endpoint_b_ref: backup_server endpoint_b_port: 1 - - ref: switch_1___security_suite - endpoint_a_ref: switch_1 + - endpoint_a_ref: switch_1 endpoint_a_port: 7 endpoint_b_ref: security_suite endpoint_b_port: 1 - - ref: switch_2___client_1 - endpoint_a_ref: switch_2 + - endpoint_a_ref: switch_2 endpoint_a_port: 1 endpoint_b_ref: client_1 endpoint_b_port: 1 - - ref: switch_2___client_2 - endpoint_a_ref: switch_2 + - endpoint_a_ref: switch_2 endpoint_a_port: 2 endpoint_b_ref: client_2 endpoint_b_port: 1 - - ref: switch_2___security_suite - endpoint_a_ref: switch_2 + - endpoint_a_ref: switch_2 endpoint_a_port: 7 endpoint_b_ref: security_suite endpoint_b_port: 2 diff --git a/tests/integration_tests/game_layer/observations/test_link_observations.py b/tests/integration_tests/game_layer/observations/test_link_observations.py index 3eee72e8..dce7b23d 100644 --- a/tests/integration_tests/game_layer/observations/test_link_observations.py +++ b/tests/integration_tests/game_layer/observations/test_link_observations.py @@ -69,8 +69,8 @@ def test_link_observation(): assert link_1 is not None assert link_2 is not None - link_1_observation = LinkObservation(where=["network", "links", link_1.uuid]) - link_2_observation = LinkObservation(where=["network", "links", link_2.uuid]) + link_1_observation = LinkObservation(where=["network", "links", "switch:eth-1<->computer_1:eth-1"]) + link_2_observation = LinkObservation(where=["network", "links", "switch:eth-2<->computer_2:eth-1"]) state = sim.describe_state() link_1_obs = link_1_observation.observe(state) From 526dcc7ffea26600e330d68e8681f1ed18c5020d Mon Sep 17 00:00:00 2001 From: Marek Wolan Date: Wed, 3 Apr 2024 22:16:54 +0100 Subject: [PATCH 090/124] #2450 remove the need to pass Game to observation objects --- .../agent/observations/acl_observation.py | 6 ++---- .../observations/file_system_observations.py | 10 ++++------ .../observations/firewall_observation.py | 8 ++------ .../agent/observations/host_observations.py | 16 ++++++---------- .../agent/observations/link_observation.py | 14 ++++---------- .../agent/observations/nic_observations.py | 9 +++------ .../agent/observations/node_observations.py | 12 +++++------- .../agent/observations/observation_manager.py | 19 ++++++------------- .../game/agent/observations/observations.py | 8 ++------ .../agent/observations/router_observation.py | 10 ++++------ .../observations/software_observation.py | 13 +++---------- src/primaite/game/game.py | 6 +++--- 12 files changed, 44 insertions(+), 87 deletions(-) diff --git a/src/primaite/game/agent/observations/acl_observation.py b/src/primaite/game/agent/observations/acl_observation.py index fc603a8a..934d688e 100644 --- a/src/primaite/game/agent/observations/acl_observation.py +++ b/src/primaite/game/agent/observations/acl_observation.py @@ -1,7 +1,7 @@ from __future__ import annotations from ipaddress import IPv4Address -from typing import Dict, List, Optional, TYPE_CHECKING +from typing import Dict, List, Optional from gymnasium import spaces from gymnasium.core import ObsType @@ -10,8 +10,6 @@ from primaite import getLogger from primaite.game.agent.observations.observations import AbstractObservation, WhereType from primaite.game.agent.utils import access_from_nested_dict, NOT_PRESENT_IN_STATE -if TYPE_CHECKING: - from primaite.game.game import PrimaiteGame _LOGGER = getLogger(__name__) @@ -167,7 +165,7 @@ class ACLObservation(AbstractObservation, identifier="ACL"): ) @classmethod - def from_config(cls, config: ConfigSchema, game: "PrimaiteGame", parent_where: WhereType = []) -> ACLObservation: + def from_config(cls, config: ConfigSchema, parent_where: WhereType = []) -> ACLObservation: """ Create an ACL observation from a configuration schema. diff --git a/src/primaite/game/agent/observations/file_system_observations.py b/src/primaite/game/agent/observations/file_system_observations.py index 3e262055..baf27660 100644 --- a/src/primaite/game/agent/observations/file_system_observations.py +++ b/src/primaite/game/agent/observations/file_system_observations.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Dict, Iterable, List, Optional, TYPE_CHECKING +from typing import Dict, Iterable, List, Optional from gymnasium import spaces from gymnasium.core import ObsType @@ -9,8 +9,6 @@ from primaite import getLogger from primaite.game.agent.observations.observations import AbstractObservation, WhereType from primaite.game.agent.utils import access_from_nested_dict, NOT_PRESENT_IN_STATE -if TYPE_CHECKING: - from primaite.game.game import PrimaiteGame _LOGGER = getLogger(__name__) @@ -94,7 +92,7 @@ class FileObservation(AbstractObservation, identifier="FILE"): return spaces.Dict(space) @classmethod - def from_config(cls, config: ConfigSchema, game: "PrimaiteGame", parent_where: WhereType = []) -> FileObservation: + def from_config(cls, config: ConfigSchema, parent_where: WhereType = []) -> FileObservation: """ Create a file observation from a configuration schema. @@ -193,7 +191,7 @@ class FolderObservation(AbstractObservation, identifier="FOLDER"): return spaces.Dict(shape) @classmethod - def from_config(cls, config: ConfigSchema, game: "PrimaiteGame", parent_where: WhereType = []) -> FolderObservation: + def from_config(cls, config: ConfigSchema, parent_where: WhereType = []) -> FolderObservation: """ Create a folder observation from a configuration schema. @@ -211,5 +209,5 @@ class FolderObservation(AbstractObservation, identifier="FOLDER"): for file_config in config.files: file_config.include_num_access = config.include_num_access - files = [FileObservation.from_config(config=f, game=game, parent_where=where) for f in config.files] + files = [FileObservation.from_config(config=f, parent_where=where) for f in config.files] return cls(where=where, files=files, num_files=config.num_files, include_num_access=config.include_num_access) diff --git a/src/primaite/game/agent/observations/firewall_observation.py b/src/primaite/game/agent/observations/firewall_observation.py index 0a1498b1..97a8f814 100644 --- a/src/primaite/game/agent/observations/firewall_observation.py +++ b/src/primaite/game/agent/observations/firewall_observation.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Dict, List, Optional, TYPE_CHECKING +from typing import Dict, List, Optional from gymnasium import spaces from gymnasium.core import ObsType @@ -10,8 +10,6 @@ from primaite.game.agent.observations.acl_observation import ACLObservation from primaite.game.agent.observations.nic_observations import PortObservation from primaite.game.agent.observations.observations import AbstractObservation, WhereType -if TYPE_CHECKING: - from primaite.game.game import PrimaiteGame _LOGGER = getLogger(__name__) @@ -200,9 +198,7 @@ class FirewallObservation(AbstractObservation, identifier="FIREWALL"): return space @classmethod - def from_config( - cls, config: ConfigSchema, game: "PrimaiteGame", parent_where: WhereType = [] - ) -> FirewallObservation: + def from_config(cls, config: ConfigSchema, parent_where: WhereType = []) -> FirewallObservation: """ Create a firewall observation from a configuration schema. diff --git a/src/primaite/game/agent/observations/host_observations.py b/src/primaite/game/agent/observations/host_observations.py index 6dbde789..b15ede9a 100644 --- a/src/primaite/game/agent/observations/host_observations.py +++ b/src/primaite/game/agent/observations/host_observations.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Dict, List, Optional, TYPE_CHECKING +from typing import Dict, List, Optional from gymnasium import spaces from gymnasium.core import ObsType @@ -12,8 +12,6 @@ from primaite.game.agent.observations.observations import AbstractObservation, W from primaite.game.agent.observations.software_observation import ApplicationObservation, ServiceObservation from primaite.game.agent.utils import access_from_nested_dict, NOT_PRESENT_IN_STATE -if TYPE_CHECKING: - from primaite.game.game import PrimaiteGame _LOGGER = getLogger(__name__) @@ -201,7 +199,7 @@ class HostObservation(AbstractObservation, identifier="HOST"): return spaces.Dict(shape) @classmethod - def from_config(cls, config: ConfigSchema, game: "PrimaiteGame", parent_where: WhereType = []) -> HostObservation: + def from_config(cls, config: ConfigSchema, parent_where: WhereType = []) -> HostObservation: """ Create a host observation from a configuration schema. @@ -225,12 +223,10 @@ class HostObservation(AbstractObservation, identifier="HOST"): for nic_config in config.network_interfaces: nic_config.include_nmne = config.include_nmne - services = [ServiceObservation.from_config(config=c, game=game, parent_where=where) for c in config.services] - applications = [ - ApplicationObservation.from_config(config=c, game=game, parent_where=where) for c in config.applications - ] - folders = [FolderObservation.from_config(config=c, game=game, parent_where=where) for c in config.folders] - nics = [NICObservation.from_config(config=c, game=game, parent_where=where) for c in config.network_interfaces] + services = [ServiceObservation.from_config(config=c, parent_where=where) for c in config.services] + applications = [ApplicationObservation.from_config(config=c, parent_where=where) for c in config.applications] + folders = [FolderObservation.from_config(config=c, parent_where=where) for c in config.folders] + nics = [NICObservation.from_config(config=c, parent_where=where) for c in config.network_interfaces] return cls( where=where, diff --git a/src/primaite/game/agent/observations/link_observation.py b/src/primaite/game/agent/observations/link_observation.py index b55aae46..03a19fa0 100644 --- a/src/primaite/game/agent/observations/link_observation.py +++ b/src/primaite/game/agent/observations/link_observation.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Any, Dict, List, TYPE_CHECKING +from typing import Any, Dict, List from gymnasium import spaces from gymnasium.core import ObsType @@ -9,8 +9,6 @@ from primaite import getLogger from primaite.game.agent.observations.observations import AbstractObservation, WhereType from primaite.game.agent.utils import access_from_nested_dict, NOT_PRESENT_IN_STATE -if TYPE_CHECKING: - from primaite.game.game import PrimaiteGame _LOGGER = getLogger(__name__) @@ -68,14 +66,12 @@ class LinkObservation(AbstractObservation, identifier="LINK"): return spaces.Dict({"PROTOCOLS": spaces.Dict({"ALL": spaces.Discrete(11)})}) @classmethod - def from_config(cls, config: ConfigSchema, game: "PrimaiteGame", parent_where: WhereType = []) -> LinkObservation: + def from_config(cls, config: ConfigSchema, parent_where: WhereType = []) -> LinkObservation: """ Create a link observation from a configuration schema. :param config: Configuration schema containing the necessary information for the link observation. :type config: ConfigSchema - :param game: The PrimaiteGame instance. - :type game: PrimaiteGame :param parent_where: Where in the simulation state dictionary to find the information about this link. A typical location might be ['network', 'links', ]. :type parent_where: WhereType, optional @@ -135,14 +131,12 @@ class LinksObservation(AbstractObservation, identifier="LINKS"): return spaces.Dict({i + 1: l.space for i, l in enumerate(self.links)}) @classmethod - def from_config(cls, config: ConfigSchema, game: "PrimaiteGame", parent_where: WhereType = []) -> LinksObservation: + def from_config(cls, config: ConfigSchema, parent_where: WhereType = []) -> LinksObservation: """ Create a links observation from a configuration schema. :param config: Configuration schema containing the necessary information for the links observation. :type config: ConfigSchema - :param game: The PrimaiteGame instance. - :type game: PrimaiteGame :param parent_where: Where in the simulation state dictionary to find the information about these links. A typical location might be ['network']. :type parent_where: WhereType, optional @@ -151,5 +145,5 @@ class LinksObservation(AbstractObservation, identifier="LINKS"): """ where = parent_where + ["network"] link_cfgs = [LinkObservation.ConfigSchema(link_reference=ref) for ref in config.link_references] - links = [LinkObservation.from_config(c, game=game, parent_where=where) for c in link_cfgs] + links = [LinkObservation.from_config(c, parent_where=where) for c in link_cfgs] return cls(where=where, links=links) diff --git a/src/primaite/game/agent/observations/nic_observations.py b/src/primaite/game/agent/observations/nic_observations.py index 44cc7f8f..afce9095 100644 --- a/src/primaite/game/agent/observations/nic_observations.py +++ b/src/primaite/game/agent/observations/nic_observations.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Dict, Optional, TYPE_CHECKING +from typing import Dict, Optional from gymnasium import spaces from gymnasium.core import ObsType @@ -8,9 +8,6 @@ from gymnasium.core import ObsType from primaite.game.agent.observations.observations import AbstractObservation, WhereType from primaite.game.agent.utils import access_from_nested_dict, NOT_PRESENT_IN_STATE -if TYPE_CHECKING: - from primaite.game.game import PrimaiteGame - class NICObservation(AbstractObservation, identifier="NETWORK_INTERFACE"): """Status information about a network interface within the simulation environment.""" @@ -119,7 +116,7 @@ class NICObservation(AbstractObservation, identifier="NETWORK_INTERFACE"): return space @classmethod - def from_config(cls, config: ConfigSchema, game: "PrimaiteGame", parent_where: WhereType = []) -> NICObservation: + def from_config(cls, config: ConfigSchema, parent_where: WhereType = []) -> NICObservation: """ Create a network interface observation from a configuration schema. @@ -179,7 +176,7 @@ class PortObservation(AbstractObservation, identifier="PORT"): return spaces.Dict({"operating_status": spaces.Discrete(3)}) @classmethod - def from_config(cls, config: ConfigSchema, game: "PrimaiteGame", parent_where: WhereType = []) -> PortObservation: + def from_config(cls, config: ConfigSchema, parent_where: WhereType = []) -> PortObservation: """ Create a port observation from a configuration schema. diff --git a/src/primaite/game/agent/observations/node_observations.py b/src/primaite/game/agent/observations/node_observations.py index f11ffebf..8f7ac0fc 100644 --- a/src/primaite/game/agent/observations/node_observations.py +++ b/src/primaite/game/agent/observations/node_observations.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Dict, List, Optional, TYPE_CHECKING +from typing import Dict, List, Optional from gymnasium import spaces from gymnasium.core import ObsType @@ -12,8 +12,6 @@ from primaite.game.agent.observations.host_observations import HostObservation from primaite.game.agent.observations.observations import AbstractObservation, WhereType from primaite.game.agent.observations.router_observation import RouterObservation -if TYPE_CHECKING: - from primaite.game.game import PrimaiteGame _LOGGER = getLogger(__name__) @@ -152,7 +150,7 @@ class NodesObservation(AbstractObservation, identifier="NODES"): return space @classmethod - def from_config(cls, config: ConfigSchema, game: "PrimaiteGame", parent_where: WhereType = []) -> NodesObservation: + def from_config(cls, config: ConfigSchema, parent_where: WhereType = []) -> NodesObservation: """ Create a nodes observation from a configuration schema. @@ -211,8 +209,8 @@ class NodesObservation(AbstractObservation, identifier="NODES"): if firewall_config.num_rules is None: firewall_config.num_rules = config.num_rules - hosts = [HostObservation.from_config(config=c, game=game, parent_where=where) for c in config.hosts] - routers = [RouterObservation.from_config(config=c, game=game, parent_where=where) for c in config.routers] - firewalls = [FirewallObservation.from_config(config=c, game=game, parent_where=where) for c in config.firewalls] + hosts = [HostObservation.from_config(config=c, parent_where=where) for c in config.hosts] + routers = [RouterObservation.from_config(config=c, parent_where=where) for c in config.routers] + firewalls = [FirewallObservation.from_config(config=c, parent_where=where) for c in config.firewalls] return cls(where=where, hosts=hosts, routers=routers, firewalls=firewalls) diff --git a/src/primaite/game/agent/observations/observation_manager.py b/src/primaite/game/agent/observations/observation_manager.py index 1d428fa8..047acce6 100644 --- a/src/primaite/game/agent/observations/observation_manager.py +++ b/src/primaite/game/agent/observations/observation_manager.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Any, Dict, List, Optional, TYPE_CHECKING +from typing import Any, Dict, List, Optional from gymnasium import spaces from gymnasium.core import ObsType @@ -8,9 +8,6 @@ from pydantic import BaseModel, ConfigDict, model_validator, ValidationError from primaite.game.agent.observations.observations import AbstractObservation, WhereType -if TYPE_CHECKING: - from primaite.game.game import PrimaiteGame - class NestedObservation(AbstractObservation, identifier="CUSTOM"): """Observation type that allows combining other observations into a gymnasium.spaces.Dict space.""" @@ -76,7 +73,7 @@ class NestedObservation(AbstractObservation, identifier="CUSTOM"): return spaces.Dict({label: obs.space for label, obs in self.components.items()}) @classmethod - def from_config(cls, config: ConfigSchema, game: "PrimaiteGame", parent_where: WhereType = []) -> NestedObservation: + def from_config(cls, config: ConfigSchema, parent_where: WhereType = []) -> NestedObservation: """ Read the Nested observation config and create all defined subcomponents. @@ -115,7 +112,7 @@ class NestedObservation(AbstractObservation, identifier="CUSTOM"): instances = dict() for component in config.components: obs_class = AbstractObservation._registry[component.type] - obs_instance = obs_class.from_config(config=obs_class.ConfigSchema(**component.options), game=game) + obs_instance = obs_class.from_config(config=obs_class.ConfigSchema(**component.options)) instances[component.label] = obs_instance return cls(components=instances) @@ -137,9 +134,7 @@ class NullObservation(AbstractObservation, identifier="NONE"): return spaces.Discrete(1) @classmethod - def from_config( - cls, config: NullObservation.ConfigSchema, game: "PrimaiteGame", parent_where: WhereType = [] - ) -> NullObservation: + def from_config(cls, config: NullObservation.ConfigSchema, parent_where: WhereType = []) -> NullObservation: """Instantiate a NullObservation. Accepts parameters to comply with API.""" return cls() @@ -180,7 +175,7 @@ class ObservationManager: return self.obs.space @classmethod - def from_config(cls, config: Optional[Dict], game: "PrimaiteGame") -> "ObservationManager": + def from_config(cls, config: Optional[Dict]) -> "ObservationManager": """ Create observation space from a config. @@ -191,14 +186,12 @@ class ObservationManager: AbstractObservation options: this must adhere to the chosen observation type's ConfigSchema nested class. :type config: Dict - :param game: Reference to the PrimaiteGame object that spawned this observation. - :type game: PrimaiteGame """ if config is None: return cls(NullObservation()) print(config) obs_type = config["type"] obs_class = AbstractObservation._registry[obs_type] - observation = obs_class.from_config(config=obs_class.ConfigSchema(**config["options"]), game=game) + observation = obs_class.from_config(config=obs_class.ConfigSchema(**config["options"])) obs_manager = cls(observation) return obs_manager diff --git a/src/primaite/game/agent/observations/observations.py b/src/primaite/game/agent/observations/observations.py index 6c9db571..0d6ff2a3 100644 --- a/src/primaite/game/agent/observations/observations.py +++ b/src/primaite/game/agent/observations/observations.py @@ -1,6 +1,6 @@ """Manages the observation space for the agent.""" from abc import ABC, abstractmethod -from typing import Any, Dict, Iterable, Type, TYPE_CHECKING +from typing import Any, Dict, Iterable, Type from gymnasium import spaces from gymnasium.core import ObsType @@ -8,8 +8,6 @@ from pydantic import BaseModel, ConfigDict from primaite import getLogger -if TYPE_CHECKING: - from primaite.game.game import PrimaiteGame _LOGGER = getLogger(__name__) WhereType = Iterable[str | int] | None @@ -65,8 +63,6 @@ class AbstractObservation(ABC): @classmethod @abstractmethod - def from_config( - cls, config: ConfigSchema, game: "PrimaiteGame", parent_where: WhereType = [] - ) -> "AbstractObservation": + def from_config(cls, config: ConfigSchema, parent_where: WhereType = []) -> "AbstractObservation": """Create this observation space component form a serialised format.""" return cls() diff --git a/src/primaite/game/agent/observations/router_observation.py b/src/primaite/game/agent/observations/router_observation.py index aeac2766..3f7e6494 100644 --- a/src/primaite/game/agent/observations/router_observation.py +++ b/src/primaite/game/agent/observations/router_observation.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Dict, List, Optional, TYPE_CHECKING +from typing import Dict, List, Optional from gymnasium import spaces from gymnasium.core import ObsType @@ -11,8 +11,6 @@ from primaite.game.agent.observations.nic_observations import PortObservation from primaite.game.agent.observations.observations import AbstractObservation, WhereType from primaite.game.agent.utils import access_from_nested_dict, NOT_PRESENT_IN_STATE -if TYPE_CHECKING: - from primaite.game.game import PrimaiteGame _LOGGER = getLogger(__name__) @@ -112,7 +110,7 @@ class RouterObservation(AbstractObservation, identifier="ROUTER"): return spaces.Dict(shape) @classmethod - def from_config(cls, config: ConfigSchema, game: "PrimaiteGame", parent_where: WhereType = []) -> RouterObservation: + def from_config(cls, config: ConfigSchema, parent_where: WhereType = []) -> RouterObservation: """ Create a router observation from a configuration schema. @@ -142,6 +140,6 @@ class RouterObservation(AbstractObservation, identifier="ROUTER"): if config.ports is None: config.ports = [PortObservation.ConfigSchema(port_id=i + 1) for i in range(config.num_ports)] - ports = [PortObservation.from_config(config=c, game=game, parent_where=where) for c in config.ports] - acl = ACLObservation.from_config(config=config.acl, game=game, parent_where=where) + ports = [PortObservation.from_config(config=c, parent_where=where) for c in config.ports] + acl = ACLObservation.from_config(config=config.acl, parent_where=where) return cls(where=where, ports=ports, num_ports=config.num_ports, acl=acl) diff --git a/src/primaite/game/agent/observations/software_observation.py b/src/primaite/game/agent/observations/software_observation.py index 2c4806d9..f943f540 100644 --- a/src/primaite/game/agent/observations/software_observation.py +++ b/src/primaite/game/agent/observations/software_observation.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Dict, TYPE_CHECKING +from typing import Dict from gymnasium import spaces from gymnasium.core import ObsType @@ -8,9 +8,6 @@ from gymnasium.core import ObsType from primaite.game.agent.observations.observations import AbstractObservation, WhereType from primaite.game.agent.utils import access_from_nested_dict, NOT_PRESENT_IN_STATE -if TYPE_CHECKING: - from primaite.game.game import PrimaiteGame - class ServiceObservation(AbstractObservation, identifier="SERVICE"): """Service observation, shows status of a service in the simulation environment.""" @@ -60,9 +57,7 @@ class ServiceObservation(AbstractObservation, identifier="SERVICE"): return spaces.Dict({"operating_status": spaces.Discrete(7), "health_status": spaces.Discrete(5)}) @classmethod - def from_config( - cls, config: ConfigSchema, game: "PrimaiteGame", parent_where: WhereType = [] - ) -> ServiceObservation: + def from_config(cls, config: ConfigSchema, parent_where: WhereType = []) -> ServiceObservation: """ Create a service observation from a configuration schema. @@ -153,9 +148,7 @@ class ApplicationObservation(AbstractObservation, identifier="APPLICATION"): ) @classmethod - def from_config( - cls, config: ConfigSchema, game: "PrimaiteGame", parent_where: WhereType = [] - ) -> ApplicationObservation: + def from_config(cls, config: ConfigSchema, parent_where: WhereType = []) -> ApplicationObservation: """ Create an application observation from a configuration schema. diff --git a/src/primaite/game/game.py b/src/primaite/game/game.py index 034d11bc..2d007193 100644 --- a/src/primaite/game/game.py +++ b/src/primaite/game/game.py @@ -396,8 +396,8 @@ class PrimaiteGame: # 2. create links between nodes for link_cfg in links_cfg: - node_a = net.nodes[game.ref_map_nodes[link_cfg["endpoint_a_ref"]]] - node_b = net.nodes[game.ref_map_nodes[link_cfg["endpoint_b_ref"]]] + node_a = net.get_node_by_hostname(link_cfg["endpoint_a_ref"]) + node_b = net.get_node_by_hostname(link_cfg["endpoint_b_ref"]) if isinstance(node_a, Switch): endpoint_a = node_a.network_interface[link_cfg["endpoint_a_port"]] else: @@ -419,7 +419,7 @@ class PrimaiteGame: reward_function_cfg = agent_cfg["reward_function"] # CREATE OBSERVATION SPACE - obs_space = ObservationManager.from_config(observation_space_cfg, game) + obs_space = ObservationManager.from_config(observation_space_cfg) # CREATE ACTION SPACE action_space = ActionManager.from_config(game, action_space_cfg) From 698cb83e41596c4d44db6a543fd2400101489ead Mon Sep 17 00:00:00 2001 From: Marek Wolan Date: Wed, 3 Apr 2024 22:20:33 +0100 Subject: [PATCH 091/124] #2450 change link definition schema --- .../_package_data/data_manipulation.yaml | 40 +++++++++---------- .../_package_data/data_manipulation_marl.yaml | 40 +++++++++---------- src/primaite/game/game.py | 4 +- .../assets/configs/bad_primaite_session.yaml | 40 +++++++++---------- tests/assets/configs/basic_firewall.yaml | 16 ++++---- .../configs/basic_switched_network.yaml | 8 ++-- tests/assets/configs/dmz_network.yaml | 32 +++++++-------- .../configs/eval_only_primaite_session.yaml | 40 +++++++++---------- .../configs/firewall_actions_network.yaml | 32 +++++++-------- tests/assets/configs/multi_agent_session.yaml | 40 +++++++++---------- tests/assets/configs/shared_rewards.yaml | 40 +++++++++---------- .../configs/test_application_install.yaml | 40 +++++++++---------- .../assets/configs/test_primaite_session.yaml | 40 +++++++++---------- .../configs/train_only_primaite_session.yaml | 40 +++++++++---------- 14 files changed, 226 insertions(+), 226 deletions(-) diff --git a/src/primaite/config/_package_data/data_manipulation.yaml b/src/primaite/config/_package_data/data_manipulation.yaml index c68480cf..f2e8938b 100644 --- a/src/primaite/config/_package_data/data_manipulation.yaml +++ b/src/primaite/config/_package_data/data_manipulation.yaml @@ -925,43 +925,43 @@ simulation: type: DNSClient links: - - endpoint_a_ref: router_1 + - endpoint_a_hostname: router_1 endpoint_a_port: 1 - endpoint_b_ref: switch_1 + endpoint_b_hostname: switch_1 endpoint_b_port: 8 - - endpoint_a_ref: router_1 + - endpoint_a_hostname: router_1 endpoint_a_port: 2 - endpoint_b_ref: switch_2 + endpoint_b_hostname: switch_2 endpoint_b_port: 8 - - endpoint_a_ref: switch_1 + - endpoint_a_hostname: switch_1 endpoint_a_port: 1 - endpoint_b_ref: domain_controller + endpoint_b_hostname: domain_controller endpoint_b_port: 1 - - endpoint_a_ref: switch_1 + - endpoint_a_hostname: switch_1 endpoint_a_port: 2 - endpoint_b_ref: web_server + endpoint_b_hostname: web_server endpoint_b_port: 1 - - endpoint_a_ref: switch_1 + - endpoint_a_hostname: switch_1 endpoint_a_port: 3 - endpoint_b_ref: database_server + endpoint_b_hostname: database_server endpoint_b_port: 1 - - endpoint_a_ref: switch_1 + - endpoint_a_hostname: switch_1 endpoint_a_port: 4 - endpoint_b_ref: backup_server + endpoint_b_hostname: backup_server endpoint_b_port: 1 - - endpoint_a_ref: switch_1 + - endpoint_a_hostname: switch_1 endpoint_a_port: 7 - endpoint_b_ref: security_suite + endpoint_b_hostname: security_suite endpoint_b_port: 1 - - endpoint_a_ref: switch_2 + - endpoint_a_hostname: switch_2 endpoint_a_port: 1 - endpoint_b_ref: client_1 + endpoint_b_hostname: client_1 endpoint_b_port: 1 - - endpoint_a_ref: switch_2 + - endpoint_a_hostname: switch_2 endpoint_a_port: 2 - endpoint_b_ref: client_2 + endpoint_b_hostname: client_2 endpoint_b_port: 1 - - endpoint_a_ref: switch_2 + - endpoint_a_hostname: switch_2 endpoint_a_port: 7 - endpoint_b_ref: security_suite + endpoint_b_hostname: security_suite endpoint_b_port: 2 diff --git a/src/primaite/config/_package_data/data_manipulation_marl.yaml b/src/primaite/config/_package_data/data_manipulation_marl.yaml index 9ec2a1f2..ee9f094f 100644 --- a/src/primaite/config/_package_data/data_manipulation_marl.yaml +++ b/src/primaite/config/_package_data/data_manipulation_marl.yaml @@ -1505,43 +1505,43 @@ simulation: links: - - endpoint_a_ref: router_1 + - endpoint_a_hostname: router_1 endpoint_a_port: 1 - endpoint_b_ref: switch_1 + endpoint_b_hostname: switch_1 endpoint_b_port: 8 - - endpoint_a_ref: router_1 + - endpoint_a_hostname: router_1 endpoint_a_port: 2 - endpoint_b_ref: switch_2 + endpoint_b_hostname: switch_2 endpoint_b_port: 8 - - endpoint_a_ref: switch_1 + - endpoint_a_hostname: switch_1 endpoint_a_port: 1 - endpoint_b_ref: domain_controller + endpoint_b_hostname: domain_controller endpoint_b_port: 1 - - endpoint_a_ref: switch_1 + - endpoint_a_hostname: switch_1 endpoint_a_port: 2 - endpoint_b_ref: web_server + endpoint_b_hostname: web_server endpoint_b_port: 1 - - endpoint_a_ref: switch_1 + - endpoint_a_hostname: switch_1 endpoint_a_port: 3 - endpoint_b_ref: database_server + endpoint_b_hostname: database_server endpoint_b_port: 1 - - endpoint_a_ref: switch_1 + - endpoint_a_hostname: switch_1 endpoint_a_port: 4 - endpoint_b_ref: backup_server + endpoint_b_hostname: backup_server endpoint_b_port: 1 - - endpoint_a_ref: switch_1 + - endpoint_a_hostname: switch_1 endpoint_a_port: 7 - endpoint_b_ref: security_suite + endpoint_b_hostname: security_suite endpoint_b_port: 1 - - endpoint_a_ref: switch_2 + - endpoint_a_hostname: switch_2 endpoint_a_port: 1 - endpoint_b_ref: client_1 + endpoint_b_hostname: client_1 endpoint_b_port: 1 - - endpoint_a_ref: switch_2 + - endpoint_a_hostname: switch_2 endpoint_a_port: 2 - endpoint_b_ref: client_2 + endpoint_b_hostname: client_2 endpoint_b_port: 1 - - endpoint_a_ref: switch_2 + - endpoint_a_hostname: switch_2 endpoint_a_port: 7 - endpoint_b_ref: security_suite + endpoint_b_hostname: security_suite endpoint_b_port: 2 diff --git a/src/primaite/game/game.py b/src/primaite/game/game.py index 2d007193..bfbffc4d 100644 --- a/src/primaite/game/game.py +++ b/src/primaite/game/game.py @@ -396,8 +396,8 @@ class PrimaiteGame: # 2. create links between nodes for link_cfg in links_cfg: - node_a = net.get_node_by_hostname(link_cfg["endpoint_a_ref"]) - node_b = net.get_node_by_hostname(link_cfg["endpoint_b_ref"]) + node_a = net.get_node_by_hostname(link_cfg["endpoint_a_hostname"]) + node_b = net.get_node_by_hostname(link_cfg["endpoint_b_hostname"]) if isinstance(node_a, Switch): endpoint_a = node_a.network_interface[link_cfg["endpoint_a_port"]] else: diff --git a/tests/assets/configs/bad_primaite_session.yaml b/tests/assets/configs/bad_primaite_session.yaml index 19cad586..493b0452 100644 --- a/tests/assets/configs/bad_primaite_session.yaml +++ b/tests/assets/configs/bad_primaite_session.yaml @@ -687,43 +687,43 @@ simulation: type: DNSClient links: - - endpoint_a_ref: router_1 + - endpoint_a_hostname: router_1 endpoint_a_port: 1 - endpoint_b_ref: switch_1 + endpoint_b_hostname: switch_1 endpoint_b_port: 8 - - endpoint_a_ref: router_1 + - endpoint_a_hostname: router_1 endpoint_a_port: 2 - endpoint_b_ref: switch_2 + endpoint_b_hostname: switch_2 endpoint_b_port: 8 - - endpoint_a_ref: switch_1 + - endpoint_a_hostname: switch_1 endpoint_a_port: 1 - endpoint_b_ref: domain_controller + endpoint_b_hostname: domain_controller endpoint_b_port: 1 - - endpoint_a_ref: switch_1 + - endpoint_a_hostname: switch_1 endpoint_a_port: 2 - endpoint_b_ref: web_server + endpoint_b_hostname: web_server endpoint_b_port: 1 - - endpoint_a_ref: switch_1 + - endpoint_a_hostname: switch_1 endpoint_a_port: 3 - endpoint_b_ref: database_server + endpoint_b_hostname: database_server endpoint_b_port: 1 - - endpoint_a_ref: switch_1 + - endpoint_a_hostname: switch_1 endpoint_a_port: 4 - endpoint_b_ref: backup_server + endpoint_b_hostname: backup_server endpoint_b_port: 1 - - endpoint_a_ref: switch_1 + - endpoint_a_hostname: switch_1 endpoint_a_port: 7 - endpoint_b_ref: security_suite + endpoint_b_hostname: security_suite endpoint_b_port: 1 - - endpoint_a_ref: switch_2 + - endpoint_a_hostname: switch_2 endpoint_a_port: 1 - endpoint_b_ref: client_1 + endpoint_b_hostname: client_1 endpoint_b_port: 1 - - endpoint_a_ref: switch_2 + - endpoint_a_hostname: switch_2 endpoint_a_port: 2 - endpoint_b_ref: client_2 + endpoint_b_hostname: client_2 endpoint_b_port: 1 - - endpoint_a_ref: switch_2 + - endpoint_a_hostname: switch_2 endpoint_a_port: 7 - endpoint_b_ref: security_suite + endpoint_b_hostname: security_suite endpoint_b_port: 2 diff --git a/tests/assets/configs/basic_firewall.yaml b/tests/assets/configs/basic_firewall.yaml index da293167..3aa2ca2d 100644 --- a/tests/assets/configs/basic_firewall.yaml +++ b/tests/assets/configs/basic_firewall.yaml @@ -161,22 +161,22 @@ simulation: links: - ref: switch_1___client_1 - endpoint_a_ref: switch_1 + endpoint_a_hostname: switch_1 endpoint_a_port: 1 - endpoint_b_ref: client_1 + endpoint_b_hostname: client_1 endpoint_b_port: 1 - ref: switch_2___client_2 - endpoint_a_ref: switch_2 + endpoint_a_hostname: switch_2 endpoint_a_port: 1 - endpoint_b_ref: client_2 + endpoint_b_hostname: client_2 endpoint_b_port: 1 - ref: switch_1___firewall - endpoint_a_ref: switch_1 + endpoint_a_hostname: switch_1 endpoint_a_port: 2 - endpoint_b_ref: firewall + endpoint_b_hostname: firewall endpoint_b_port: 1 - ref: switch_2___firewall - endpoint_a_ref: switch_2 + endpoint_a_hostname: switch_2 endpoint_a_port: 2 - endpoint_b_ref: firewall + endpoint_b_hostname: firewall endpoint_b_port: 2 diff --git a/tests/assets/configs/basic_switched_network.yaml b/tests/assets/configs/basic_switched_network.yaml index 009f239a..ab55a6ed 100644 --- a/tests/assets/configs/basic_switched_network.yaml +++ b/tests/assets/configs/basic_switched_network.yaml @@ -162,11 +162,11 @@ simulation: # pre installed services and applications links: - - endpoint_a_ref: switch_1 + - endpoint_a_hostname: switch_1 endpoint_a_port: 1 - endpoint_b_ref: client_1 + endpoint_b_hostname: client_1 endpoint_b_port: 1 - - endpoint_a_ref: switch_1 + - endpoint_a_hostname: switch_1 endpoint_a_port: 2 - endpoint_b_ref: client_2 + endpoint_b_hostname: client_2 endpoint_b_port: 1 diff --git a/tests/assets/configs/dmz_network.yaml b/tests/assets/configs/dmz_network.yaml index acac301a..0930bc7d 100644 --- a/tests/assets/configs/dmz_network.yaml +++ b/tests/assets/configs/dmz_network.yaml @@ -267,42 +267,42 @@ simulation: type: DNSServer links: - ref: client_1___switch_1 - endpoint_a_ref: client_1 + endpoint_a_hostname: client_1 endpoint_a_port: 1 - endpoint_b_ref: switch_1 + endpoint_b_hostname: switch_1 endpoint_b_port: 1 - ref: router_1___switch_1 - endpoint_a_ref: router_1 + endpoint_a_hostname: router_1 endpoint_a_port: 1 - endpoint_b_ref: switch_1 + endpoint_b_hostname: switch_1 endpoint_b_port: 8 - ref: router_1___firewall - endpoint_a_ref: firewall + endpoint_a_hostname: firewall endpoint_a_port: 2 # internal firewall port - endpoint_b_ref: router_1 + endpoint_b_hostname: router_1 endpoint_b_port: 2 - ref: firewall___switch_2 - endpoint_a_ref: firewall + endpoint_a_hostname: firewall endpoint_a_port: 3 # dmz firewall port - endpoint_b_ref: switch_2 + endpoint_b_hostname: switch_2 endpoint_b_port: 8 - ref: dmz_server___switch_2 - endpoint_a_ref: dmz_server + endpoint_a_hostname: dmz_server endpoint_a_port: 1 - endpoint_b_ref: switch_2 + endpoint_b_hostname: switch_2 endpoint_b_port: 1 - ref: firewall___switch_3 - endpoint_a_ref: firewall + endpoint_a_hostname: firewall endpoint_a_port: 1 # external firewall port - endpoint_b_ref: switch_3 + endpoint_b_hostname: switch_3 endpoint_b_port: 8 - ref: external_computer___switch_3 - endpoint_a_ref: external_computer + endpoint_a_hostname: external_computer endpoint_a_port: 1 - endpoint_b_ref: switch_3 + endpoint_b_hostname: switch_3 endpoint_b_port: 1 - ref: external_server___switch_3 - endpoint_a_ref: external_server + endpoint_a_hostname: external_server endpoint_a_port: 1 - endpoint_b_ref: switch_3 + endpoint_b_hostname: switch_3 endpoint_b_port: 2 diff --git a/tests/assets/configs/eval_only_primaite_session.yaml b/tests/assets/configs/eval_only_primaite_session.yaml index c342ed72..918f00ca 100644 --- a/tests/assets/configs/eval_only_primaite_session.yaml +++ b/tests/assets/configs/eval_only_primaite_session.yaml @@ -703,43 +703,43 @@ simulation: type: DNSClient links: - - endpoint_a_ref: router_1 + - endpoint_a_hostname: router_1 endpoint_a_port: 1 - endpoint_b_ref: switch_1 + endpoint_b_hostname: switch_1 endpoint_b_port: 8 - - endpoint_a_ref: router_1 + - endpoint_a_hostname: router_1 endpoint_a_port: 2 - endpoint_b_ref: switch_2 + endpoint_b_hostname: switch_2 endpoint_b_port: 8 - - endpoint_a_ref: switch_1 + - endpoint_a_hostname: switch_1 endpoint_a_port: 1 - endpoint_b_ref: domain_controller + endpoint_b_hostname: domain_controller endpoint_b_port: 1 - - endpoint_a_ref: switch_1 + - endpoint_a_hostname: switch_1 endpoint_a_port: 2 - endpoint_b_ref: web_server + endpoint_b_hostname: web_server endpoint_b_port: 1 - - endpoint_a_ref: switch_1 + - endpoint_a_hostname: switch_1 endpoint_a_port: 3 - endpoint_b_ref: database_server + endpoint_b_hostname: database_server endpoint_b_port: 1 - - endpoint_a_ref: switch_1 + - endpoint_a_hostname: switch_1 endpoint_a_port: 4 - endpoint_b_ref: backup_server + endpoint_b_hostname: backup_server endpoint_b_port: 1 - - endpoint_a_ref: switch_1 + - endpoint_a_hostname: switch_1 endpoint_a_port: 7 - endpoint_b_ref: security_suite + endpoint_b_hostname: security_suite endpoint_b_port: 1 - - endpoint_a_ref: switch_2 + - endpoint_a_hostname: switch_2 endpoint_a_port: 1 - endpoint_b_ref: client_1 + endpoint_b_hostname: client_1 endpoint_b_port: 1 - - endpoint_a_ref: switch_2 + - endpoint_a_hostname: switch_2 endpoint_a_port: 2 - endpoint_b_ref: client_2 + endpoint_b_hostname: client_2 endpoint_b_port: 1 - - endpoint_a_ref: switch_2 + - endpoint_a_hostname: switch_2 endpoint_a_port: 7 - endpoint_b_ref: security_suite + endpoint_b_hostname: security_suite endpoint_b_port: 2 diff --git a/tests/assets/configs/firewall_actions_network.yaml b/tests/assets/configs/firewall_actions_network.yaml index cf10505e..4e134fe6 100644 --- a/tests/assets/configs/firewall_actions_network.yaml +++ b/tests/assets/configs/firewall_actions_network.yaml @@ -461,42 +461,42 @@ simulation: type: DNSServer links: - ref: client_1___switch_1 - endpoint_a_ref: client_1 + endpoint_a_hostname: client_1 endpoint_a_port: 1 - endpoint_b_ref: switch_1 + endpoint_b_hostname: switch_1 endpoint_b_port: 1 - ref: router_1___switch_1 - endpoint_a_ref: router_1 + endpoint_a_hostname: router_1 endpoint_a_port: 1 - endpoint_b_ref: switch_1 + endpoint_b_hostname: switch_1 endpoint_b_port: 8 - ref: router_1___firewall - endpoint_a_ref: firewall + endpoint_a_hostname: firewall endpoint_a_port: 2 # internal firewall port - endpoint_b_ref: router_1 + endpoint_b_hostname: router_1 endpoint_b_port: 2 - ref: firewall___switch_2 - endpoint_a_ref: firewall + endpoint_a_hostname: firewall endpoint_a_port: 3 # dmz firewall port - endpoint_b_ref: switch_2 + endpoint_b_hostname: switch_2 endpoint_b_port: 8 - ref: dmz_server___switch_2 - endpoint_a_ref: dmz_server + endpoint_a_hostname: dmz_server endpoint_a_port: 1 - endpoint_b_ref: switch_2 + endpoint_b_hostname: switch_2 endpoint_b_port: 1 - ref: firewall___switch_3 - endpoint_a_ref: firewall + endpoint_a_hostname: firewall endpoint_a_port: 1 # external firewall port - endpoint_b_ref: switch_3 + endpoint_b_hostname: switch_3 endpoint_b_port: 8 - ref: external_computer___switch_3 - endpoint_a_ref: external_computer + endpoint_a_hostname: external_computer endpoint_a_port: 1 - endpoint_b_ref: switch_3 + endpoint_b_hostname: switch_3 endpoint_b_port: 1 - ref: external_server___switch_3 - endpoint_a_ref: external_server + endpoint_a_hostname: external_server endpoint_a_port: 1 - endpoint_b_ref: switch_3 + endpoint_b_hostname: switch_3 endpoint_b_port: 2 diff --git a/tests/assets/configs/multi_agent_session.yaml b/tests/assets/configs/multi_agent_session.yaml index 35431064..e4342582 100644 --- a/tests/assets/configs/multi_agent_session.yaml +++ b/tests/assets/configs/multi_agent_session.yaml @@ -1162,43 +1162,43 @@ simulation: type: DNSClient links: - - endpoint_a_ref: router_1 + - endpoint_a_hostname: router_1 endpoint_a_port: 1 - endpoint_b_ref: switch_1 + endpoint_b_hostname: switch_1 endpoint_b_port: 8 - - endpoint_a_ref: router_1 + - endpoint_a_hostname: router_1 endpoint_a_port: 2 - endpoint_b_ref: switch_2 + endpoint_b_hostname: switch_2 endpoint_b_port: 8 - - endpoint_a_ref: switch_1 + - endpoint_a_hostname: switch_1 endpoint_a_port: 1 - endpoint_b_ref: domain_controller + endpoint_b_hostname: domain_controller endpoint_b_port: 1 - - endpoint_a_ref: switch_1 + - endpoint_a_hostname: switch_1 endpoint_a_port: 2 - endpoint_b_ref: web_server + endpoint_b_hostname: web_server endpoint_b_port: 1 - - endpoint_a_ref: switch_1 + - endpoint_a_hostname: switch_1 endpoint_a_port: 3 - endpoint_b_ref: database_server + endpoint_b_hostname: database_server endpoint_b_port: 1 - - endpoint_a_ref: switch_1 + - endpoint_a_hostname: switch_1 endpoint_a_port: 4 - endpoint_b_ref: backup_server + endpoint_b_hostname: backup_server endpoint_b_port: 1 - - endpoint_a_ref: switch_1 + - endpoint_a_hostname: switch_1 endpoint_a_port: 7 - endpoint_b_ref: security_suite + endpoint_b_hostname: security_suite endpoint_b_port: 1 - - endpoint_a_ref: switch_2 + - endpoint_a_hostname: switch_2 endpoint_a_port: 1 - endpoint_b_ref: client_1 + endpoint_b_hostname: client_1 endpoint_b_port: 1 - - endpoint_a_ref: switch_2 + - endpoint_a_hostname: switch_2 endpoint_a_port: 2 - endpoint_b_ref: client_2 + endpoint_b_hostname: client_2 endpoint_b_port: 1 - - endpoint_a_ref: switch_2 + - endpoint_a_hostname: switch_2 endpoint_a_port: 7 - endpoint_b_ref: security_suite + endpoint_b_hostname: security_suite endpoint_b_port: 2 diff --git a/tests/assets/configs/shared_rewards.yaml b/tests/assets/configs/shared_rewards.yaml index 9cf4d17d..7df6802c 100644 --- a/tests/assets/configs/shared_rewards.yaml +++ b/tests/assets/configs/shared_rewards.yaml @@ -921,43 +921,43 @@ simulation: links: - - endpoint_a_ref: router_1 + - endpoint_a_hostname: router_1 endpoint_a_port: 1 - endpoint_b_ref: switch_1 + endpoint_b_hostname: switch_1 endpoint_b_port: 8 - - endpoint_a_ref: router_1 + - endpoint_a_hostname: router_1 endpoint_a_port: 2 - endpoint_b_ref: switch_2 + endpoint_b_hostname: switch_2 endpoint_b_port: 8 - - endpoint_a_ref: switch_1 + - endpoint_a_hostname: switch_1 endpoint_a_port: 1 - endpoint_b_ref: domain_controller + endpoint_b_hostname: domain_controller endpoint_b_port: 1 - - endpoint_a_ref: switch_1 + - endpoint_a_hostname: switch_1 endpoint_a_port: 2 - endpoint_b_ref: web_server + endpoint_b_hostname: web_server endpoint_b_port: 1 - - endpoint_a_ref: switch_1 + - endpoint_a_hostname: switch_1 endpoint_a_port: 3 - endpoint_b_ref: database_server + endpoint_b_hostname: database_server endpoint_b_port: 1 - - endpoint_a_ref: switch_1 + - endpoint_a_hostname: switch_1 endpoint_a_port: 4 - endpoint_b_ref: backup_server + endpoint_b_hostname: backup_server endpoint_b_port: 1 - - endpoint_a_ref: switch_1 + - endpoint_a_hostname: switch_1 endpoint_a_port: 7 - endpoint_b_ref: security_suite + endpoint_b_hostname: security_suite endpoint_b_port: 1 - - endpoint_a_ref: switch_2 + - endpoint_a_hostname: switch_2 endpoint_a_port: 1 - endpoint_b_ref: client_1 + endpoint_b_hostname: client_1 endpoint_b_port: 1 - - endpoint_a_ref: switch_2 + - endpoint_a_hostname: switch_2 endpoint_a_port: 2 - endpoint_b_ref: client_2 + endpoint_b_hostname: client_2 endpoint_b_port: 1 - - endpoint_a_ref: switch_2 + - endpoint_a_hostname: switch_2 endpoint_a_port: 7 - endpoint_b_ref: security_suite + endpoint_b_hostname: security_suite endpoint_b_port: 2 diff --git a/tests/assets/configs/test_application_install.yaml b/tests/assets/configs/test_application_install.yaml index d2e85f30..a2059913 100644 --- a/tests/assets/configs/test_application_install.yaml +++ b/tests/assets/configs/test_application_install.yaml @@ -953,43 +953,43 @@ simulation: links: - - endpoint_a_ref: router_1 + - endpoint_a_hostname: router_1 endpoint_a_port: 1 - endpoint_b_ref: switch_1 + endpoint_b_hostname: switch_1 endpoint_b_port: 8 - - endpoint_a_ref: router_1 + - endpoint_a_hostname: router_1 endpoint_a_port: 2 - endpoint_b_ref: switch_2 + endpoint_b_hostname: switch_2 endpoint_b_port: 8 - - endpoint_a_ref: switch_1 + - endpoint_a_hostname: switch_1 endpoint_a_port: 1 - endpoint_b_ref: domain_controller + endpoint_b_hostname: domain_controller endpoint_b_port: 1 - - endpoint_a_ref: switch_1 + - endpoint_a_hostname: switch_1 endpoint_a_port: 2 - endpoint_b_ref: web_server + endpoint_b_hostname: web_server endpoint_b_port: 1 - - endpoint_a_ref: switch_1 + - endpoint_a_hostname: switch_1 endpoint_a_port: 3 - endpoint_b_ref: database_server + endpoint_b_hostname: database_server endpoint_b_port: 1 - - endpoint_a_ref: switch_1 + - endpoint_a_hostname: switch_1 endpoint_a_port: 4 - endpoint_b_ref: backup_server + endpoint_b_hostname: backup_server endpoint_b_port: 1 - - endpoint_a_ref: switch_1 + - endpoint_a_hostname: switch_1 endpoint_a_port: 7 - endpoint_b_ref: security_suite + endpoint_b_hostname: security_suite endpoint_b_port: 1 - - endpoint_a_ref: switch_2 + - endpoint_a_hostname: switch_2 endpoint_a_port: 1 - endpoint_b_ref: client_1 + endpoint_b_hostname: client_1 endpoint_b_port: 1 - - endpoint_a_ref: switch_2 + - endpoint_a_hostname: switch_2 endpoint_a_port: 2 - endpoint_b_ref: client_2 + endpoint_b_hostname: client_2 endpoint_b_port: 1 - - endpoint_a_ref: switch_2 + - endpoint_a_hostname: switch_2 endpoint_a_port: 7 - endpoint_b_ref: security_suite + endpoint_b_hostname: security_suite endpoint_b_port: 2 diff --git a/tests/assets/configs/test_primaite_session.yaml b/tests/assets/configs/test_primaite_session.yaml index 1fd489ec..fc72cfd7 100644 --- a/tests/assets/configs/test_primaite_session.yaml +++ b/tests/assets/configs/test_primaite_session.yaml @@ -743,43 +743,43 @@ simulation: protocol: ICMP links: - - endpoint_a_ref: router_1 + - endpoint_a_hostname: router_1 endpoint_a_port: 1 - endpoint_b_ref: switch_1 + endpoint_b_hostname: switch_1 endpoint_b_port: 8 - - endpoint_a_ref: router_1 + - endpoint_a_hostname: router_1 endpoint_a_port: 2 - endpoint_b_ref: switch_2 + endpoint_b_hostname: switch_2 endpoint_b_port: 8 - - endpoint_a_ref: switch_1 + - endpoint_a_hostname: switch_1 endpoint_a_port: 1 - endpoint_b_ref: domain_controller + endpoint_b_hostname: domain_controller endpoint_b_port: 1 - - endpoint_a_ref: switch_1 + - endpoint_a_hostname: switch_1 endpoint_a_port: 2 - endpoint_b_ref: web_server + endpoint_b_hostname: web_server endpoint_b_port: 1 - - endpoint_a_ref: switch_1 + - endpoint_a_hostname: switch_1 endpoint_a_port: 3 - endpoint_b_ref: database_server + endpoint_b_hostname: database_server endpoint_b_port: 1 - - endpoint_a_ref: switch_1 + - endpoint_a_hostname: switch_1 endpoint_a_port: 4 - endpoint_b_ref: backup_server + endpoint_b_hostname: backup_server endpoint_b_port: 1 - - endpoint_a_ref: switch_1 + - endpoint_a_hostname: switch_1 endpoint_a_port: 7 - endpoint_b_ref: security_suite + endpoint_b_hostname: security_suite endpoint_b_port: 1 - - endpoint_a_ref: switch_2 + - endpoint_a_hostname: switch_2 endpoint_a_port: 1 - endpoint_b_ref: client_1 + endpoint_b_hostname: client_1 endpoint_b_port: 1 - - endpoint_a_ref: switch_2 + - endpoint_a_hostname: switch_2 endpoint_a_port: 2 - endpoint_b_ref: client_2 + endpoint_b_hostname: client_2 endpoint_b_port: 1 - - endpoint_a_ref: switch_2 + - endpoint_a_hostname: switch_2 endpoint_a_port: 7 - endpoint_b_ref: security_suite + endpoint_b_hostname: security_suite endpoint_b_port: 2 diff --git a/tests/assets/configs/train_only_primaite_session.yaml b/tests/assets/configs/train_only_primaite_session.yaml index ca26fc62..b083505e 100644 --- a/tests/assets/configs/train_only_primaite_session.yaml +++ b/tests/assets/configs/train_only_primaite_session.yaml @@ -710,43 +710,43 @@ simulation: type: DNSClient links: - - endpoint_a_ref: router_1 + - endpoint_a_hostname: router_1 endpoint_a_port: 1 - endpoint_b_ref: switch_1 + endpoint_b_hostname: switch_1 endpoint_b_port: 8 - - endpoint_a_ref: router_1 + - endpoint_a_hostname: router_1 endpoint_a_port: 2 - endpoint_b_ref: switch_2 + endpoint_b_hostname: switch_2 endpoint_b_port: 8 - - endpoint_a_ref: switch_1 + - endpoint_a_hostname: switch_1 endpoint_a_port: 1 - endpoint_b_ref: domain_controller + endpoint_b_hostname: domain_controller endpoint_b_port: 1 - - endpoint_a_ref: switch_1 + - endpoint_a_hostname: switch_1 endpoint_a_port: 2 - endpoint_b_ref: web_server + endpoint_b_hostname: web_server endpoint_b_port: 1 - - endpoint_a_ref: switch_1 + - endpoint_a_hostname: switch_1 endpoint_a_port: 3 - endpoint_b_ref: database_server + endpoint_b_hostname: database_server endpoint_b_port: 1 - - endpoint_a_ref: switch_1 + - endpoint_a_hostname: switch_1 endpoint_a_port: 4 - endpoint_b_ref: backup_server + endpoint_b_hostname: backup_server endpoint_b_port: 1 - - endpoint_a_ref: switch_1 + - endpoint_a_hostname: switch_1 endpoint_a_port: 7 - endpoint_b_ref: security_suite + endpoint_b_hostname: security_suite endpoint_b_port: 1 - - endpoint_a_ref: switch_2 + - endpoint_a_hostname: switch_2 endpoint_a_port: 1 - endpoint_b_ref: client_1 + endpoint_b_hostname: client_1 endpoint_b_port: 1 - - endpoint_a_ref: switch_2 + - endpoint_a_hostname: switch_2 endpoint_a_port: 2 - endpoint_b_ref: client_2 + endpoint_b_hostname: client_2 endpoint_b_port: 1 - - endpoint_a_ref: switch_2 + - endpoint_a_hostname: switch_2 endpoint_a_port: 7 - endpoint_b_ref: security_suite + endpoint_b_hostname: security_suite endpoint_b_port: 2 From 3b4962830a9d9763862b71ff4eeef2ec36a7c113 Mon Sep 17 00:00:00 2001 From: Marek Wolan Date: Wed, 3 Apr 2024 22:52:06 +0100 Subject: [PATCH 092/124] #2450 remove unused ref maps in PrimaiteGame --- .../_package_data/data_manipulation.yaml | 72 +++++++------------ .../_package_data/data_manipulation_marl.yaml | 72 +++++++------------ src/primaite/game/game.py | 15 ---- .../assets/configs/bad_primaite_session.yaml | 57 +++++---------- tests/assets/configs/basic_firewall.yaml | 27 +++---- .../configs/basic_switched_network.yaml | 45 ++++-------- tests/assets/configs/dmz_network.yaml | 54 +++++--------- .../configs/eval_only_primaite_session.yaml | 57 +++++---------- .../configs/firewall_actions_network.yaml | 54 +++++--------- tests/assets/configs/multi_agent_session.yaml | 57 +++++---------- tests/assets/configs/shared_rewards.yaml | 72 +++++++------------ .../configs/test_application_install.yaml | 72 +++++++------------ .../assets/configs/test_primaite_session.yaml | 63 ++++++---------- .../configs/train_only_primaite_session.yaml | 57 +++++---------- 14 files changed, 253 insertions(+), 521 deletions(-) diff --git a/src/primaite/config/_package_data/data_manipulation.yaml b/src/primaite/config/_package_data/data_manipulation.yaml index f2e8938b..deda5d73 100644 --- a/src/primaite/config/_package_data/data_manipulation.yaml +++ b/src/primaite/config/_package_data/data_manipulation.yaml @@ -756,8 +756,7 @@ simulation: - DELETE nodes: - - ref: router_1 - hostname: router_1 + - hostname: router_1 type: router num_ports: 5 ports: @@ -792,74 +791,61 @@ simulation: action: PERMIT protocol: ICMP - - ref: switch_1 - hostname: switch_1 + - hostname: switch_1 type: switch num_ports: 8 - - ref: switch_2 - hostname: switch_2 + - hostname: switch_2 type: switch num_ports: 8 - - ref: domain_controller - hostname: domain_controller + - hostname: domain_controller type: server ip_address: 192.168.1.10 subnet_mask: 255.255.255.0 default_gateway: 192.168.1.1 services: - - ref: domain_controller_dns_server - type: DNSServer + - type: DNSServer options: domain_mapping: arcd.com: 192.168.1.12 # web server - - ref: web_server - hostname: web_server + - hostname: web_server type: server ip_address: 192.168.1.12 subnet_mask: 255.255.255.0 default_gateway: 192.168.1.1 dns_server: 192.168.1.10 services: - - ref: web_server_web_service - type: WebServer + - type: WebServer applications: - - ref: web_server_database_client - type: DatabaseClient + - type: DatabaseClient options: db_server_ip: 192.168.1.14 - - ref: database_server - hostname: database_server + - hostname: database_server type: server ip_address: 192.168.1.14 subnet_mask: 255.255.255.0 default_gateway: 192.168.1.1 dns_server: 192.168.1.10 services: - - ref: database_service - type: DatabaseService + - type: DatabaseService options: backup_server_ip: 192.168.1.16 - - ref: database_ftp_client - type: FTPClient + - type: FTPClient - - ref: backup_server - hostname: backup_server + - hostname: backup_server type: server ip_address: 192.168.1.16 subnet_mask: 255.255.255.0 default_gateway: 192.168.1.1 dns_server: 192.168.1.10 services: - - ref: backup_service - type: FTPServer + - type: FTPServer - - ref: security_suite - hostname: security_suite + - hostname: security_suite type: server ip_address: 192.168.1.110 subnet_mask: 255.255.255.0 @@ -870,59 +856,49 @@ simulation: ip_address: 192.168.10.110 subnet_mask: 255.255.255.0 - - ref: client_1 - hostname: client_1 + - hostname: client_1 type: computer ip_address: 192.168.10.21 subnet_mask: 255.255.255.0 default_gateway: 192.168.10.1 dns_server: 192.168.1.10 applications: - - ref: data_manipulation_bot - type: DataManipulationBot + - type: DataManipulationBot options: port_scan_p_of_success: 0.8 data_manipulation_p_of_success: 0.8 payload: "DELETE" server_ip: 192.168.1.14 - - ref: client_1_web_browser - type: WebBrowser + - type: WebBrowser options: target_url: http://arcd.com/users/ - - ref: client_1_database_client - type: DatabaseClient + - type: DatabaseClient options: db_server_ip: 192.168.1.14 services: - - ref: client_1_dns_client - type: DNSClient + - type: DNSClient - - ref: client_2 - hostname: client_2 + - hostname: client_2 type: computer ip_address: 192.168.10.22 subnet_mask: 255.255.255.0 default_gateway: 192.168.10.1 dns_server: 192.168.1.10 applications: - - ref: client_2_web_browser - type: WebBrowser + - type: WebBrowser options: target_url: http://arcd.com/users/ - - ref: data_manipulation_bot - type: DataManipulationBot + - type: DataManipulationBot options: port_scan_p_of_success: 0.8 data_manipulation_p_of_success: 0.8 payload: "DELETE" server_ip: 192.168.1.14 - - ref: client_2_database_client - type: DatabaseClient + - type: DatabaseClient options: db_server_ip: 192.168.1.14 services: - - ref: client_2_dns_client - type: DNSClient + - type: DNSClient links: - endpoint_a_hostname: router_1 diff --git a/src/primaite/config/_package_data/data_manipulation_marl.yaml b/src/primaite/config/_package_data/data_manipulation_marl.yaml index ee9f094f..653ddfd3 100644 --- a/src/primaite/config/_package_data/data_manipulation_marl.yaml +++ b/src/primaite/config/_package_data/data_manipulation_marl.yaml @@ -1334,8 +1334,7 @@ simulation: - DELETE nodes: - - ref: router_1 - hostname: router_1 + - hostname: router_1 type: router num_ports: 5 ports: @@ -1370,74 +1369,61 @@ simulation: action: PERMIT protocol: ICMP - - ref: switch_1 - hostname: switch_1 + - hostname: switch_1 type: switch num_ports: 8 - - ref: switch_2 - hostname: switch_2 + - hostname: switch_2 type: switch num_ports: 8 - - ref: domain_controller - hostname: domain_controller + - hostname: domain_controller type: server ip_address: 192.168.1.10 subnet_mask: 255.255.255.0 default_gateway: 192.168.1.1 services: - - ref: domain_controller_dns_server - type: DNSServer + - type: DNSServer options: domain_mapping: arcd.com: 192.168.1.12 # web server - - ref: web_server - hostname: web_server + - hostname: web_server type: server ip_address: 192.168.1.12 subnet_mask: 255.255.255.0 default_gateway: 192.168.1.1 dns_server: 192.168.1.10 services: - - ref: web_server_web_service - type: WebServer + - type: WebServer applications: - - ref: web_server_database_client - type: DatabaseClient + - type: DatabaseClient options: db_server_ip: 192.168.1.14 - - ref: database_server - hostname: database_server + - hostname: database_server type: server ip_address: 192.168.1.14 subnet_mask: 255.255.255.0 default_gateway: 192.168.1.1 dns_server: 192.168.1.10 services: - - ref: database_service - type: DatabaseService + - type: DatabaseService options: backup_server_ip: 192.168.1.16 - - ref: database_ftp_client - type: FTPClient + - type: FTPClient - - ref: backup_server - hostname: backup_server + - hostname: backup_server type: server ip_address: 192.168.1.16 subnet_mask: 255.255.255.0 default_gateway: 192.168.1.1 dns_server: 192.168.1.10 services: - - ref: backup_service - type: FTPServer + - type: FTPServer - - ref: security_suite - hostname: security_suite + - hostname: security_suite type: server ip_address: 192.168.1.110 subnet_mask: 255.255.255.0 @@ -1448,59 +1434,49 @@ simulation: ip_address: 192.168.10.110 subnet_mask: 255.255.255.0 - - ref: client_1 - hostname: client_1 + - hostname: client_1 type: computer ip_address: 192.168.10.21 subnet_mask: 255.255.255.0 default_gateway: 192.168.10.1 dns_server: 192.168.1.10 applications: - - ref: data_manipulation_bot - type: DataManipulationBot + - type: DataManipulationBot options: port_scan_p_of_success: 0.8 data_manipulation_p_of_success: 0.8 payload: "DELETE" server_ip: 192.168.1.14 - - ref: client_1_web_browser - type: WebBrowser + - type: WebBrowser options: target_url: http://arcd.com/users/ - - ref: client_1_database_client - type: DatabaseClient + - type: DatabaseClient options: db_server_ip: 192.168.1.14 services: - - ref: client_1_dns_client - type: DNSClient + - type: DNSClient - - ref: client_2 - hostname: client_2 + - hostname: client_2 type: computer ip_address: 192.168.10.22 subnet_mask: 255.255.255.0 default_gateway: 192.168.10.1 dns_server: 192.168.1.10 applications: - - ref: client_2_web_browser - type: WebBrowser + - type: WebBrowser options: target_url: http://arcd.com/users/ - - ref: data_manipulation_bot - type: DataManipulationBot + - type: DataManipulationBot options: port_scan_p_of_success: 0.8 data_manipulation_p_of_success: 0.8 payload: "DELETE" server_ip: 192.168.1.14 - - ref: client_2_database_client - type: DatabaseClient + - type: DatabaseClient options: db_server_ip: 192.168.1.14 services: - - ref: client_2_dns_client - type: DNSClient + - ty DNSClient diff --git a/src/primaite/game/game.py b/src/primaite/game/game.py index bfbffc4d..f069433e 100644 --- a/src/primaite/game/game.py +++ b/src/primaite/game/game.py @@ -102,15 +102,6 @@ class PrimaiteGame: self.options: PrimaiteGameOptions """Special options that apply for the entire game.""" - self.ref_map_nodes: Dict[str, str] = {} - """Mapping from unique node reference name to node object. Used when parsing config files.""" - - self.ref_map_services: Dict[str, str] = {} - """Mapping from human-readable service reference to service object. Used for parsing config files.""" - - self.ref_map_applications: Dict[str, str] = {} - """Mapping from human-readable application reference to application object. Used for parsing config files.""" - self.save_step_metadata: bool = False """Whether to save the RL agents' action, environment state, and other data at every single step.""" @@ -235,7 +226,6 @@ class PrimaiteGame: links_cfg = network_config.get("links", []) for node_cfg in nodes_cfg: - node_ref = node_cfg["ref"] n_type = node_cfg["type"] if n_type == "computer": new_node = Computer( @@ -286,13 +276,11 @@ class PrimaiteGame: if "services" in node_cfg: for service_cfg in node_cfg["services"]: new_service = None - service_ref = service_cfg["ref"] service_type = service_cfg["type"] if service_type in SERVICE_TYPES_MAPPING: _LOGGER.debug(f"installing {service_type} on node {new_node.hostname}") new_node.software_manager.install(SERVICE_TYPES_MAPPING[service_type]) new_service = new_node.software_manager.software[service_type] - game.ref_map_services[service_ref] = new_service.uuid # start the service new_service.start() @@ -328,13 +316,11 @@ class PrimaiteGame: if "applications" in node_cfg: for application_cfg in node_cfg["applications"]: new_application = None - application_ref = application_cfg["ref"] application_type = application_cfg["type"] if application_type in APPLICATION_TYPES_MAPPING: new_node.software_manager.install(APPLICATION_TYPES_MAPPING[application_type]) new_application = new_node.software_manager.software[application_type] - game.ref_map_applications[application_ref] = new_application.uuid else: msg = f"Configuration contains an invalid application type: {application_type}" _LOGGER.error(msg) @@ -388,7 +374,6 @@ class PrimaiteGame: # run through the power on step if the node is to be turned on at the start if new_node.operating_state == NodeOperatingState.ON: new_node.power_on() - game.ref_map_nodes[node_ref] = new_node.uuid # set start up and shut down duration new_node.start_up_duration = int(node_cfg.get("start_up_duration", 3)) diff --git a/tests/assets/configs/bad_primaite_session.yaml b/tests/assets/configs/bad_primaite_session.yaml index 493b0452..7d85ea9f 100644 --- a/tests/assets/configs/bad_primaite_session.yaml +++ b/tests/assets/configs/bad_primaite_session.yaml @@ -551,8 +551,7 @@ simulation: network: nodes: - - ref: router_1 - type: router + - type: router hostname: router_1 num_ports: 5 ports: @@ -579,70 +578,58 @@ simulation: action: PERMIT protocol: ICMP - - ref: switch_1 - type: switch + - type: switch hostname: switch_1 num_ports: 8 - - ref: switch_2 - type: switch + - type: switch hostname: switch_2 num_ports: 8 - - ref: domain_controller - type: server + - type: server hostname: domain_controller ip_address: 192.168.1.10 subnet_mask: 255.255.255.0 default_gateway: 192.168.1.1 services: - - ref: domain_controller_dns_server - type: DNSServer + - type: DNSServer options: domain_mapping: arcd.com: 192.168.1.12 # web server - - ref: web_server - type: server + - type: server hostname: web_server ip_address: 192.168.1.12 subnet_mask: 255.255.255.0 default_gateway: 192.168.1.1 dns_server: 192.168.1.10 services: - - ref: web_server_web_service - type: WebServer + - type: WebServer applications: - - ref: web_server_database_client - type: DatabaseClient + - type: DatabaseClient options: db_server_ip: 192.168.1.14 - - ref: database_server - type: server + - type: server hostname: database_server ip_address: 192.168.1.14 subnet_mask: 255.255.255.0 default_gateway: 192.168.1.1 dns_server: 192.168.1.10 services: - - ref: database_service - type: DatabaseService + - type: DatabaseService - - ref: backup_server - type: server + - type: server hostname: backup_server ip_address: 192.168.1.16 subnet_mask: 255.255.255.0 default_gateway: 192.168.1.1 dns_server: 192.168.1.10 services: - - ref: backup_service - type: FTPServer + - type: FTPServer - - ref: security_suite - type: server + - type: server hostname: security_suite ip_address: 192.168.1.110 subnet_mask: 255.255.255.0 @@ -653,38 +640,32 @@ simulation: ip_address: 192.168.10.110 subnet_mask: 255.255.255.0 - - ref: client_1 - type: computer + - type: computer hostname: client_1 ip_address: 192.168.10.21 subnet_mask: 255.255.255.0 default_gateway: 192.168.10.1 dns_server: 192.168.1.10 applications: - - ref: data_manipulation_bot - type: DataManipulationBot + - type: DataManipulationBot options: port_scan_p_of_success: 0.1 data_manipulation_p_of_success: 0.1 payload: "DELETE" server_ip: 192.168.1.14 services: - - ref: client_1_dns_client - type: DNSClient + - type: DNSClient - - ref: client_2 - type: computer + - type: computer hostname: client_2 ip_address: 192.168.10.22 subnet_mask: 255.255.255.0 default_gateway: 192.168.10.1 dns_server: 192.168.1.10 applications: - - ref: client_2_web_browser - type: WebBrowser + - type: WebBrowser services: - - ref: client_2_dns_client - type: DNSClient + - type: DNSClient links: - endpoint_a_hostname: router_1 diff --git a/tests/assets/configs/basic_firewall.yaml b/tests/assets/configs/basic_firewall.yaml index 3aa2ca2d..0512fbe1 100644 --- a/tests/assets/configs/basic_firewall.yaml +++ b/tests/assets/configs/basic_firewall.yaml @@ -79,8 +79,7 @@ simulation: network: nodes: - - ref: firewall - type: firewall + - type: firewall hostname: firewall start_up_duration: 0 shut_down_duration: 0 @@ -133,25 +132,21 @@ simulation: action: PERMIT protocol: ICMP - - ref: switch_1 - type: switch + - type: switch hostname: switch_1 num_ports: 8 - - ref: switch_2 - type: switch + - type: switch hostname: switch_2 num_ports: 8 - - ref: client_1 - type: computer + - type: computer hostname: client_1 ip_address: 192.168.10.21 subnet_mask: 255.255.255.0 default_gateway: 192.168.10.1 dns_server: 192.168.1.10 # pre installed services and applications - - ref: client_2 - type: computer + - type: computer hostname: client_2 ip_address: 192.168.10.22 subnet_mask: 255.255.255.0 @@ -160,23 +155,19 @@ simulation: # pre installed services and applications links: - - ref: switch_1___client_1 - endpoint_a_hostname: switch_1 + - endpoint_a_hostname: switch_1 endpoint_a_port: 1 endpoint_b_hostname: client_1 endpoint_b_port: 1 - - ref: switch_2___client_2 - endpoint_a_hostname: switch_2 + - endpoint_a_hostname: switch_2 endpoint_a_port: 1 endpoint_b_hostname: client_2 endpoint_b_port: 1 - - ref: switch_1___firewall - endpoint_a_hostname: switch_1 + - endpoint_a_hostname: switch_1 endpoint_a_port: 2 endpoint_b_hostname: firewall endpoint_b_port: 1 - - ref: switch_2___firewall - endpoint_a_hostname: switch_2 + - endpoint_a_hostname: switch_2 endpoint_a_port: 2 endpoint_b_hostname: firewall endpoint_b_port: 2 diff --git a/tests/assets/configs/basic_switched_network.yaml b/tests/assets/configs/basic_switched_network.yaml index ab55a6ed..bbc45de2 100644 --- a/tests/assets/configs/basic_switched_network.yaml +++ b/tests/assets/configs/basic_switched_network.yaml @@ -79,79 +79,64 @@ simulation: network: nodes: - - ref: switch_1 - type: switch + - type: switch hostname: switch_1 num_ports: 8 - - ref: client_1 + - hostname: client_1 type: computer - hostname: client_1 ip_address: 192.168.10.21 subnet_mask: 255.255.255.0 default_gateway: 192.168.10.1 dns_server: 192.168.1.10 applications: - - ref: client_1_web_browser - type: WebBrowser + - type: WebBrowser options: target_url: http://arcd.com/users/ - - ref: client_1_database_client - type: DatabaseClient + - type: DatabaseClient options: db_server_ip: 192.168.1.10 server_password: arcd - - ref: data_manipulation_bot - type: DataManipulationBot + - type: DataManipulationBot options: port_scan_p_of_success: 0.8 data_manipulation_p_of_success: 0.8 payload: "DELETE" server_ip: 192.168.1.21 server_password: arcd - - ref: dos_bot - type: DoSBot + - type: DoSBot options: target_ip_address: 192.168.10.21 payload: SPOOF DATA port_scan_p_of_success: 0.8 services: - - ref: client_1_dns_client - type: DNSClient + - type: DNSClient options: dns_server: 192.168.1.10 - - ref: client_1_dns_server - type: DNSServer + - type: DNSServer options: domain_mapping: arcd.com: 192.168.1.10 - - ref: client_1_database_service - type: DatabaseService + - type: DatabaseService options: backup_server_ip: 192.168.1.10 - - ref: client_1_web_service - type: WebServer - - ref: client_1_ftp_server - type: FTPServer + - type: WebServer + - type: FTPServer options: server_password: arcd - - ref: client_1_ntp_client - type: NTPClient + - type: NTPClient options: ntp_server_ip: 192.168.1.10 - - ref: client_1_ntp_server - type: NTPServer - - ref: client_2 + - type: NTPServer + - hostname: client_2 type: computer - hostname: client_2 ip_address: 192.168.10.22 subnet_mask: 255.255.255.0 default_gateway: 192.168.10.1 dns_server: 192.168.1.10 # pre installed services and applications - - ref: client_3 + - hostname: client_3 type: computer - hostname: client_3 ip_address: 192.168.10.23 subnet_mask: 255.255.255.0 default_gateway: 192.168.10.1 diff --git a/tests/assets/configs/dmz_network.yaml b/tests/assets/configs/dmz_network.yaml index 0930bc7d..2ce722f7 100644 --- a/tests/assets/configs/dmz_network.yaml +++ b/tests/assets/configs/dmz_network.yaml @@ -104,8 +104,7 @@ agents: simulation: network: nodes: - - ref: client_1 - type: computer + - type: computer hostname: client_1 ip_address: 192.168.0.10 subnet_mask: 255.255.255.0 @@ -114,15 +113,13 @@ simulation: start_up_duration: 0 shut_down_duration: 0 - - ref: switch_1 - type: switch + - type: switch hostname: switch_1 num_ports: 8 start_up_duration: 0 shut_down_duration: 0 - - ref: router_1 - type: router + - type: router hostname: router_1 num_ports: 5 start_up_duration: 0 @@ -156,8 +153,7 @@ simulation: next_hop_ip_address: 192.168.1.2 metric: 0 - - ref: dmz_server - type: server + - type: server hostname: dmz_server ip_address: 192.168.10.10 subnet_mask: 255.255.255.0 @@ -166,15 +162,13 @@ simulation: start_up_duration: 0 shut_down_duration: 0 - - ref: switch_2 - type: switch + - type: switch hostname: switch_2 num_ports: 8 start_up_duration: 0 shut_down_duration: 0 - - ref: firewall - type: firewall + - type: firewall hostname: firewall start_up_duration: 0 shut_down_duration: 0 @@ -237,15 +231,13 @@ simulation: next_hop_ip_address: 192.168.1.1 metric: 0 - - ref: switch_3 - type: switch + - type: switch hostname: switch_3 num_ports: 8 start_up_duration: 0 shut_down_duration: 0 - - ref: external_computer - type: computer + - type: computer hostname: external_computer ip_address: 192.168.20.10 subnet_mask: 255.255.255.0 @@ -254,8 +246,7 @@ simulation: start_up_duration: 0 shut_down_duration: 0 - - ref: external_server - type: server + - type: server hostname: external_server ip_address: 192.168.20.11 subnet_mask: 255.255.255.0 @@ -263,46 +254,37 @@ simulation: start_up_duration: 0 shut_down_duration: 0 services: - - ref: domain_controller_dns_server - type: DNSServer + - type: DNSServer links: - - ref: client_1___switch_1 - endpoint_a_hostname: client_1 + - endpoint_a_hostname: client_1 endpoint_a_port: 1 endpoint_b_hostname: switch_1 endpoint_b_port: 1 - - ref: router_1___switch_1 - endpoint_a_hostname: router_1 + - endpoint_a_hostname: router_1 endpoint_a_port: 1 endpoint_b_hostname: switch_1 endpoint_b_port: 8 - - ref: router_1___firewall - endpoint_a_hostname: firewall + - endpoint_a_hostname: firewall endpoint_a_port: 2 # internal firewall port endpoint_b_hostname: router_1 endpoint_b_port: 2 - - ref: firewall___switch_2 - endpoint_a_hostname: firewall + - endpoint_a_hostname: firewall endpoint_a_port: 3 # dmz firewall port endpoint_b_hostname: switch_2 endpoint_b_port: 8 - - ref: dmz_server___switch_2 - endpoint_a_hostname: dmz_server + - endpoint_a_hostname: dmz_server endpoint_a_port: 1 endpoint_b_hostname: switch_2 endpoint_b_port: 1 - - ref: firewall___switch_3 - endpoint_a_hostname: firewall + - endpoint_a_hostname: firewall endpoint_a_port: 1 # external firewall port endpoint_b_hostname: switch_3 endpoint_b_port: 8 - - ref: external_computer___switch_3 - endpoint_a_hostname: external_computer + - endpoint_a_hostname: external_computer endpoint_a_port: 1 endpoint_b_hostname: switch_3 endpoint_b_port: 1 - - ref: external_server___switch_3 - endpoint_a_hostname: external_server + - endpoint_a_hostname: external_server endpoint_a_port: 1 endpoint_b_hostname: switch_3 endpoint_b_port: 2 diff --git a/tests/assets/configs/eval_only_primaite_session.yaml b/tests/assets/configs/eval_only_primaite_session.yaml index 918f00ca..f05e3390 100644 --- a/tests/assets/configs/eval_only_primaite_session.yaml +++ b/tests/assets/configs/eval_only_primaite_session.yaml @@ -567,8 +567,7 @@ simulation: network: nodes: - - ref: router_1 - type: router + - type: router hostname: router_1 num_ports: 5 ports: @@ -595,70 +594,58 @@ simulation: action: PERMIT protocol: ICMP - - ref: switch_1 - type: switch + - type: switch hostname: switch_1 num_ports: 8 - - ref: switch_2 - type: switch + - type: switch hostname: switch_2 num_ports: 8 - - ref: domain_controller - type: server + - type: server hostname: domain_controller ip_address: 192.168.1.10 subnet_mask: 255.255.255.0 default_gateway: 192.168.1.1 services: - - ref: domain_controller_dns_server - type: DNSServer + - type: DNSServer options: domain_mapping: arcd.com: 192.168.1.12 # web server - - ref: web_server - type: server + - type: server hostname: web_server ip_address: 192.168.1.12 subnet_mask: 255.255.255.0 default_gateway: 192.168.1.1 dns_server: 192.168.1.10 services: - - ref: web_server_web_service - type: WebServer + - type: WebServer applications: - - ref: web_server_database_client - type: DatabaseClient + - type: DatabaseClient options: db_server_ip: 192.168.1.14 - - ref: database_server - type: server + - type: server hostname: database_server ip_address: 192.168.1.14 subnet_mask: 255.255.255.0 default_gateway: 192.168.1.1 dns_server: 192.168.1.10 services: - - ref: database_service - type: DatabaseService + - type: DatabaseService - - ref: backup_server - type: server + - type: server hostname: backup_server ip_address: 192.168.1.16 subnet_mask: 255.255.255.0 default_gateway: 192.168.1.1 dns_server: 192.168.1.10 services: - - ref: backup_service - type: FTPServer + - type: FTPServer - - ref: security_suite - type: server + - type: server hostname: security_suite ip_address: 192.168.1.110 subnet_mask: 255.255.255.0 @@ -669,38 +656,32 @@ simulation: ip_address: 192.168.10.110 subnet_mask: 255.255.255.0 - - ref: client_1 - type: computer + - type: computer hostname: client_1 ip_address: 192.168.10.21 subnet_mask: 255.255.255.0 default_gateway: 192.168.10.1 dns_server: 192.168.1.10 applications: - - ref: data_manipulation_bot - type: DataManipulationBot + - type: DataManipulationBot options: port_scan_p_of_success: 0.1 data_manipulation_p_of_success: 0.1 payload: "DELETE" server_ip: 192.168.1.14 services: - - ref: client_1_dns_client - type: DNSClient + - type: DNSClient - - ref: client_2 - type: computer + - type: computer hostname: client_2 ip_address: 192.168.10.22 subnet_mask: 255.255.255.0 default_gateway: 192.168.10.1 dns_server: 192.168.1.10 applications: - - ref: client_2_web_browser - type: WebBrowser + - type: WebBrowser services: - - ref: client_2_dns_client - type: DNSClient + - type: DNSClient links: - endpoint_a_hostname: router_1 diff --git a/tests/assets/configs/firewall_actions_network.yaml b/tests/assets/configs/firewall_actions_network.yaml index 4e134fe6..1f4a45e0 100644 --- a/tests/assets/configs/firewall_actions_network.yaml +++ b/tests/assets/configs/firewall_actions_network.yaml @@ -298,8 +298,7 @@ agents: simulation: network: nodes: - - ref: client_1 - type: computer + - type: computer hostname: client_1 ip_address: 192.168.0.10 subnet_mask: 255.255.255.0 @@ -308,15 +307,13 @@ simulation: start_up_duration: 0 shut_down_duration: 0 - - ref: switch_1 - type: switch + - type: switch hostname: switch_1 num_ports: 8 start_up_duration: 0 shut_down_duration: 0 - - ref: router_1 - type: router + - type: router hostname: router_1 num_ports: 5 start_up_duration: 0 @@ -350,8 +347,7 @@ simulation: next_hop_ip_address: 192.168.1.2 metric: 0 - - ref: dmz_server - type: server + - type: server hostname: dmz_server ip_address: 192.168.10.10 subnet_mask: 255.255.255.0 @@ -360,15 +356,13 @@ simulation: start_up_duration: 0 shut_down_duration: 0 - - ref: switch_2 - type: switch + - type: switch hostname: switch_2 num_ports: 8 start_up_duration: 0 shut_down_duration: 0 - - ref: firewall - type: firewall + - type: firewall hostname: firewall start_up_duration: 0 shut_down_duration: 0 @@ -431,15 +425,13 @@ simulation: next_hop_ip_address: 192.168.1.1 metric: 0 - - ref: switch_3 - type: switch + - type: switch hostname: switch_3 num_ports: 8 start_up_duration: 0 shut_down_duration: 0 - - ref: external_computer - type: computer + - type: computer hostname: external_computer ip_address: 192.168.20.10 subnet_mask: 255.255.255.0 @@ -448,8 +440,7 @@ simulation: start_up_duration: 0 shut_down_duration: 0 - - ref: external_server - type: server + - type: server hostname: external_server ip_address: 192.168.20.11 subnet_mask: 255.255.255.0 @@ -457,46 +448,37 @@ simulation: start_up_duration: 0 shut_down_duration: 0 services: - - ref: domain_controller_dns_server - type: DNSServer + - type: DNSServer links: - - ref: client_1___switch_1 - endpoint_a_hostname: client_1 + - endpoint_a_hostname: client_1 endpoint_a_port: 1 endpoint_b_hostname: switch_1 endpoint_b_port: 1 - - ref: router_1___switch_1 - endpoint_a_hostname: router_1 + - endpoint_a_hostname: router_1 endpoint_a_port: 1 endpoint_b_hostname: switch_1 endpoint_b_port: 8 - - ref: router_1___firewall - endpoint_a_hostname: firewall + - endpoint_a_hostname: firewall endpoint_a_port: 2 # internal firewall port endpoint_b_hostname: router_1 endpoint_b_port: 2 - - ref: firewall___switch_2 - endpoint_a_hostname: firewall + - endpoint_a_hostname: firewall endpoint_a_port: 3 # dmz firewall port endpoint_b_hostname: switch_2 endpoint_b_port: 8 - - ref: dmz_server___switch_2 - endpoint_a_hostname: dmz_server + - endpoint_a_hostname: dmz_server endpoint_a_port: 1 endpoint_b_hostname: switch_2 endpoint_b_port: 1 - - ref: firewall___switch_3 - endpoint_a_hostname: firewall + - endpoint_a_hostname: firewall endpoint_a_port: 1 # external firewall port endpoint_b_hostname: switch_3 endpoint_b_port: 8 - - ref: external_computer___switch_3 - endpoint_a_hostname: external_computer + - endpoint_a_hostname: external_computer endpoint_a_port: 1 endpoint_b_hostname: switch_3 endpoint_b_port: 1 - - ref: external_server___switch_3 - endpoint_a_hostname: external_server + - endpoint_a_hostname: external_server endpoint_a_port: 1 endpoint_b_hostname: switch_3 endpoint_b_port: 2 diff --git a/tests/assets/configs/multi_agent_session.yaml b/tests/assets/configs/multi_agent_session.yaml index e4342582..6a37be80 100644 --- a/tests/assets/configs/multi_agent_session.yaml +++ b/tests/assets/configs/multi_agent_session.yaml @@ -1027,8 +1027,7 @@ simulation: network: nodes: - - ref: router_1 - type: router + - type: router hostname: router_1 num_ports: 5 ports: @@ -1055,69 +1054,57 @@ simulation: action: PERMIT protocol: ICMP - - ref: switch_1 - type: switch + - type: switch hostname: switch_1 num_ports: 8 - - ref: switch_2 - type: switch + - type: switch hostname: switch_2 num_ports: 8 - - ref: domain_controller - type: server + - type: server hostname: domain_controller ip_address: 192.168.1.10 subnet_mask: 255.255.255.0 default_gateway: 192.168.1.1 services: - - ref: domain_controller_dns_server - type: DNSServer + - type: DNSServer options: domain_mapping: arcd.com: 192.168.1.12 # web server - - ref: web_server - type: server + - type: server hostname: web_server ip_address: 192.168.1.12 subnet_mask: 255.255.255.0 default_gateway: 192.168.1.1 dns_server: 192.168.1.10 services: - - ref: web_server_web_service - type: WebServer + - type: WebServer applications: - - ref: web_server_database_client - type: DatabaseClient + - type: DatabaseClient options: db_server_ip: 192.168.1.14 - - ref: database_server - type: server + - type: server hostname: database_server ip_address: 192.168.1.14 subnet_mask: 255.255.255.0 default_gateway: 192.168.1.1 dns_server: 192.168.1.10 services: - - ref: database_service - type: DatabaseService + - type: DatabaseService - - ref: backup_server - type: server + - type: server hostname: backup_server ip_address: 192.168.1.16 subnet_mask: 255.255.255.0 default_gateway: 192.168.1.1 dns_server: 192.168.1.10 services: - - ref: backup_service - type: FTPServer + - type: FTPServer - - ref: security_suite - type: server + - type: server hostname: security_suite ip_address: 192.168.1.110 subnet_mask: 255.255.255.0 @@ -1128,38 +1115,32 @@ simulation: ip_address: 192.168.10.110 subnet_mask: 255.255.255.0 - - ref: client_1 - type: computer + - type: computer hostname: client_1 ip_address: 192.168.10.21 subnet_mask: 255.255.255.0 default_gateway: 192.168.10.1 dns_server: 192.168.1.10 applications: - - ref: data_manipulation_bot - type: DataManipulationBot + - type: DataManipulationBot options: port_scan_p_of_success: 0.1 data_manipulation_p_of_success: 0.1 payload: "DELETE" server_ip: 192.168.1.14 services: - - ref: client_1_dns_client - type: DNSClient + - type: DNSClient - - ref: client_2 - type: computer + - type: computer hostname: client_2 ip_address: 192.168.10.22 subnet_mask: 255.255.255.0 default_gateway: 192.168.10.1 dns_server: 192.168.1.10 applications: - - ref: client_2_web_browser - type: WebBrowser + - type: WebBrowser services: - - ref: client_2_dns_client - type: DNSClient + - type: DNSClient links: - endpoint_a_hostname: router_1 diff --git a/tests/assets/configs/shared_rewards.yaml b/tests/assets/configs/shared_rewards.yaml index 7df6802c..bfa03ace 100644 --- a/tests/assets/configs/shared_rewards.yaml +++ b/tests/assets/configs/shared_rewards.yaml @@ -750,8 +750,7 @@ simulation: - DELETE nodes: - - ref: router_1 - hostname: router_1 + - hostname: router_1 type: router num_ports: 5 ports: @@ -786,74 +785,61 @@ simulation: action: PERMIT protocol: ICMP - - ref: switch_1 - hostname: switch_1 + - hostname: switch_1 type: switch num_ports: 8 - - ref: switch_2 - hostname: switch_2 + - hostname: switch_2 type: switch num_ports: 8 - - ref: domain_controller - hostname: domain_controller + - hostname: domain_controller type: server ip_address: 192.168.1.10 subnet_mask: 255.255.255.0 default_gateway: 192.168.1.1 services: - - ref: domain_controller_dns_server - type: DNSServer + - type: DNSServer options: domain_mapping: arcd.com: 192.168.1.12 # web server - - ref: web_server - hostname: web_server + - hostname: web_server type: server ip_address: 192.168.1.12 subnet_mask: 255.255.255.0 default_gateway: 192.168.1.1 dns_server: 192.168.1.10 services: - - ref: web_server_web_service - type: WebServer + - type: WebServer applications: - - ref: web_server_database_client - type: DatabaseClient + - type: DatabaseClient options: db_server_ip: 192.168.1.14 - - ref: database_server - hostname: database_server + - hostname: database_server type: server ip_address: 192.168.1.14 subnet_mask: 255.255.255.0 default_gateway: 192.168.1.1 dns_server: 192.168.1.10 services: - - ref: database_service - type: DatabaseService + - type: DatabaseService options: backup_server_ip: 192.168.1.16 - - ref: database_ftp_client - type: FTPClient + - type: FTPClient - - ref: backup_server - hostname: backup_server + - hostname: backup_server type: server ip_address: 192.168.1.16 subnet_mask: 255.255.255.0 default_gateway: 192.168.1.1 dns_server: 192.168.1.10 services: - - ref: backup_service - type: FTPServer + - type: FTPServer - - ref: security_suite - hostname: security_suite + - hostname: security_suite type: server ip_address: 192.168.1.110 subnet_mask: 255.255.255.0 @@ -864,59 +850,49 @@ simulation: ip_address: 192.168.10.110 subnet_mask: 255.255.255.0 - - ref: client_1 - hostname: client_1 + - hostname: client_1 type: computer ip_address: 192.168.10.21 subnet_mask: 255.255.255.0 default_gateway: 192.168.10.1 dns_server: 192.168.1.10 applications: - - ref: data_manipulation_bot - type: DataManipulationBot + - type: DataManipulationBot options: port_scan_p_of_success: 0.8 data_manipulation_p_of_success: 0.8 payload: "DELETE" server_ip: 192.168.1.14 - - ref: client_1_web_browser - type: WebBrowser + - type: WebBrowser options: target_url: http://arcd.com/users/ - - ref: client_1_database_client - type: DatabaseClient + - type: DatabaseClient options: db_server_ip: 192.168.1.14 services: - - ref: client_1_dns_client - type: DNSClient + - type: DNSClient - - ref: client_2 - hostname: client_2 + - hostname: client_2 type: computer ip_address: 192.168.10.22 subnet_mask: 255.255.255.0 default_gateway: 192.168.10.1 dns_server: 192.168.1.10 applications: - - ref: client_2_web_browser - type: WebBrowser + - type: WebBrowser options: target_url: http://arcd.com/users/ - - ref: data_manipulation_bot - type: DataManipulationBot + - type: DataManipulationBot options: port_scan_p_of_success: 0.8 data_manipulation_p_of_success: 0.8 payload: "DELETE" server_ip: 192.168.1.14 - - ref: client_2_database_client - type: DatabaseClient + - type: DatabaseClient options: db_server_ip: 192.168.1.14 services: - - ref: client_2_dns_client - type: DNSClient + - type: DNSClient diff --git a/tests/assets/configs/test_application_install.yaml b/tests/assets/configs/test_application_install.yaml index a2059913..3323937e 100644 --- a/tests/assets/configs/test_application_install.yaml +++ b/tests/assets/configs/test_application_install.yaml @@ -782,8 +782,7 @@ simulation: - DELETE nodes: - - ref: router_1 - hostname: router_1 + - hostname: router_1 type: router num_ports: 5 ports: @@ -818,74 +817,61 @@ simulation: action: PERMIT protocol: ICMP - - ref: switch_1 - hostname: switch_1 + - hostname: switch_1 type: switch num_ports: 8 - - ref: switch_2 - hostname: switch_2 + - hostname: switch_2 type: switch num_ports: 8 - - ref: domain_controller - hostname: domain_controller + - hostname: domain_controller type: server ip_address: 192.168.1.10 subnet_mask: 255.255.255.0 default_gateway: 192.168.1.1 services: - - ref: domain_controller_dns_server - type: DNSServer + - type: DNSServer options: domain_mapping: arcd.com: 192.168.1.12 # web server - - ref: web_server - hostname: web_server + - hostname: web_server type: server ip_address: 192.168.1.12 subnet_mask: 255.255.255.0 default_gateway: 192.168.1.1 dns_server: 192.168.1.10 services: - - ref: web_server_web_service - type: WebServer + - type: WebServer applications: - - ref: web_server_database_client - type: DatabaseClient + - type: DatabaseClient options: db_server_ip: 192.168.1.14 - - ref: database_server - hostname: database_server + - hostname: database_server type: server ip_address: 192.168.1.14 subnet_mask: 255.255.255.0 default_gateway: 192.168.1.1 dns_server: 192.168.1.10 services: - - ref: database_service - type: DatabaseService + - type: DatabaseService options: backup_server_ip: 192.168.1.16 - - ref: database_ftp_client - type: FTPClient + - type: FTPClient - - ref: backup_server - hostname: backup_server + - hostname: backup_server type: server ip_address: 192.168.1.16 subnet_mask: 255.255.255.0 default_gateway: 192.168.1.1 dns_server: 192.168.1.10 services: - - ref: backup_service - type: FTPServer + - type: FTPServer - - ref: security_suite - hostname: security_suite + - hostname: security_suite type: server ip_address: 192.168.1.110 subnet_mask: 255.255.255.0 @@ -896,59 +882,49 @@ simulation: ip_address: 192.168.10.110 subnet_mask: 255.255.255.0 - - ref: client_1 - hostname: client_1 + - hostname: client_1 type: computer ip_address: 192.168.10.21 subnet_mask: 255.255.255.0 default_gateway: 192.168.10.1 dns_server: 192.168.1.10 applications: - - ref: data_manipulation_bot - type: DataManipulationBot + - type: DataManipulationBot options: port_scan_p_of_success: 0.8 data_manipulation_p_of_success: 0.8 payload: "DELETE" server_ip: 192.168.1.14 - - ref: client_1_web_browser - type: WebBrowser + - type: WebBrowser options: target_url: http://arcd.com/users/ - - ref: client_1_database_client - type: DatabaseClient + - type: DatabaseClient options: db_server_ip: 192.168.1.14 services: - - ref: client_1_dns_client - type: DNSClient + - type: DNSClient - - ref: client_2 - hostname: client_2 + - hostname: client_2 type: computer ip_address: 192.168.10.22 subnet_mask: 255.255.255.0 default_gateway: 192.168.10.1 dns_server: 192.168.1.10 applications: - - ref: client_2_web_browser - type: WebBrowser + - type: WebBrowser options: target_url: http://arcd.com/users/ - - ref: data_manipulation_bot - type: DataManipulationBot + - type: DataManipulationBot options: port_scan_p_of_success: 0.8 data_manipulation_p_of_success: 0.8 payload: "DELETE" server_ip: 192.168.1.14 - - ref: client_2_database_client - type: DatabaseClient + - type: DatabaseClient options: db_server_ip: 192.168.1.14 services: - - ref: client_2_dns_client - type: DNSClient + - type: DNSClient diff --git a/tests/assets/configs/test_primaite_session.yaml b/tests/assets/configs/test_primaite_session.yaml index fc72cfd7..9284f1d1 100644 --- a/tests/assets/configs/test_primaite_session.yaml +++ b/tests/assets/configs/test_primaite_session.yaml @@ -574,8 +574,7 @@ simulation: network: nodes: - - ref: router_1 - type: router + - type: router hostname: router_1 num_ports: 5 ports: @@ -602,70 +601,58 @@ simulation: action: PERMIT protocol: ICMP - - ref: switch_1 - type: switch + - type: switch hostname: switch_1 num_ports: 8 - - ref: switch_2 - type: switch + - type: switch hostname: switch_2 num_ports: 8 - - ref: domain_controller - type: server + - type: server hostname: domain_controller ip_address: 192.168.1.10 subnet_mask: 255.255.255.0 default_gateway: 192.168.1.1 services: - - ref: domain_controller_dns_server - type: DNSServer + - type: DNSServer options: domain_mapping: arcd.com: 192.168.1.12 # web server - - ref: web_server - type: server + - type: server hostname: web_server ip_address: 192.168.1.12 subnet_mask: 255.255.255.0 default_gateway: 192.168.1.1 dns_server: 192.168.1.10 services: - - ref: web_server_web_service - type: WebServer + - type: WebServer applications: - - ref: web_server_database_client - type: DatabaseClient + - type: DatabaseClient options: db_server_ip: 192.168.1.14 - - ref: database_server - type: server + - type: server hostname: database_server ip_address: 192.168.1.14 subnet_mask: 255.255.255.0 default_gateway: 192.168.1.1 dns_server: 192.168.1.10 services: - - ref: database_service - type: DatabaseService + - type: DatabaseService - - ref: backup_server - type: server + - type: server hostname: backup_server ip_address: 192.168.1.16 subnet_mask: 255.255.255.0 default_gateway: 192.168.1.1 dns_server: 192.168.1.10 services: - - ref: backup_service - type: FTPServer + - type: FTPServer - - ref: security_suite - type: server + - type: server hostname: security_suite ip_address: 192.168.1.110 subnet_mask: 255.255.255.0 @@ -676,47 +663,39 @@ simulation: ip_address: 192.168.10.110 subnet_mask: 255.255.255.0 - - ref: client_1 - type: computer + - type: computer hostname: client_1 ip_address: 192.168.10.21 subnet_mask: 255.255.255.0 default_gateway: 192.168.10.1 dns_server: 192.168.1.10 applications: - - ref: data_manipulation_bot - type: DataManipulationBot + - type: DataManipulationBot options: port_scan_p_of_success: 0.1 data_manipulation_p_of_success: 0.1 payload: "DELETE" server_ip: 192.168.1.14 services: - - ref: client_1_dns_client - type: DNSClient + - type: DNSClient - - ref: client_2 - type: computer + - type: computer hostname: client_2 ip_address: 192.168.10.22 subnet_mask: 255.255.255.0 default_gateway: 192.168.10.1 dns_server: 192.168.1.10 applications: - - ref: client_2_web_browser - type: WebBrowser + - type: WebBrowser services: - - ref: client_2_dns_client - type: DNSClient + - type: DNSClient - - ref: HP_LaserJet_Pro_4102fdn_printer - type: printer + - type: printer hostname: HP_LaserJet_Pro_4102fdn_printer ip_address: 192.168.10.99 subnet_mask: 255.255.255.0 - - ref: router_2 - type: wireless_router + - type: wireless_router hostname: router_2 router_interface: ip_address: 192.169.1.1 diff --git a/tests/assets/configs/train_only_primaite_session.yaml b/tests/assets/configs/train_only_primaite_session.yaml index b083505e..7d1ac09f 100644 --- a/tests/assets/configs/train_only_primaite_session.yaml +++ b/tests/assets/configs/train_only_primaite_session.yaml @@ -574,8 +574,7 @@ simulation: network: nodes: - - ref: router_1 - type: router + - type: router hostname: router_1 num_ports: 5 ports: @@ -602,70 +601,58 @@ simulation: action: PERMIT protocol: ICMP - - ref: switch_1 - type: switch + - type: switch hostname: switch_1 num_ports: 8 - - ref: switch_2 - type: switch + - type: switch hostname: switch_2 num_ports: 8 - - ref: domain_controller - type: server + - type: server hostname: domain_controller ip_address: 192.168.1.10 subnet_mask: 255.255.255.0 default_gateway: 192.168.1.1 services: - - ref: domain_controller_dns_server - type: DNSServer + - type: DNSServer options: domain_mapping: arcd.com: 192.168.1.12 # web server - - ref: web_server - type: server + - type: server hostname: web_server ip_address: 192.168.1.12 subnet_mask: 255.255.255.0 default_gateway: 192.168.1.1 dns_server: 192.168.1.10 services: - - ref: web_server_web_service - type: WebServer + - type: WebServer applications: - - ref: web_server_database_client - type: DatabaseClient + - type: DatabaseClient options: db_server_ip: 192.168.1.14 - - ref: database_server - type: server + - type: server hostname: database_server ip_address: 192.168.1.14 subnet_mask: 255.255.255.0 default_gateway: 192.168.1.1 dns_server: 192.168.1.10 services: - - ref: database_service - type: DatabaseService + - type: DatabaseService - - ref: backup_server - type: server + - type: server hostname: backup_server ip_address: 192.168.1.16 subnet_mask: 255.255.255.0 default_gateway: 192.168.1.1 dns_server: 192.168.1.10 services: - - ref: backup_service - type: FTPServer + - type: FTPServer - - ref: security_suite - type: server + - type: server hostname: security_suite ip_address: 192.168.1.110 subnet_mask: 255.255.255.0 @@ -676,38 +663,32 @@ simulation: ip_address: 192.168.10.110 subnet_mask: 255.255.255.0 - - ref: client_1 - type: computer + - type: computer hostname: client_1 ip_address: 192.168.10.21 subnet_mask: 255.255.255.0 default_gateway: 192.168.10.1 dns_server: 192.168.1.10 applications: - - ref: data_manipulation_bot - type: DataManipulationBot + - type: DataManipulationBot options: port_scan_p_of_success: 0.1 data_manipulation_p_of_success: 0.1 payload: "DELETE" server_ip: 192.168.1.14 services: - - ref: client_1_dns_client - type: DNSClient + - type: DNSClient - - ref: client_2 - type: computer + - type: computer hostname: client_2 ip_address: 192.168.10.22 subnet_mask: 255.255.255.0 default_gateway: 192.168.10.1 dns_server: 192.168.1.10 applications: - - ref: client_2_web_browser - type: WebBrowser + - type: WebBrowser services: - - ref: client_2_dns_client - type: DNSClient + - type: DNSClient links: - endpoint_a_hostname: router_1 From 383cf051df249b7fd3fcfece4ca38e0784ef7e72 Mon Sep 17 00:00:00 2001 From: Czar Echavez Date: Thu, 4 Apr 2024 14:17:34 +0100 Subject: [PATCH 093/124] #2448: store last query response for db client --- .../system/applications/database_client.py | 6 + .../services/database/database_service.py | 6 +- .../test_data_manipulation_bot_and_server.py | 155 ++++++++++++++++++ 3 files changed, 164 insertions(+), 3 deletions(-) create mode 100644 tests/integration_tests/system/red_applications/test_data_manipulation_bot_and_server.py diff --git a/src/primaite/simulator/system/applications/database_client.py b/src/primaite/simulator/system/applications/database_client.py index d3afef59..1de75dc5 100644 --- a/src/primaite/simulator/system/applications/database_client.py +++ b/src/primaite/simulator/system/applications/database_client.py @@ -29,6 +29,8 @@ class DatabaseClient(Application): _query_success_tracker: Dict[str, bool] = {} _last_connection_successful: Optional[bool] = None """Keep track of connections that were established or verified during this step. Used for rewards.""" + last_query_response: Optional[Dict] = None + """Keep track of the latest query response. Used to determine rewards.""" def __init__(self, **kwargs): kwargs["name"] = "DatabaseClient" @@ -219,6 +221,9 @@ class DatabaseClient(Application): if not self._can_perform_action(): return False + # reset last query response + self.last_query_response = None + if connection_id is None: if self.connections: connection_id = list(self.connections.keys())[-1] @@ -252,6 +257,7 @@ class DatabaseClient(Application): # add connection self.add_connection(connection_id=payload.get("connection_id"), session_id=session_id) elif payload["type"] == "sql": + self.last_query_response = payload query_id = payload.get("uuid") status_code = payload.get("status_code") self._query_success_tracker[query_id] = status_code == 200 diff --git a/src/primaite/simulator/system/services/database/database_service.py b/src/primaite/simulator/system/services/database/database_service.py index ede2a54f..321d9088 100644 --- a/src/primaite/simulator/system/services/database/database_service.py +++ b/src/primaite/simulator/system/services/database/database_service.py @@ -204,7 +204,7 @@ class DatabaseService(Service): if not self.db_file: self.sys_log.info(f"{self.name}: Failed to run {query} because the database file is missing.") - return {"status_code": 404, "data": False} + return {"status_code": 404, "type": "sql", "data": False} if query == "SELECT": if self.db_file.health_status == FileSystemItemHealthStatus.GOOD: @@ -216,7 +216,7 @@ class DatabaseService(Service): "connection_id": connection_id, } else: - return {"status_code": 404, "data": False} + return {"status_code": 404, "type": "sql", "data": False} elif query == "DELETE": self.db_file.health_status = FileSystemItemHealthStatus.COMPROMISED return { @@ -236,7 +236,7 @@ class DatabaseService(Service): "connection_id": connection_id, } else: - return {"status_code": 404, "data": False} + return {"status_code": 404, "type": "sql", "data": False} elif query == "SELECT * FROM pg_stat_activity": # Check if the connection is active. if self.health_state_actual == SoftwareHealthState.GOOD: diff --git a/tests/integration_tests/system/red_applications/test_data_manipulation_bot_and_server.py b/tests/integration_tests/system/red_applications/test_data_manipulation_bot_and_server.py new file mode 100644 index 00000000..1106d6ca --- /dev/null +++ b/tests/integration_tests/system/red_applications/test_data_manipulation_bot_and_server.py @@ -0,0 +1,155 @@ +from ipaddress import IPv4Address +from typing import Tuple + +import pytest + +from primaite.simulator.file_system.file_system_item_abc import FileSystemItemHealthStatus +from primaite.simulator.network.container import Network +from primaite.simulator.network.hardware.nodes.host.computer import Computer +from primaite.simulator.network.hardware.nodes.host.server import Server +from primaite.simulator.network.hardware.nodes.network.router import ACLAction, Router +from primaite.simulator.network.transmission.transport_layer import Port +from primaite.simulator.system.applications.application import ApplicationOperatingState +from primaite.simulator.system.applications.database_client import DatabaseClient +from primaite.simulator.system.applications.red_applications.data_manipulation_bot import ( + DataManipulationAttackStage, + DataManipulationBot, +) +from primaite.simulator.system.applications.red_applications.dos_bot import DoSAttackStage, DoSBot +from primaite.simulator.system.services.database.database_service import DatabaseService +from primaite.simulator.system.software import SoftwareHealthState + + +@pytest.fixture(scope="function") +def data_manipulation_bot_and_db_server(client_server) -> Tuple[DataManipulationBot, Computer, DatabaseService, Server]: + computer, server = client_server + + # install db client on computer + computer.software_manager.install(DatabaseClient) + db_client: DatabaseClient = computer.software_manager.software.get("DatabaseClient") + db_client.run() + + # Install DoSBot on computer + computer.software_manager.install(DataManipulationBot) + + data_manipulation_bot: DataManipulationBot = computer.software_manager.software.get("DataManipulationBot") + data_manipulation_bot.configure( + server_ip_address=IPv4Address(server.network_interface[1].ip_address), payload="DELETE" + ) + + # Install DB Server service on server + server.software_manager.install(DatabaseService) + db_server_service: DatabaseService = server.software_manager.software.get("DatabaseService") + db_server_service.start() + + return data_manipulation_bot, computer, db_server_service, server + + +@pytest.fixture(scope="function") +def data_manipulation_db_server_green_client(example_network) -> Network: + network: Network = example_network + + router_1: Router = example_network.get_node_by_hostname("router_1") + router_1.acl.add_rule( + action=ACLAction.PERMIT, src_port=Port.POSTGRES_SERVER, dst_port=Port.POSTGRES_SERVER, position=0 + ) + + client_1: Computer = network.get_node_by_hostname("client_1") + client_2: Computer = network.get_node_by_hostname("client_2") + server: Server = network.get_node_by_hostname("server_1") + + # install db client on client 1 + client_1.software_manager.install(DatabaseClient) + db_client: DatabaseClient = client_1.software_manager.software.get("DatabaseClient") + db_client.run() + + # install Data Manipulation bot on client 1 + client_1.software_manager.install(DataManipulationBot) + + data_manipulation_bot: DataManipulationBot = client_1.software_manager.software.get("DataManipulationBot") + data_manipulation_bot.configure( + server_ip_address=IPv4Address(server.network_interface[1].ip_address), payload="DELETE" + ) + + # install db server service on server + server.software_manager.install(DatabaseService) + db_server_service: DatabaseService = server.software_manager.software.get("DatabaseService") + db_server_service.start() + + # Install DB client (green) on client 2 + client_2.software_manager.install(DatabaseClient) + + database_client: DatabaseClient = client_2.software_manager.software.get("DatabaseClient") + database_client.configure(server_ip_address=IPv4Address(server.network_interface[1].ip_address)) + database_client.run() + + return network + + +def test_repeating_data_manipulation_attack(data_manipulation_bot_and_db_server): + """Test a repeating data manipulation attack.""" + data_manipulation_bot, computer, db_server_service, server = data_manipulation_bot_and_db_server + + assert db_server_service.health_state_actual is SoftwareHealthState.GOOD + + data_manipulation_bot.port_scan_p_of_success = 1 + data_manipulation_bot.data_manipulation_p_of_success = 1 + data_manipulation_bot.repeat = True + data_manipulation_bot.attack() + + assert data_manipulation_bot.attack_stage == DataManipulationAttackStage.NOT_STARTED + assert db_server_service.db_file.health_status is FileSystemItemHealthStatus.COMPROMISED + + computer.apply_timestep(timestep=1) + server.apply_timestep(timestep=1) + + assert data_manipulation_bot.attack_stage == DataManipulationAttackStage.NOT_STARTED + assert db_server_service.db_file.health_status is FileSystemItemHealthStatus.COMPROMISED + + +def test_non_repeating_data_manipulation_attack(data_manipulation_bot_and_db_server): + """Test a non repeating data manipulation attack.""" + data_manipulation_bot, computer, db_server_service, server = data_manipulation_bot_and_db_server + + assert db_server_service.health_state_actual is SoftwareHealthState.GOOD + + data_manipulation_bot.port_scan_p_of_success = 1 + data_manipulation_bot.data_manipulation_p_of_success = 1 + data_manipulation_bot.repeat = False + data_manipulation_bot.attack() + + assert data_manipulation_bot.attack_stage == DataManipulationAttackStage.SUCCEEDED + assert db_server_service.db_file.health_status is FileSystemItemHealthStatus.COMPROMISED + + computer.apply_timestep(timestep=1) + server.apply_timestep(timestep=1) + + assert data_manipulation_bot.attack_stage == DataManipulationAttackStage.SUCCEEDED + assert db_server_service.db_file.health_status is FileSystemItemHealthStatus.COMPROMISED + + +def test_data_manipulation_disrupts_green_agent_connection(data_manipulation_db_server_green_client): + """Test to see that the data manipulation bot affects a green agent query.""" + network: Network = data_manipulation_db_server_green_client + + client_1: Computer = network.get_node_by_hostname("client_1") + data_manipulation_bot: DataManipulationBot = client_1.software_manager.software.get("DataManipulationBot") + + client_2: Computer = network.get_node_by_hostname("client_2") + green_db_client: DatabaseClient = client_2.software_manager.software.get("DatabaseClient") + + server: Server = network.get_node_by_hostname("server_1") + db_server_service: DatabaseService = server.software_manager.software.get("DatabaseService") + + assert db_server_service.db_file.health_status is FileSystemItemHealthStatus.GOOD + assert green_db_client.query("SELECT") + assert green_db_client.last_query_response.get("status_code") == 200 + + data_manipulation_bot.port_scan_p_of_success = 1 + data_manipulation_bot.data_manipulation_p_of_success = 1 + data_manipulation_bot.repeat = False + data_manipulation_bot.attack() + + assert db_server_service.db_file.health_status is FileSystemItemHealthStatus.COMPROMISED + assert green_db_client.query("SELECT") is False + assert green_db_client.last_query_response.get("status_code") != 200 From f8432bf53b0226132fd9deb9472bf064d0fc8542 Mon Sep 17 00:00:00 2001 From: Charlie Crane Date: Tue, 9 Apr 2024 13:26:35 +0100 Subject: [PATCH 094/124] #2453 - Example Notebooks Require Refactor - create_simulation_demo and network_simulator_demo notebooks have been updated with correct import paths to reflect refactoring within condebase. - Corrected typo within create-simulation_demo: my_swtich -> my_switch - updates to ARP implementation. This is now a property in HostNode and NetworkNode, meaning router.arp.show() now works in network_simulator_demo notebook as intended. --- .../notebooks/Training-an-SB3-Agent.ipynb | 7339 ++++++++++++++++- .../create-simulation_demo.ipynb | 608 +- .../network_simulator_demo.ipynb | 644 +- .../network/hardware/nodes/host/host_node.py | 4 + .../hardware/nodes/network/network_node.py | 7 +- .../network/hardware/nodes/network/router.py | 3 +- 6 files changed, 8494 insertions(+), 111 deletions(-) diff --git a/src/primaite/notebooks/Training-an-SB3-Agent.ipynb b/src/primaite/notebooks/Training-an-SB3-Agent.ipynb index e6f5aaee..67d9748e 100644 --- a/src/primaite/notebooks/Training-an-SB3-Agent.ipynb +++ b/src/primaite/notebooks/Training-an-SB3-Agent.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "code", - "execution_count": null, + "execution_count": 2, "metadata": {}, "outputs": [], "source": [ @@ -13,7 +13,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 3, "metadata": {}, "outputs": [], "source": [ @@ -22,7 +22,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 4, "metadata": {}, "outputs": [], "source": [ @@ -32,16 +32,24 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 5, "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + } + ], "source": [ "gym = PrimaiteGymEnv(game_config=cfg)" ] }, { "cell_type": "code", - "execution_count": null, + "execution_count": 6, "metadata": {}, "outputs": [], "source": [ @@ -56,7 +64,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 7, "metadata": {}, "outputs": [], "source": [ @@ -65,16 +73,7141 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 8, "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:49:28,065: Resetting environment, episode 0, avg. reward: 0.0\n", + "2024-04-08 14:49:28,068: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_0.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:49:29,639: Resetting environment, episode 1, avg. reward: -17.149999999999974\n", + "2024-04-08 14:49:29,643: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_1.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:49:31,337: Resetting environment, episode 2, avg. reward: -12.099999999999989\n", + "2024-04-08 14:49:31,339: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_2.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:49:32,540: Resetting environment, episode 3, avg. reward: -44.500000000000064\n", + "2024-04-08 14:49:32,543: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_3.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:49:33,721: Resetting environment, episode 4, avg. reward: -22.949999999999953\n", + "2024-04-08 14:49:33,724: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_4.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:49:35,248: Resetting environment, episode 5, avg. reward: -17.64999999999998\n", + "2024-04-08 14:49:35,253: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_5.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:49:36,676: Resetting environment, episode 6, avg. reward: -21.949999999999953\n", + "2024-04-08 14:49:36,679: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_6.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:49:38,158: Resetting environment, episode 7, avg. reward: -88.5999999999998\n", + "2024-04-08 14:49:38,161: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_7.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:49:39,570: Resetting environment, episode 8, avg. reward: -42.750000000000156\n", + "2024-04-08 14:49:39,572: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_8.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:49:40,917: Resetting environment, episode 9, avg. reward: -13.999999999999982\n", + "2024-04-08 14:49:40,920: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_9.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:49:42,112: Resetting environment, episode 10, avg. reward: -34.55000000000001\n", + "2024-04-08 14:49:42,116: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_10.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:49:43,768: Resetting environment, episode 11, avg. reward: -19.399999999999963\n", + "2024-04-08 14:49:43,771: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_11.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:49:45,216: Resetting environment, episode 12, avg. reward: -11.049999999999988\n", + "2024-04-08 14:49:45,219: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_12.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:49:46,830: Resetting environment, episode 13, avg. reward: -33.1\n", + "2024-04-08 14:49:46,833: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_13.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:49:48,302: Resetting environment, episode 14, avg. reward: -17.499999999999968\n", + "2024-04-08 14:49:48,306: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_14.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:49:50,142: Resetting environment, episode 15, avg. reward: -22.299999999999955\n", + "2024-04-08 14:49:50,146: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_15.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:49:51,603: Resetting environment, episode 16, avg. reward: -64.8500000000001\n", + "2024-04-08 14:49:51,606: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_16.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:49:53,295: Resetting environment, episode 17, avg. reward: -67.24999999999999\n", + "2024-04-08 14:49:53,298: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_17.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:49:54,630: Resetting environment, episode 18, avg. reward: -20.799999999999958\n", + "2024-04-08 14:49:54,633: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_18.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:49:56,091: Resetting environment, episode 19, avg. reward: -62.55000000000001\n", + "2024-04-08 14:49:56,093: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_19.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:49:57,486: Resetting environment, episode 20, avg. reward: -24.649999999999984\n", + "2024-04-08 14:49:57,489: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_20.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:49:59,243: Resetting environment, episode 21, avg. reward: -9.649999999999997\n", + "2024-04-08 14:49:59,246: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_21.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:50:00,812: Resetting environment, episode 22, avg. reward: -21.749999999999957\n", + "2024-04-08 14:50:00,815: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_22.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:50:02,403: Resetting environment, episode 23, avg. reward: -15.949999999999978\n", + "2024-04-08 14:50:02,405: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_23.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:50:04,363: Resetting environment, episode 24, avg. reward: -83.15000000000002\n", + "2024-04-08 14:50:04,366: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_24.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:50:06,083: Resetting environment, episode 25, avg. reward: -36.15000000000003\n", + "2024-04-08 14:50:06,085: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_25.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:50:07,813: Resetting environment, episode 26, avg. reward: -67.25000000000007\n", + "2024-04-08 14:50:07,816: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_26.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:50:09,419: Resetting environment, episode 27, avg. reward: -44.200000000000074\n", + "2024-04-08 14:50:09,422: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_27.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:50:10,969: Resetting environment, episode 28, avg. reward: -64.1500000000001\n", + "2024-04-08 14:50:10,973: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_28.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:50:12,518: Resetting environment, episode 29, avg. reward: -18.34999999999997\n", + "2024-04-08 14:50:12,519: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_29.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:50:14,004: Resetting environment, episode 30, avg. reward: -17.69999999999997\n", + "2024-04-08 14:50:14,007: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_30.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:50:16,007: Resetting environment, episode 31, avg. reward: -28.700000000000017\n", + "2024-04-08 14:50:16,010: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_31.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:50:17,755: Resetting environment, episode 32, avg. reward: -53.65000000000015\n", + "2024-04-08 14:50:17,758: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_32.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:50:19,232: Resetting environment, episode 33, avg. reward: -43.65000000000005\n", + "2024-04-08 14:50:19,235: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_33.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:50:20,708: Resetting environment, episode 34, avg. reward: -2.499999999999969\n", + "2024-04-08 14:50:20,711: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_34.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:50:22,081: Resetting environment, episode 35, avg. reward: -51.45000000000008\n", + "2024-04-08 14:50:22,084: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_35.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:50:23,461: Resetting environment, episode 36, avg. reward: -24.749999999999986\n", + "2024-04-08 14:50:23,465: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_36.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:50:24,909: Resetting environment, episode 37, avg. reward: -72.70000000000002\n", + "2024-04-08 14:50:24,912: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_37.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:50:27,049: Resetting environment, episode 38, avg. reward: -16.049999999999976\n", + "2024-04-08 14:50:27,052: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_38.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:50:28,362: Resetting environment, episode 39, avg. reward: -27.79999999999996\n", + "2024-04-08 14:50:28,364: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_39.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:50:29,821: Resetting environment, episode 40, avg. reward: -61.9500000000001\n", + "2024-04-08 14:50:29,824: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_40.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:50:31,787: Resetting environment, episode 41, avg. reward: -36.00000000000004\n", + "2024-04-08 14:50:31,790: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_41.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:50:33,074: Resetting environment, episode 42, avg. reward: -44.35000000000007\n", + "2024-04-08 14:50:33,077: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_42.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:50:34,739: Resetting environment, episode 43, avg. reward: -51.100000000000065\n", + "2024-04-08 14:50:34,742: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_43.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:50:36,357: Resetting environment, episode 44, avg. reward: -65.95000000000002\n", + "2024-04-08 14:50:36,359: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_44.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:50:37,834: Resetting environment, episode 45, avg. reward: -45.750000000000064\n", + "2024-04-08 14:50:37,838: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_45.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:50:39,768: Resetting environment, episode 46, avg. reward: -22.39999999999994\n", + "2024-04-08 14:50:39,774: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_46.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:50:41,672: Resetting environment, episode 47, avg. reward: -18.749999999999993\n", + "2024-04-08 14:50:41,677: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_47.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:50:43,816: Resetting environment, episode 48, avg. reward: -65.4\n", + "2024-04-08 14:50:43,818: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_48.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:50:45,262: Resetting environment, episode 49, avg. reward: -20.09999999999996\n", + "2024-04-08 14:50:45,266: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_49.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:50:46,955: Resetting environment, episode 50, avg. reward: -21.899999999999967\n", + "2024-04-08 14:50:46,958: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_50.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:50:49,698: Resetting environment, episode 51, avg. reward: -20.399999999999963\n", + "2024-04-08 14:50:49,701: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_51.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:50:51,463: Resetting environment, episode 52, avg. reward: -21.399999999999956\n", + "2024-04-08 14:50:51,467: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_52.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:50:53,214: Resetting environment, episode 53, avg. reward: -19.249999999999982\n", + "2024-04-08 14:50:53,218: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_53.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:50:55,080: Resetting environment, episode 54, avg. reward: -57.90000000000009\n", + "2024-04-08 14:50:55,084: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_54.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:50:56,690: Resetting environment, episode 55, avg. reward: -14.099999999999982\n", + "2024-04-08 14:50:56,694: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_55.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:50:58,423: Resetting environment, episode 56, avg. reward: -22.79999999999995\n", + "2024-04-08 14:50:58,427: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_56.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:50:59,941: Resetting environment, episode 57, avg. reward: -18.39999999999997\n", + "2024-04-08 14:50:59,944: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_57.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:51:01,528: Resetting environment, episode 58, avg. reward: -49.25000000000011\n", + "2024-04-08 14:51:01,532: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_58.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:51:03,202: Resetting environment, episode 59, avg. reward: -14.449999999999964\n", + "2024-04-08 14:51:03,204: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_59.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:51:04,611: Resetting environment, episode 60, avg. reward: -11.649999999999991\n", + "2024-04-08 14:51:04,614: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_60.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:51:06,388: Resetting environment, episode 61, avg. reward: -17.59999999999997\n", + "2024-04-08 14:51:06,391: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_61.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:51:07,952: Resetting environment, episode 62, avg. reward: -68.39999999999998\n", + "2024-04-08 14:51:07,956: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_62.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:51:09,416: Resetting environment, episode 63, avg. reward: -19.999999999999957\n", + "2024-04-08 14:51:09,420: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_63.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:51:10,728: Resetting environment, episode 64, avg. reward: -49.25000000000008\n", + "2024-04-08 14:51:10,731: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_64.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:51:12,298: Resetting environment, episode 65, avg. reward: -21.29999999999999\n", + "2024-04-08 14:51:12,302: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_65.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:51:14,232: Resetting environment, episode 66, avg. reward: -46.55000000000018\n", + "2024-04-08 14:51:14,235: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_66.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:51:15,645: Resetting environment, episode 67, avg. reward: -30.050000000000008\n", + "2024-04-08 14:51:15,648: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_67.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:51:17,264: Resetting environment, episode 68, avg. reward: -72.80000000000003\n", + "2024-04-08 14:51:17,268: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_68.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:51:18,742: Resetting environment, episode 69, avg. reward: -100.84999999999998\n", + "2024-04-08 14:51:18,745: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_69.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:51:20,149: Resetting environment, episode 70, avg. reward: -33.85000000000002\n", + "2024-04-08 14:51:20,153: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_70.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:51:21,992: Resetting environment, episode 71, avg. reward: -93.30000000000003\n", + "2024-04-08 14:51:21,995: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_71.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:51:23,375: Resetting environment, episode 72, avg. reward: -18.049999999999965\n", + "2024-04-08 14:51:23,378: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_72.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:51:24,808: Resetting environment, episode 73, avg. reward: -52.80000000000021\n", + "2024-04-08 14:51:24,811: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_73.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:51:26,230: Resetting environment, episode 74, avg. reward: -16.449999999999974\n", + "2024-04-08 14:51:26,234: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_74.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:51:27,721: Resetting environment, episode 75, avg. reward: -56.400000000000006\n", + "2024-04-08 14:51:27,724: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_75.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:51:29,150: Resetting environment, episode 76, avg. reward: -13.799999999999976\n", + "2024-04-08 14:51:29,152: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_76.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:51:30,654: Resetting environment, episode 77, avg. reward: -22.749999999999996\n", + "2024-04-08 14:51:30,658: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_77.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:51:32,221: Resetting environment, episode 78, avg. reward: -8.949999999999998\n", + "2024-04-08 14:51:32,224: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_78.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:51:33,561: Resetting environment, episode 79, avg. reward: -35.84999999999997\n", + "2024-04-08 14:51:33,565: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_79.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:51:35,158: Resetting environment, episode 80, avg. reward: -7.049999999999989\n", + "2024-04-08 14:51:35,160: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_80.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:51:37,129: Resetting environment, episode 81, avg. reward: -27.349999999999984\n", + "2024-04-08 14:51:37,131: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_81.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:51:38,672: Resetting environment, episode 82, avg. reward: -40.65000000000012\n", + "2024-04-08 14:51:38,675: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_82.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:51:41,263: Resetting environment, episode 83, avg. reward: -52.10000000000015\n", + "2024-04-08 14:51:41,267: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_83.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:51:42,701: Resetting environment, episode 84, avg. reward: -21.649999999999956\n", + "2024-04-08 14:51:42,705: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_84.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:51:44,319: Resetting environment, episode 85, avg. reward: -31.600000000000016\n", + "2024-04-08 14:51:44,322: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_85.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:51:45,992: Resetting environment, episode 86, avg. reward: -24.300000000000004\n", + "2024-04-08 14:51:45,992: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_86.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:51:47,709: Resetting environment, episode 87, avg. reward: -11.849999999999982\n", + "2024-04-08 14:51:47,711: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_87.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:51:49,249: Resetting environment, episode 88, avg. reward: -11.799999999999992\n", + "2024-04-08 14:51:49,252: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_88.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:51:50,852: Resetting environment, episode 89, avg. reward: -10.099999999999964\n", + "2024-04-08 14:51:50,854: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_89.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:51:52,578: Resetting environment, episode 90, avg. reward: -27.799999999999972\n", + "2024-04-08 14:51:52,581: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_90.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:51:54,406: Resetting environment, episode 91, avg. reward: -23.04999999999995\n", + "2024-04-08 14:51:54,410: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_91.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:51:56,371: Resetting environment, episode 92, avg. reward: -18.449999999999967\n", + "2024-04-08 14:51:56,375: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_92.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:51:58,036: Resetting environment, episode 93, avg. reward: -12.04999999999997\n", + "2024-04-08 14:51:58,040: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_93.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:51:59,859: Resetting environment, episode 94, avg. reward: -10.749999999999984\n", + "2024-04-08 14:51:59,862: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_94.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:52:01,324: Resetting environment, episode 95, avg. reward: -16.999999999999975\n", + "2024-04-08 14:52:01,327: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_95.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:52:03,061: Resetting environment, episode 96, avg. reward: -64.80000000000003\n", + "2024-04-08 14:52:03,064: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_96.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:52:04,843: Resetting environment, episode 97, avg. reward: -93.19999999999995\n", + "2024-04-08 14:52:04,846: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_97.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:52:06,197: Resetting environment, episode 98, avg. reward: -23.44999999999995\n", + "2024-04-08 14:52:06,200: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_98.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:52:07,802: Resetting environment, episode 99, avg. reward: 1.7500000000000147\n", + "2024-04-08 14:52:07,810: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_99.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:52:09,595: Resetting environment, episode 100, avg. reward: -31.450000000000003\n", + "2024-04-08 14:52:09,598: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_100.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:52:11,206: Resetting environment, episode 101, avg. reward: -9.499999999999988\n", + "2024-04-08 14:52:11,209: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_101.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:52:13,334: Resetting environment, episode 102, avg. reward: -15.149999999999983\n", + "2024-04-08 14:52:13,337: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_102.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:52:15,208: Resetting environment, episode 103, avg. reward: 0.2500000000000171\n", + "2024-04-08 14:52:15,212: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_103.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:52:17,126: Resetting environment, episode 104, avg. reward: 14.55\n", + "2024-04-08 14:52:17,130: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_104.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:52:18,662: Resetting environment, episode 105, avg. reward: -16.04999999999997\n", + "2024-04-08 14:52:18,666: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_105.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:52:20,144: Resetting environment, episode 106, avg. reward: -80.69999999999997\n", + "2024-04-08 14:52:20,147: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_106.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:52:21,595: Resetting environment, episode 107, avg. reward: -16.099999999999977\n", + "2024-04-08 14:52:21,599: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_107.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:52:23,331: Resetting environment, episode 108, avg. reward: -46.80000000000007\n", + "2024-04-08 14:52:23,335: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_108.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:52:25,083: Resetting environment, episode 109, avg. reward: -22.84999999999995\n", + "2024-04-08 14:52:25,086: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_109.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:52:26,589: Resetting environment, episode 110, avg. reward: -10.199999999999996\n", + "2024-04-08 14:52:26,592: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_110.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:52:28,410: Resetting environment, episode 111, avg. reward: -95.99999999999997\n", + "2024-04-08 14:52:28,413: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_111.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:52:29,966: Resetting environment, episode 112, avg. reward: -17.59999999999997\n", + "2024-04-08 14:52:29,969: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_112.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:52:31,317: Resetting environment, episode 113, avg. reward: -20.099999999999962\n", + "2024-04-08 14:52:31,321: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_113.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:52:32,840: Resetting environment, episode 114, avg. reward: -42.850000000000165\n", + "2024-04-08 14:52:32,843: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_114.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:52:34,336: Resetting environment, episode 115, avg. reward: -22.249999999999954\n", + "2024-04-08 14:52:34,339: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_115.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:52:35,794: Resetting environment, episode 116, avg. reward: -90.9\n", + "2024-04-08 14:52:35,797: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_116.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:52:37,489: Resetting environment, episode 117, avg. reward: 5.90000000000003\n", + "2024-04-08 14:52:37,492: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_117.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:52:39,009: Resetting environment, episode 118, avg. reward: -66.1\n", + "2024-04-08 14:52:39,012: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_118.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:52:40,602: Resetting environment, episode 119, avg. reward: -36.749999999999964\n", + "2024-04-08 14:52:40,605: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_119.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:52:42,128: Resetting environment, episode 120, avg. reward: -13.79999999999999\n", + "2024-04-08 14:52:42,131: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_120.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:52:43,990: Resetting environment, episode 121, avg. reward: -30.750000000000007\n", + "2024-04-08 14:52:43,993: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_121.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:52:45,565: Resetting environment, episode 122, avg. reward: -99.95\n", + "2024-04-08 14:52:45,568: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_122.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:52:48,013: Resetting environment, episode 123, avg. reward: 0.3500000000000256\n", + "2024-04-08 14:52:48,016: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_123.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:52:50,029: Resetting environment, episode 124, avg. reward: -15.299999999999981\n", + "2024-04-08 14:52:50,032: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_124.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:52:51,501: Resetting environment, episode 125, avg. reward: -15.149999999999975\n", + "2024-04-08 14:52:51,502: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_125.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:52:53,184: Resetting environment, episode 126, avg. reward: -90.35\n", + "2024-04-08 14:52:53,186: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_126.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:52:54,836: Resetting environment, episode 127, avg. reward: -19.9\n", + "2024-04-08 14:52:54,839: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_127.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:52:56,110: Resetting environment, episode 128, avg. reward: -17.299999999999976\n", + "2024-04-08 14:52:56,113: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_128.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:52:57,610: Resetting environment, episode 129, avg. reward: -12.499999999999996\n", + "2024-04-08 14:52:57,613: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_129.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:52:59,237: Resetting environment, episode 130, avg. reward: -17.24999999999996\n", + "2024-04-08 14:52:59,240: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_130.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:53:00,835: Resetting environment, episode 131, avg. reward: -11.64999999999998\n", + "2024-04-08 14:53:00,838: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_131.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:53:02,203: Resetting environment, episode 132, avg. reward: -27.799999999999986\n", + "2024-04-08 14:53:02,206: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_132.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:53:03,544: Resetting environment, episode 133, avg. reward: -10.399999999999997\n", + "2024-04-08 14:53:03,547: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_133.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:53:04,974: Resetting environment, episode 134, avg. reward: -18.0\n", + "2024-04-08 14:53:04,977: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_134.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:53:06,363: Resetting environment, episode 135, avg. reward: -84.0\n", + "2024-04-08 14:53:06,367: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_135.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:53:07,884: Resetting environment, episode 136, avg. reward: -20.949999999999964\n", + "2024-04-08 14:53:07,886: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_136.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:53:09,146: Resetting environment, episode 137, avg. reward: -13.749999999999984\n", + "2024-04-08 14:53:09,149: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_137.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:53:10,482: Resetting environment, episode 138, avg. reward: -15.299999999999976\n", + "2024-04-08 14:53:10,484: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_138.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:53:11,761: Resetting environment, episode 139, avg. reward: -87.34999999999994\n", + "2024-04-08 14:53:11,764: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_139.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:53:13,069: Resetting environment, episode 140, avg. reward: -13.249999999999986\n", + "2024-04-08 14:53:13,072: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_140.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:53:14,623: Resetting environment, episode 141, avg. reward: -22.499999999999968\n", + "2024-04-08 14:53:14,626: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_141.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:53:16,023: Resetting environment, episode 142, avg. reward: -42.25\n", + "2024-04-08 14:53:16,026: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_142.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:53:17,572: Resetting environment, episode 143, avg. reward: -16.35000000000001\n", + "2024-04-08 14:53:17,575: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_143.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:53:18,887: Resetting environment, episode 144, avg. reward: -80.9\n", + "2024-04-08 14:53:18,891: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_144.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:53:20,236: Resetting environment, episode 145, avg. reward: -15.299999999999974\n", + "2024-04-08 14:53:20,239: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_145.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:53:21,625: Resetting environment, episode 146, avg. reward: -21.799999999999955\n", + "2024-04-08 14:53:21,628: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_146.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:53:23,799: Resetting environment, episode 147, avg. reward: -13.599999999999998\n", + "2024-04-08 14:53:23,802: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_147.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:53:25,308: Resetting environment, episode 148, avg. reward: -99.1\n", + "2024-04-08 14:53:25,310: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_148.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:53:27,254: Resetting environment, episode 149, avg. reward: -16.74999999999997\n", + "2024-04-08 14:53:27,259: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_149.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:53:29,053: Resetting environment, episode 150, avg. reward: -10.749999999999979\n", + "2024-04-08 14:53:29,057: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_150.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:53:30,939: Resetting environment, episode 151, avg. reward: -74.05\n", + "2024-04-08 14:53:30,942: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_151.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:53:32,476: Resetting environment, episode 152, avg. reward: -71.6\n", + "2024-04-08 14:53:32,476: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_152.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:53:34,490: Resetting environment, episode 153, avg. reward: -11.749999999999961\n", + "2024-04-08 14:53:34,493: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_153.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:53:36,594: Resetting environment, episode 154, avg. reward: -8.700000000000005\n", + "2024-04-08 14:53:36,598: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_154.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:53:38,245: Resetting environment, episode 155, avg. reward: -21.649999999999956\n", + "2024-04-08 14:53:38,249: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_155.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:53:39,875: Resetting environment, episode 156, avg. reward: -7.649999999999994\n", + "2024-04-08 14:53:39,879: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_156.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:53:41,685: Resetting environment, episode 157, avg. reward: -80.54999999999998\n", + "2024-04-08 14:53:41,690: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_157.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:53:43,273: Resetting environment, episode 158, avg. reward: -14.799999999999978\n", + "2024-04-08 14:53:43,279: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_158.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:53:44,718: Resetting environment, episode 159, avg. reward: -8.299999999999976\n", + "2024-04-08 14:53:44,720: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_159.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:53:46,211: Resetting environment, episode 160, avg. reward: -45.05000000000009\n", + "2024-04-08 14:53:46,215: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_160.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:53:48,427: Resetting environment, episode 161, avg. reward: -0.29999999999997673\n", + "2024-04-08 14:53:48,431: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_161.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:53:50,514: Resetting environment, episode 162, avg. reward: -24.199999999999946\n", + "2024-04-08 14:53:50,517: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_162.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:53:52,023: Resetting environment, episode 163, avg. reward: -22.249999999999954\n", + "2024-04-08 14:53:52,027: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_163.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:53:53,865: Resetting environment, episode 164, avg. reward: -16.44999999999996\n", + "2024-04-08 14:53:53,868: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_164.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:53:55,434: Resetting environment, episode 165, avg. reward: -75.8\n", + "2024-04-08 14:53:55,437: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_165.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:53:57,361: Resetting environment, episode 166, avg. reward: -15.74999999999998\n", + "2024-04-08 14:53:57,364: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_166.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:53:59,167: Resetting environment, episode 167, avg. reward: -97.04999999999997\n", + "2024-04-08 14:53:59,171: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_167.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:54:00,965: Resetting environment, episode 168, avg. reward: -26.450000000000006\n", + "2024-04-08 14:54:00,970: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_168.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:54:02,555: Resetting environment, episode 169, avg. reward: -1.7999999999999803\n", + "2024-04-08 14:54:02,556: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_169.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:54:04,283: Resetting environment, episode 170, avg. reward: -16.499999999999964\n", + "2024-04-08 14:54:04,292: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_170.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:54:06,710: Resetting environment, episode 171, avg. reward: -56.99999999999997\n", + "2024-04-08 14:54:06,714: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_171.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:54:08,495: Resetting environment, episode 172, avg. reward: -5.550000000000001\n", + "2024-04-08 14:54:08,502: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_172.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:54:10,090: Resetting environment, episode 173, avg. reward: -16.249999999999968\n", + "2024-04-08 14:54:10,094: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_173.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:54:13,065: Resetting environment, episode 174, avg. reward: -6.6499999999999915\n", + "2024-04-08 14:54:13,071: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_174.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:54:15,757: Resetting environment, episode 175, avg. reward: -3.7499999999999707\n", + "2024-04-08 14:54:15,761: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_175.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:54:18,490: Resetting environment, episode 176, avg. reward: 34.24999999999989\n", + "2024-04-08 14:54:18,493: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_176.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:54:20,751: Resetting environment, episode 177, avg. reward: -15.999999999999977\n", + "2024-04-08 14:54:20,755: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_177.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:54:23,269: Resetting environment, episode 178, avg. reward: -80.50000000000001\n", + "2024-04-08 14:54:23,273: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_178.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:54:25,507: Resetting environment, episode 179, avg. reward: -12.849999999999989\n", + "2024-04-08 14:54:25,510: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_179.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:54:27,454: Resetting environment, episode 180, avg. reward: -16.949999999999996\n", + "2024-04-08 14:54:27,458: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_180.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:54:29,884: Resetting environment, episode 181, avg. reward: 1.9000000000000221\n", + "2024-04-08 14:54:29,887: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_181.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:54:32,113: Resetting environment, episode 182, avg. reward: 9.500000000000046\n", + "2024-04-08 14:54:32,117: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_182.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:54:34,283: Resetting environment, episode 183, avg. reward: -91.0500000000001\n", + "2024-04-08 14:54:34,286: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_183.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:54:36,330: Resetting environment, episode 184, avg. reward: -43.15000000000006\n", + "2024-04-08 14:54:36,332: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_184.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:54:38,270: Resetting environment, episode 185, avg. reward: -99.0\n", + "2024-04-08 14:54:38,274: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_185.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:54:40,645: Resetting environment, episode 186, avg. reward: -19.849999999999962\n", + "2024-04-08 14:54:40,648: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_186.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:54:42,998: Resetting environment, episode 187, avg. reward: -24.299999999999983\n", + "2024-04-08 14:54:43,002: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_187.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:54:45,260: Resetting environment, episode 188, avg. reward: -15.449999999999973\n", + "2024-04-08 14:54:45,263: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_188.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:54:47,356: Resetting environment, episode 189, avg. reward: -46.15000000000005\n", + "2024-04-08 14:54:47,362: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_189.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:54:49,422: Resetting environment, episode 190, avg. reward: -15.849999999999996\n", + "2024-04-08 14:54:49,425: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_190.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:54:51,753: Resetting environment, episode 191, avg. reward: 2.200000000000034\n", + "2024-04-08 14:54:51,757: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_191.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:54:54,077: Resetting environment, episode 192, avg. reward: 8.950000000000049\n", + "2024-04-08 14:54:54,081: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_192.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:54:56,257: Resetting environment, episode 193, avg. reward: -10.949999999999985\n", + "2024-04-08 14:54:56,261: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_193.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:54:59,376: Resetting environment, episode 194, avg. reward: -23.449999999999957\n", + "2024-04-08 14:54:59,379: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_194.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:55:02,626: Resetting environment, episode 195, avg. reward: -98.24999999999996\n", + "2024-04-08 14:55:02,630: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_195.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:55:05,232: Resetting environment, episode 196, avg. reward: -20.299999999999976\n", + "2024-04-08 14:55:05,236: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_196.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:55:08,026: Resetting environment, episode 197, avg. reward: -6.399999999999993\n", + "2024-04-08 14:55:08,029: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_197.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:55:09,878: Resetting environment, episode 198, avg. reward: -20.099999999999962\n", + "2024-04-08 14:55:09,882: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_198.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:55:12,337: Resetting environment, episode 199, avg. reward: -20.59999999999996\n", + "2024-04-08 14:55:12,340: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_199.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:55:14,794: Resetting environment, episode 200, avg. reward: -80.65000000000002\n", + "2024-04-08 14:55:14,798: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_200.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:55:17,788: Resetting environment, episode 201, avg. reward: 11.249999999999932\n", + "2024-04-08 14:55:17,792: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_201.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:55:20,227: Resetting environment, episode 202, avg. reward: -85.35\n", + "2024-04-08 14:55:20,230: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_202.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:55:22,623: Resetting environment, episode 203, avg. reward: -67.9\n", + "2024-04-08 14:55:22,626: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_203.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:55:27,001: Resetting environment, episode 204, avg. reward: -94.30000000000017\n", + "2024-04-08 14:55:27,004: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_204.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:55:28,803: Resetting environment, episode 205, avg. reward: -30.39999999999997\n", + "2024-04-08 14:55:28,808: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_205.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:55:30,621: Resetting environment, episode 206, avg. reward: -25.14999999999995\n", + "2024-04-08 14:55:30,623: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_206.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:55:32,191: Resetting environment, episode 207, avg. reward: -98.14999999999998\n", + "2024-04-08 14:55:32,194: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_207.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:55:33,920: Resetting environment, episode 208, avg. reward: -17.64999999999998\n", + "2024-04-08 14:55:33,923: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_208.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:55:36,333: Resetting environment, episode 209, avg. reward: -88.25\n", + "2024-04-08 14:55:36,336: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_209.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:55:38,489: Resetting environment, episode 210, avg. reward: -85.35\n", + "2024-04-08 14:55:38,494: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_210.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:55:40,664: Resetting environment, episode 211, avg. reward: -15.649999999999979\n", + "2024-04-08 14:55:40,668: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_211.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:55:42,341: Resetting environment, episode 212, avg. reward: -15.24999999999998\n", + "2024-04-08 14:55:42,344: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_212.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:55:43,931: Resetting environment, episode 213, avg. reward: -100.25000000000009\n", + "2024-04-08 14:55:43,935: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_213.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:55:45,687: Resetting environment, episode 214, avg. reward: -50.59999999999998\n", + "2024-04-08 14:55:45,690: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_214.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:55:47,397: Resetting environment, episode 215, avg. reward: -14.94999999999998\n", + "2024-04-08 14:55:47,400: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_215.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:55:49,303: Resetting environment, episode 216, avg. reward: -91.64999999999995\n", + "2024-04-08 14:55:49,306: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_216.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:55:50,916: Resetting environment, episode 217, avg. reward: -75.89999999999999\n", + "2024-04-08 14:55:50,918: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_217.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:55:53,007: Resetting environment, episode 218, avg. reward: -91.50000000000007\n", + "2024-04-08 14:55:53,011: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_218.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:55:55,088: Resetting environment, episode 219, avg. reward: -8.300000000000004\n", + "2024-04-08 14:55:55,092: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_219.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:55:57,164: Resetting environment, episode 220, avg. reward: -29.449999999999996\n", + "2024-04-08 14:55:57,167: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_220.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:55:58,938: Resetting environment, episode 221, avg. reward: -38.20000000000004\n", + "2024-04-08 14:55:58,942: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_221.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:56:00,655: Resetting environment, episode 222, avg. reward: -38.60000000000001\n", + "2024-04-08 14:56:00,658: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_222.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:56:02,297: Resetting environment, episode 223, avg. reward: -37.79999999999999\n", + "2024-04-08 14:56:02,300: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_223.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:56:03,931: Resetting environment, episode 224, avg. reward: -53.24999999999996\n", + "2024-04-08 14:56:03,935: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_224.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:56:05,761: Resetting environment, episode 225, avg. reward: -77.99999999999997\n", + "2024-04-08 14:56:05,764: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_225.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:56:07,294: Resetting environment, episode 226, avg. reward: -26.799999999999972\n", + "2024-04-08 14:56:07,298: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_226.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:56:09,002: Resetting environment, episode 227, avg. reward: -94.5500000000001\n", + "2024-04-08 14:56:09,006: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_227.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:56:10,831: Resetting environment, episode 228, avg. reward: -76.05000000000001\n", + "2024-04-08 14:56:10,834: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_228.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:56:12,658: Resetting environment, episode 229, avg. reward: 3.350000000000028\n", + "2024-04-08 14:56:12,661: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_229.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:56:14,404: Resetting environment, episode 230, avg. reward: -51.25000000000004\n", + "2024-04-08 14:56:14,409: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_230.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:56:16,439: Resetting environment, episode 231, avg. reward: -86.5\n", + "2024-04-08 14:56:16,442: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_231.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:56:18,025: Resetting environment, episode 232, avg. reward: -9.550000000000002\n", + "2024-04-08 14:56:18,029: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_232.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:56:19,978: Resetting environment, episode 233, avg. reward: -46.75\n", + "2024-04-08 14:56:19,982: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_233.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:56:21,638: Resetting environment, episode 234, avg. reward: -87.14999999999999\n", + "2024-04-08 14:56:21,642: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_234.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:56:23,262: Resetting environment, episode 235, avg. reward: -60.94999999999995\n", + "2024-04-08 14:56:23,265: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_235.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:56:24,866: Resetting environment, episode 236, avg. reward: -5.299999999999963\n", + "2024-04-08 14:56:24,870: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_236.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:56:26,594: Resetting environment, episode 237, avg. reward: -7.49999999999999\n", + "2024-04-08 14:56:26,597: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_237.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:56:29,812: Resetting environment, episode 238, avg. reward: -4.749999999999977\n", + "2024-04-08 14:56:29,815: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_238.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:56:31,530: Resetting environment, episode 239, avg. reward: -13.349999999999982\n", + "2024-04-08 14:56:31,533: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_239.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:56:33,444: Resetting environment, episode 240, avg. reward: -0.599999999999985\n", + "2024-04-08 14:56:33,447: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_240.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:56:35,290: Resetting environment, episode 241, avg. reward: -95.3\n", + "2024-04-08 14:56:35,292: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_241.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:56:36,923: Resetting environment, episode 242, avg. reward: -94.94999999999996\n", + "2024-04-08 14:56:36,927: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_242.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:56:38,916: Resetting environment, episode 243, avg. reward: -72.49999999999993\n", + "2024-04-08 14:56:38,919: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_243.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:56:40,743: Resetting environment, episode 244, avg. reward: -0.7499999999999888\n", + "2024-04-08 14:56:40,746: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_244.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:56:42,525: Resetting environment, episode 245, avg. reward: -2.5999999999999943\n", + "2024-04-08 14:56:42,528: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_245.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:56:44,452: Resetting environment, episode 246, avg. reward: -79.40000000000002\n", + "2024-04-08 14:56:44,455: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_246.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:56:46,246: Resetting environment, episode 247, avg. reward: -72.7\n", + "2024-04-08 14:56:46,249: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_247.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:56:48,054: Resetting environment, episode 248, avg. reward: -26.04999999999994\n", + "2024-04-08 14:56:48,058: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_248.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:56:50,022: Resetting environment, episode 249, avg. reward: -51.100000000000016\n", + "2024-04-08 14:56:50,025: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_249.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:56:51,853: Resetting environment, episode 250, avg. reward: -9.89999999999996\n", + "2024-04-08 14:56:51,857: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_250.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:56:53,997: Resetting environment, episode 251, avg. reward: -64.64999999999995\n", + "2024-04-08 14:56:54,001: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_251.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:56:56,347: Resetting environment, episode 252, avg. reward: -44.999999999999964\n", + "2024-04-08 14:56:56,350: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_252.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:56:58,286: Resetting environment, episode 253, avg. reward: -91.30000000000001\n", + "2024-04-08 14:56:58,288: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_253.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:57:00,634: Resetting environment, episode 254, avg. reward: -95.24999999999997\n", + "2024-04-08 14:57:00,638: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_254.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:57:02,345: Resetting environment, episode 255, avg. reward: -15.099999999999978\n", + "2024-04-08 14:57:02,350: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_255.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:57:04,152: Resetting environment, episode 256, avg. reward: -84.75000000000011\n", + "2024-04-08 14:57:04,155: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_256.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:57:05,658: Resetting environment, episode 257, avg. reward: -17.399999999999974\n", + "2024-04-08 14:57:05,661: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_257.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:57:07,257: Resetting environment, episode 258, avg. reward: -17.74999999999997\n", + "2024-04-08 14:57:07,267: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_258.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:57:09,280: Resetting environment, episode 259, avg. reward: -95.50000000000001\n", + "2024-04-08 14:57:09,283: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_259.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:57:11,050: Resetting environment, episode 260, avg. reward: -1.4499999999999633\n", + "2024-04-08 14:57:11,054: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_260.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:57:13,023: Resetting environment, episode 261, avg. reward: -92.59999999999997\n", + "2024-04-08 14:57:13,026: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_261.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:57:14,723: Resetting environment, episode 262, avg. reward: -2.5999999999999814\n", + "2024-04-08 14:57:14,726: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_262.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:57:17,321: Resetting environment, episode 263, avg. reward: -60.95000000000002\n", + "2024-04-08 14:57:17,324: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_263.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:57:19,220: Resetting environment, episode 264, avg. reward: -19.449999999999964\n", + "2024-04-08 14:57:19,223: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_264.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:57:21,072: Resetting environment, episode 265, avg. reward: -86.4\n", + "2024-04-08 14:57:21,076: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_265.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:57:22,895: Resetting environment, episode 266, avg. reward: -91.89999999999996\n", + "2024-04-08 14:57:22,899: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_266.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:57:24,815: Resetting environment, episode 267, avg. reward: -44.5\n", + "2024-04-08 14:57:24,819: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_267.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:57:26,841: Resetting environment, episode 268, avg. reward: -3.3999999999999875\n", + "2024-04-08 14:57:26,845: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_268.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:57:28,525: Resetting environment, episode 269, avg. reward: -61.79999999999996\n", + "2024-04-08 14:57:28,528: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_269.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:57:30,709: Resetting environment, episode 270, avg. reward: -72.09999999999991\n", + "2024-04-08 14:57:30,712: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_270.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:57:33,009: Resetting environment, episode 271, avg. reward: -10.749999999999986\n", + "2024-04-08 14:57:33,012: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_271.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:57:34,883: Resetting environment, episode 272, avg. reward: -9.799999999999994\n", + "2024-04-08 14:57:34,886: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_272.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:57:36,728: Resetting environment, episode 273, avg. reward: -59.85000000000001\n", + "2024-04-08 14:57:36,730: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_273.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:57:38,769: Resetting environment, episode 274, avg. reward: -33.500000000000014\n", + "2024-04-08 14:57:38,772: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_274.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:57:40,947: Resetting environment, episode 275, avg. reward: -50.44999999999995\n", + "2024-04-08 14:57:40,950: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_275.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:57:44,475: Resetting environment, episode 276, avg. reward: -5.800000000000008\n", + "2024-04-08 14:57:44,479: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_276.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:57:47,898: Resetting environment, episode 277, avg. reward: -13.899999999999979\n", + "2024-04-08 14:57:47,901: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_277.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:57:50,377: Resetting environment, episode 278, avg. reward: -101.4\n", + "2024-04-08 14:57:50,380: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_278.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:57:52,619: Resetting environment, episode 279, avg. reward: 0.9500000000000095\n", + "2024-04-08 14:57:52,621: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_279.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:57:54,559: Resetting environment, episode 280, avg. reward: -86.94999999999999\n", + "2024-04-08 14:57:54,562: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_280.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:57:56,801: Resetting environment, episode 281, avg. reward: -6.999999999999982\n", + "2024-04-08 14:57:56,803: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_281.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:57:58,672: Resetting environment, episode 282, avg. reward: 11.200000000000063\n", + "2024-04-08 14:57:58,675: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_282.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:58:00,781: Resetting environment, episode 283, avg. reward: -78.80000000000007\n", + "2024-04-08 14:58:00,785: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_283.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:58:02,893: Resetting environment, episode 284, avg. reward: -68.24999999999996\n", + "2024-04-08 14:58:02,896: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_284.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:58:04,854: Resetting environment, episode 285, avg. reward: -43.44999999999995\n", + "2024-04-08 14:58:04,858: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_285.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:58:07,133: Resetting environment, episode 286, avg. reward: -4.199999999999984\n", + "2024-04-08 14:58:07,136: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_286.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:58:09,427: Resetting environment, episode 287, avg. reward: 25.550000000000022\n", + "2024-04-08 14:58:09,430: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_287.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:58:11,576: Resetting environment, episode 288, avg. reward: -11.599999999999985\n", + "2024-04-08 14:58:11,580: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_288.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:58:13,448: Resetting environment, episode 289, avg. reward: -37.44999999999999\n", + "2024-04-08 14:58:13,451: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_289.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:58:15,328: Resetting environment, episode 290, avg. reward: -78.99999999999999\n", + "2024-04-08 14:58:15,331: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_290.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:58:18,155: Resetting environment, episode 291, avg. reward: -56.800000000000026\n", + "2024-04-08 14:58:18,159: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_291.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:58:20,609: Resetting environment, episode 292, avg. reward: -91.19999999999995\n", + "2024-04-08 14:58:20,614: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_292.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:58:22,444: Resetting environment, episode 293, avg. reward: 5.200000000000042\n", + "2024-04-08 14:58:22,447: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_293.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:58:24,809: Resetting environment, episode 294, avg. reward: -20.550000000000047\n", + "2024-04-08 14:58:24,814: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_294.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:58:26,613: Resetting environment, episode 295, avg. reward: -90.79999999999998\n", + "2024-04-08 14:58:26,616: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_295.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:58:28,191: Resetting environment, episode 296, avg. reward: -81.50000000000001\n", + "2024-04-08 14:58:28,191: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_296.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:58:30,080: Resetting environment, episode 297, avg. reward: 18.799999999999965\n", + "2024-04-08 14:58:30,083: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_297.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:58:32,060: Resetting environment, episode 298, avg. reward: -16.649999999999995\n", + "2024-04-08 14:58:32,062: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_298.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:58:34,037: Resetting environment, episode 299, avg. reward: 10.250000000000062\n", + "2024-04-08 14:58:34,040: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_299.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:58:36,089: Resetting environment, episode 300, avg. reward: -41.89999999999998\n", + "2024-04-08 14:58:36,092: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_300.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:58:38,616: Resetting environment, episode 301, avg. reward: 7.69999999999999\n", + "2024-04-08 14:58:38,616: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_301.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:58:40,914: Resetting environment, episode 302, avg. reward: 39.7999999999998\n", + "2024-04-08 14:58:40,918: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_302.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:58:42,618: Resetting environment, episode 303, avg. reward: 6.25000000000006\n", + "2024-04-08 14:58:42,622: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_303.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:58:44,477: Resetting environment, episode 304, avg. reward: -31.200000000000017\n", + "2024-04-08 14:58:44,477: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_304.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:58:46,336: Resetting environment, episode 305, avg. reward: -93.50000000000017\n", + "2024-04-08 14:58:46,340: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_305.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:58:48,689: Resetting environment, episode 306, avg. reward: -33.549999999999955\n", + "2024-04-08 14:58:48,693: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_306.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:58:51,197: Resetting environment, episode 307, avg. reward: -11.599999999999987\n", + "2024-04-08 14:58:51,200: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_307.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:58:53,602: Resetting environment, episode 308, avg. reward: -23.900000000000034\n", + "2024-04-08 14:58:53,605: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_308.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:58:56,033: Resetting environment, episode 309, avg. reward: 3.500000000000001\n", + "2024-04-08 14:58:56,037: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_309.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:58:58,038: Resetting environment, episode 310, avg. reward: 16.04999999999999\n", + "2024-04-08 14:58:58,046: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_310.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:59:00,171: Resetting environment, episode 311, avg. reward: -13.449999999999982\n", + "2024-04-08 14:59:00,174: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_311.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:59:02,046: Resetting environment, episode 312, avg. reward: -82.39999999999998\n", + "2024-04-08 14:59:02,057: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_312.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:59:03,942: Resetting environment, episode 313, avg. reward: 0.3000000000000045\n", + "2024-04-08 14:59:03,944: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_313.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:59:05,578: Resetting environment, episode 314, avg. reward: -90.35000000000015\n", + "2024-04-08 14:59:05,582: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_314.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:59:07,340: Resetting environment, episode 315, avg. reward: 3.3000000000000043\n", + "2024-04-08 14:59:07,343: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_315.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:59:09,117: Resetting environment, episode 316, avg. reward: -44.74999999999995\n", + "2024-04-08 14:59:09,128: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_316.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:59:11,162: Resetting environment, episode 317, avg. reward: 8.450000000000045\n", + "2024-04-08 14:59:11,165: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_317.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:59:13,123: Resetting environment, episode 318, avg. reward: -10.049999999999985\n", + "2024-04-08 14:59:13,127: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_318.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:59:18,061: Resetting environment, episode 319, avg. reward: -17.04999999999999\n", + "2024-04-08 14:59:18,067: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_319.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:59:19,985: Resetting environment, episode 320, avg. reward: -81.19999999999999\n", + "2024-04-08 14:59:19,989: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_320.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:59:22,591: Resetting environment, episode 321, avg. reward: 25.900000000000055\n", + "2024-04-08 14:59:22,593: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_321.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:59:25,075: Resetting environment, episode 322, avg. reward: -6.0500000000000025\n", + "2024-04-08 14:59:25,079: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_322.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:59:27,224: Resetting environment, episode 323, avg. reward: -0.349999999999965\n", + "2024-04-08 14:59:27,227: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_323.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:59:29,419: Resetting environment, episode 324, avg. reward: -42.45\n", + "2024-04-08 14:59:29,423: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_324.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:59:31,350: Resetting environment, episode 325, avg. reward: -36.199999999999974\n", + "2024-04-08 14:59:31,353: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_325.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:59:33,118: Resetting environment, episode 326, avg. reward: -27.699999999999996\n", + "2024-04-08 14:59:33,120: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_326.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:59:35,352: Resetting environment, episode 327, avg. reward: 32.74999999999989\n", + "2024-04-08 14:59:35,356: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_327.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:59:37,251: Resetting environment, episode 328, avg. reward: -16.34999999999998\n", + "2024-04-08 14:59:37,254: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_328.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:59:39,253: Resetting environment, episode 329, avg. reward: -8.000000000000007\n", + "2024-04-08 14:59:39,259: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_329.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:59:41,104: Resetting environment, episode 330, avg. reward: -78.60000000000001\n", + "2024-04-08 14:59:41,107: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_330.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:59:43,172: Resetting environment, episode 331, avg. reward: 12.800000000000024\n", + "2024-04-08 14:59:43,176: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_331.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:59:45,374: Resetting environment, episode 332, avg. reward: 13.349999999999932\n", + "2024-04-08 14:59:45,378: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_332.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:59:47,299: Resetting environment, episode 333, avg. reward: -69.95000000000005\n", + "2024-04-08 14:59:47,302: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_333.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:59:49,565: Resetting environment, episode 334, avg. reward: -88.9000000000001\n", + "2024-04-08 14:59:49,568: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_334.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:59:51,919: Resetting environment, episode 335, avg. reward: -53.49999999999996\n", + "2024-04-08 14:59:51,919: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_335.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:59:54,398: Resetting environment, episode 336, avg. reward: -76.90000000000008\n", + "2024-04-08 14:59:54,401: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_336.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:59:56,196: Resetting environment, episode 337, avg. reward: -43.799999999999955\n", + "2024-04-08 14:59:56,199: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_337.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:59:57,848: Resetting environment, episode 338, avg. reward: -12.200000000000006\n", + "2024-04-08 14:59:57,852: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_338.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 14:59:59,546: Resetting environment, episode 339, avg. reward: -12.549999999999985\n", + "2024-04-08 14:59:59,550: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_339.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 15:00:01,249: Resetting environment, episode 340, avg. reward: -72.65\n", + "2024-04-08 15:00:01,252: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_340.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 15:00:03,211: Resetting environment, episode 341, avg. reward: -84.65000000000006\n", + "2024-04-08 15:00:03,214: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_341.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 15:00:04,902: Resetting environment, episode 342, avg. reward: -88.64999999999998\n", + "2024-04-08 15:00:04,905: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_342.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 15:00:06,894: Resetting environment, episode 343, avg. reward: 37.34999999999988\n", + "2024-04-08 15:00:06,898: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_343.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 15:00:08,548: Resetting environment, episode 344, avg. reward: -95.5\n", + "2024-04-08 15:00:08,551: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_344.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 15:00:10,369: Resetting environment, episode 345, avg. reward: -98.44999999999996\n", + "2024-04-08 15:00:10,372: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_345.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 15:00:12,514: Resetting environment, episode 346, avg. reward: -4.499999999999958\n", + "2024-04-08 15:00:12,517: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_346.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 15:00:14,791: Resetting environment, episode 347, avg. reward: -35.90000000000002\n", + "2024-04-08 15:00:14,795: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_347.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 15:00:17,226: Resetting environment, episode 348, avg. reward: 12.30000000000003\n", + "2024-04-08 15:00:17,230: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_348.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 15:00:18,972: Resetting environment, episode 349, avg. reward: -11.299999999999983\n", + "2024-04-08 15:00:18,972: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_349.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 15:00:20,959: Resetting environment, episode 350, avg. reward: -70.59999999999997\n", + "2024-04-08 15:00:20,962: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_350.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 15:00:22,880: Resetting environment, episode 351, avg. reward: -20.44999999999996\n", + "2024-04-08 15:00:22,883: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_351.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 15:00:24,645: Resetting environment, episode 352, avg. reward: 27.44999999999996\n", + "2024-04-08 15:00:24,649: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_352.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 15:00:26,468: Resetting environment, episode 353, avg. reward: 9.349999999999948\n", + "2024-04-08 15:00:26,470: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_353.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 15:00:28,268: Resetting environment, episode 354, avg. reward: -71.55\n", + "2024-04-08 15:00:28,271: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_354.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 15:00:29,968: Resetting environment, episode 355, avg. reward: -7.849999999999993\n", + "2024-04-08 15:00:29,972: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_355.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 15:00:31,672: Resetting environment, episode 356, avg. reward: -58.14999999999992\n", + "2024-04-08 15:00:31,676: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_356.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 15:00:33,599: Resetting environment, episode 357, avg. reward: 21.54999999999989\n", + "2024-04-08 15:00:33,602: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_357.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 15:00:35,524: Resetting environment, episode 358, avg. reward: 10.350000000000037\n", + "2024-04-08 15:00:35,533: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_358.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 15:00:37,442: Resetting environment, episode 359, avg. reward: 12.749999999999961\n", + "2024-04-08 15:00:37,446: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_359.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 15:00:39,754: Resetting environment, episode 360, avg. reward: 26.849999999999863\n", + "2024-04-08 15:00:39,758: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_360.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 15:00:42,148: Resetting environment, episode 361, avg. reward: 1.9500000000000377\n", + "2024-04-08 15:00:42,152: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_361.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 15:00:44,863: Resetting environment, episode 362, avg. reward: -84.79999999999984\n", + "2024-04-08 15:00:44,867: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_362.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 15:00:47,398: Resetting environment, episode 363, avg. reward: -37.899999999999956\n", + "2024-04-08 15:00:47,402: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_363.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 15:00:50,122: Resetting environment, episode 364, avg. reward: -11.250000000000085\n", + "2024-04-08 15:00:50,126: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_364.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 15:00:52,560: Resetting environment, episode 365, avg. reward: -84.9\n", + "2024-04-08 15:00:52,562: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_365.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 15:00:54,688: Resetting environment, episode 366, avg. reward: -66.45000000000002\n", + "2024-04-08 15:00:54,692: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_366.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 15:00:59,582: Resetting environment, episode 367, avg. reward: 26.95\n", + "2024-04-08 15:00:59,585: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_367.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 15:01:01,883: Resetting environment, episode 368, avg. reward: -36.3\n", + "2024-04-08 15:01:01,886: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_368.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 15:01:04,194: Resetting environment, episode 369, avg. reward: -42.04999999999998\n", + "2024-04-08 15:01:04,197: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_369.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 15:01:06,476: Resetting environment, episode 370, avg. reward: -79.85000000000004\n", + "2024-04-08 15:01:06,480: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_370.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 15:01:08,804: Resetting environment, episode 371, avg. reward: 42.4499999999998\n", + "2024-04-08 15:01:08,809: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_371.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 15:01:11,021: Resetting environment, episode 372, avg. reward: -21.04999999999998\n", + "2024-04-08 15:01:11,025: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_372.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 15:01:13,427: Resetting environment, episode 373, avg. reward: 60.24999999999987\n", + "2024-04-08 15:01:13,430: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_373.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 15:01:15,228: Resetting environment, episode 374, avg. reward: -71.3\n", + "2024-04-08 15:01:15,231: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_374.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 15:01:17,086: Resetting environment, episode 375, avg. reward: 27.249999999999872\n", + "2024-04-08 15:01:17,089: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_375.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 15:01:18,949: Resetting environment, episode 376, avg. reward: 24.149999999999984\n", + "2024-04-08 15:01:18,952: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_376.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 15:01:20,875: Resetting environment, episode 377, avg. reward: -53.54999999999999\n", + "2024-04-08 15:01:20,879: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_377.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 15:01:22,686: Resetting environment, episode 378, avg. reward: 31.84999999999999\n", + "2024-04-08 15:01:22,690: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_378.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 15:01:24,470: Resetting environment, episode 379, avg. reward: -65.4\n", + "2024-04-08 15:01:24,473: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_379.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 15:01:26,345: Resetting environment, episode 380, avg. reward: 52.84999999999978\n", + "2024-04-08 15:01:26,348: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_380.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 15:01:28,494: Resetting environment, episode 381, avg. reward: -50.450000000000024\n", + "2024-04-08 15:01:28,497: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_381.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 15:01:30,231: Resetting environment, episode 382, avg. reward: -71.99999999999991\n", + "2024-04-08 15:01:30,235: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_382.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 15:01:32,232: Resetting environment, episode 383, avg. reward: 20.400000000000073\n", + "2024-04-08 15:01:32,236: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_383.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 15:01:33,887: Resetting environment, episode 384, avg. reward: 14.799999999999994\n", + "2024-04-08 15:01:33,890: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_384.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 15:01:35,491: Resetting environment, episode 385, avg. reward: -46.900000000000055\n", + "2024-04-08 15:01:35,494: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_385.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 15:01:37,246: Resetting environment, episode 386, avg. reward: 0.8999999999999937\n", + "2024-04-08 15:01:37,249: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_386.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 15:01:38,777: Resetting environment, episode 387, avg. reward: -13.35\n", + "2024-04-08 15:01:38,780: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_387.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 15:01:40,765: Resetting environment, episode 388, avg. reward: -66.39999999999996\n", + "2024-04-08 15:01:40,765: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_388.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 15:01:43,096: Resetting environment, episode 389, avg. reward: -60.40000000000004\n", + "2024-04-08 15:01:43,098: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_389.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 15:01:45,309: Resetting environment, episode 390, avg. reward: -40.299999999999976\n", + "2024-04-08 15:01:45,312: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_390.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 15:01:47,533: Resetting environment, episode 391, avg. reward: -9.300000000000024\n", + "2024-04-08 15:01:47,536: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_391.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 15:01:49,645: Resetting environment, episode 392, avg. reward: -68.20000000000002\n", + "2024-04-08 15:01:49,650: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_392.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 15:01:51,698: Resetting environment, episode 393, avg. reward: -12.050000000000015\n", + "2024-04-08 15:01:51,698: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_393.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 15:01:53,431: Resetting environment, episode 394, avg. reward: -45.90000000000007\n", + "2024-04-08 15:01:53,434: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_394.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 15:01:55,444: Resetting environment, episode 395, avg. reward: -7.850000000000001\n", + "2024-04-08 15:01:55,444: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_395.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 15:01:57,778: Resetting environment, episode 396, avg. reward: -81.24999999999994\n", + "2024-04-08 15:01:57,783: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_396.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 15:02:00,035: Resetting environment, episode 397, avg. reward: 35.40000000000004\n", + "2024-04-08 15:02:00,039: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_397.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 15:02:02,146: Resetting environment, episode 398, avg. reward: -9.550000000000082\n", + "2024-04-08 15:02:02,148: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_398.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 15:02:04,122: Resetting environment, episode 399, avg. reward: 10.550000000000026\n", + "2024-04-08 15:02:04,126: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_399.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 15:02:06,128: Resetting environment, episode 400, avg. reward: -2.7499999999999734\n", + "2024-04-08 15:02:06,132: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_400.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 15:02:08,277: Resetting environment, episode 401, avg. reward: 11.199999999999974\n", + "2024-04-08 15:02:08,281: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_401.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 15:02:10,123: Resetting environment, episode 402, avg. reward: 38.94999999999992\n", + "2024-04-08 15:02:10,126: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_402.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 15:02:12,770: Resetting environment, episode 403, avg. reward: 40.150000000000006\n", + "2024-04-08 15:02:12,774: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_403.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 15:02:14,630: Resetting environment, episode 404, avg. reward: -28.65000000000003\n", + "2024-04-08 15:02:14,633: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_404.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 15:02:16,440: Resetting environment, episode 405, avg. reward: 32.25000000000001\n", + "2024-04-08 15:02:16,443: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_405.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 15:02:18,127: Resetting environment, episode 406, avg. reward: -11.699999999999982\n", + "2024-04-08 15:02:18,130: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_406.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 15:02:20,294: Resetting environment, episode 407, avg. reward: 51.299999999999976\n", + "2024-04-08 15:02:20,297: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_407.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 15:02:22,154: Resetting environment, episode 408, avg. reward: 10.399999999999963\n", + "2024-04-08 15:02:22,157: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_408.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 15:02:24,369: Resetting environment, episode 409, avg. reward: -12.599999999999984\n", + "2024-04-08 15:02:24,373: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_409.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 15:02:26,758: Resetting environment, episode 410, avg. reward: 13.600000000000026\n", + "2024-04-08 15:02:26,761: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_410.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 15:02:30,043: Resetting environment, episode 411, avg. reward: 31.89999999999995\n", + "2024-04-08 15:02:30,047: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_411.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 15:02:32,018: Resetting environment, episode 412, avg. reward: 22.050000000000054\n", + "2024-04-08 15:02:32,021: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_412.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 15:02:33,671: Resetting environment, episode 413, avg. reward: 38.74999999999982\n", + "2024-04-08 15:02:33,674: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_413.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 15:02:35,754: Resetting environment, episode 414, avg. reward: 21.250000000000092\n", + "2024-04-08 15:02:35,757: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_414.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 15:02:37,697: Resetting environment, episode 415, avg. reward: 52.64999999999991\n", + "2024-04-08 15:02:37,704: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_415.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 15:02:39,371: Resetting environment, episode 416, avg. reward: 15.300000000000079\n", + "2024-04-08 15:02:39,374: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_416.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 15:02:40,894: Resetting environment, episode 417, avg. reward: -0.24999999999995826\n", + "2024-04-08 15:02:40,896: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_417.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 15:02:42,813: Resetting environment, episode 418, avg. reward: -22.05000000000004\n", + "2024-04-08 15:02:42,817: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_418.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 15:02:44,725: Resetting environment, episode 419, avg. reward: -54.89999999999997\n", + "2024-04-08 15:02:44,727: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_419.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 15:02:48,515: Resetting environment, episode 420, avg. reward: -15.04999999999997\n", + "2024-04-08 15:02:48,518: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_420.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 15:02:50,655: Resetting environment, episode 421, avg. reward: -56.94999999999997\n", + "2024-04-08 15:02:50,659: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_421.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 15:02:52,515: Resetting environment, episode 422, avg. reward: -68.70000000000003\n", + "2024-04-08 15:02:52,517: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_422.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 15:02:54,132: Resetting environment, episode 423, avg. reward: -72.89999999999996\n", + "2024-04-08 15:02:54,134: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_423.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 15:02:55,908: Resetting environment, episode 424, avg. reward: 17.449999999999946\n", + "2024-04-08 15:02:55,911: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_424.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 15:02:57,497: Resetting environment, episode 425, avg. reward: -27.14999999999995\n", + "2024-04-08 15:02:57,501: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_425.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 15:02:59,501: Resetting environment, episode 426, avg. reward: -67.6\n", + "2024-04-08 15:02:59,504: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_426.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 15:03:01,163: Resetting environment, episode 427, avg. reward: 27.7999999999999\n", + "2024-04-08 15:03:01,166: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_427.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 15:03:02,845: Resetting environment, episode 428, avg. reward: 43.599999999999895\n", + "2024-04-08 15:03:02,849: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_428.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 15:03:04,688: Resetting environment, episode 429, avg. reward: 10.649999999999995\n", + "2024-04-08 15:03:04,691: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_429.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 15:03:06,537: Resetting environment, episode 430, avg. reward: 6.549999999999988\n", + "2024-04-08 15:03:06,540: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_430.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 15:03:08,508: Resetting environment, episode 431, avg. reward: -53.84999999999999\n", + "2024-04-08 15:03:08,510: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_431.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 15:03:10,547: Resetting environment, episode 432, avg. reward: -16.399999999999995\n", + "2024-04-08 15:03:10,550: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_432.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 15:03:12,415: Resetting environment, episode 433, avg. reward: 26.500000000000014\n", + "2024-04-08 15:03:12,418: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_433.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 15:03:13,905: Resetting environment, episode 434, avg. reward: -9.04999999999999\n", + "2024-04-08 15:03:13,909: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_434.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 15:03:15,659: Resetting environment, episode 435, avg. reward: -70.59999999999998\n", + "2024-04-08 15:03:15,662: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_435.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 15:03:17,377: Resetting environment, episode 436, avg. reward: 8.600000000000009\n", + "2024-04-08 15:03:17,381: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_436.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 15:03:19,455: Resetting environment, episode 437, avg. reward: 84.10000000000014\n", + "2024-04-08 15:03:19,458: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_437.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 15:03:21,741: Resetting environment, episode 438, avg. reward: -52.299999999999976\n", + "2024-04-08 15:03:21,744: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_438.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 15:03:23,696: Resetting environment, episode 439, avg. reward: 20.199999999999957\n", + "2024-04-08 15:03:23,700: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_439.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 15:03:25,663: Resetting environment, episode 440, avg. reward: -79.10000000000002\n", + "2024-04-08 15:03:25,667: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_440.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 15:03:27,924: Resetting environment, episode 441, avg. reward: 58.799999999999876\n", + "2024-04-08 15:03:27,928: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_441.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 15:03:29,603: Resetting environment, episode 442, avg. reward: -35.64999999999998\n", + "2024-04-08 15:03:29,606: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_442.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 15:03:31,271: Resetting environment, episode 443, avg. reward: -0.7500000000000195\n", + "2024-04-08 15:03:31,274: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_443.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 15:03:33,199: Resetting environment, episode 444, avg. reward: -83.49999999999989\n", + "2024-04-08 15:03:33,203: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_444.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 15:03:35,706: Resetting environment, episode 445, avg. reward: 58.54999999999981\n", + "2024-04-08 15:03:35,710: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_445.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 15:03:37,671: Resetting environment, episode 446, avg. reward: -39.45000000000003\n", + "2024-04-08 15:03:37,673: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_446.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 15:03:40,320: Resetting environment, episode 447, avg. reward: -63.049999999999955\n", + "2024-04-08 15:03:40,324: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_447.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 15:03:42,333: Resetting environment, episode 448, avg. reward: -48.29999999999998\n", + "2024-04-08 15:03:42,336: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_448.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 15:03:44,621: Resetting environment, episode 449, avg. reward: 87.55000000000031\n", + "2024-04-08 15:03:44,625: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_449.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 15:03:46,958: Resetting environment, episode 450, avg. reward: 59.89999999999991\n", + "2024-04-08 15:03:46,962: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_450.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 15:03:49,779: Resetting environment, episode 451, avg. reward: -35.349999999999994\n", + "2024-04-08 15:03:49,783: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_451.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 15:03:51,834: Resetting environment, episode 452, avg. reward: -61.19999999999991\n", + "2024-04-08 15:03:51,837: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_452.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 15:03:53,774: Resetting environment, episode 453, avg. reward: 1.6000000000000005\n", + "2024-04-08 15:03:53,777: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_453.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 15:03:56,025: Resetting environment, episode 454, avg. reward: 13.14999999999995\n", + "2024-04-08 15:03:56,028: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_454.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 15:03:58,535: Resetting environment, episode 455, avg. reward: 19.950000000000003\n", + "2024-04-08 15:03:58,538: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_455.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 15:04:00,845: Resetting environment, episode 456, avg. reward: -33.04999999999999\n", + "2024-04-08 15:04:00,848: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_456.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 15:04:02,904: Resetting environment, episode 457, avg. reward: 39.59999999999999\n", + "2024-04-08 15:04:02,909: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_457.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 15:04:05,202: Resetting environment, episode 458, avg. reward: -8.300000000000002\n", + "2024-04-08 15:04:05,206: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_458.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 15:04:07,216: Resetting environment, episode 459, avg. reward: -85.5\n", + "2024-04-08 15:04:07,219: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_459.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 15:04:09,300: Resetting environment, episode 460, avg. reward: 42.149999999999935\n", + "2024-04-08 15:04:09,304: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_460.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 15:04:11,700: Resetting environment, episode 461, avg. reward: -7.00000000000005\n", + "2024-04-08 15:04:11,703: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_461.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 15:04:13,865: Resetting environment, episode 462, avg. reward: 44.99999999999982\n", + "2024-04-08 15:04:13,868: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_462.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 15:04:15,915: Resetting environment, episode 463, avg. reward: -14.150000000000015\n", + "2024-04-08 15:04:15,919: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_463.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 15:04:18,129: Resetting environment, episode 464, avg. reward: -62.3\n", + "2024-04-08 15:04:18,133: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_464.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 15:04:20,618: Resetting environment, episode 465, avg. reward: -21.85\n", + "2024-04-08 15:04:20,623: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_465.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 15:04:22,808: Resetting environment, episode 466, avg. reward: -21.59999999999995\n", + "2024-04-08 15:04:22,811: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_466.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 15:04:24,768: Resetting environment, episode 467, avg. reward: -14.950000000000008\n", + "2024-04-08 15:04:24,772: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_467.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 15:04:26,660: Resetting environment, episode 468, avg. reward: 18.64999999999998\n", + "2024-04-08 15:04:26,663: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_468.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 15:04:28,354: Resetting environment, episode 469, avg. reward: -10.699999999999989\n", + "2024-04-08 15:04:28,357: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_469.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 15:04:30,242: Resetting environment, episode 470, avg. reward: -53.79999999999998\n", + "2024-04-08 15:04:30,245: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_470.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 15:04:33,035: Resetting environment, episode 471, avg. reward: 84.70000000000006\n", + "2024-04-08 15:04:33,038: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_471.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 15:04:35,091: Resetting environment, episode 472, avg. reward: -7.000000000000062\n", + "2024-04-08 15:04:35,093: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_472.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "ename": "KeyboardInterrupt", + "evalue": "", + "output_type": "error", + "traceback": [ + "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m", + "\u001b[1;31mKeyboardInterrupt\u001b[0m Traceback (most recent call last)", + "Cell \u001b[1;32mIn[8], line 1\u001b[0m\n\u001b[1;32m----> 1\u001b[0m \u001b[43mmodel\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mlearn\u001b[49m\u001b[43m(\u001b[49m\u001b[43mtotal_timesteps\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mTOTAL_TIMESTEPS\u001b[49m\u001b[43m)\u001b[49m\n", + "File \u001b[1;32mc:\\Projects\\PrimAITE\\.venv\\lib\\site-packages\\stable_baselines3\\ppo\\ppo.py:308\u001b[0m, in \u001b[0;36mPPO.learn\u001b[1;34m(self, total_timesteps, callback, log_interval, tb_log_name, reset_num_timesteps, progress_bar)\u001b[0m\n\u001b[0;32m 299\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21mlearn\u001b[39m(\n\u001b[0;32m 300\u001b[0m \u001b[38;5;28mself\u001b[39m: SelfPPO,\n\u001b[0;32m 301\u001b[0m total_timesteps: \u001b[38;5;28mint\u001b[39m,\n\u001b[1;32m (...)\u001b[0m\n\u001b[0;32m 306\u001b[0m progress_bar: \u001b[38;5;28mbool\u001b[39m \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;01mFalse\u001b[39;00m,\n\u001b[0;32m 307\u001b[0m ) \u001b[38;5;241m-\u001b[39m\u001b[38;5;241m>\u001b[39m SelfPPO:\n\u001b[1;32m--> 308\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28;43msuper\u001b[39;49m\u001b[43m(\u001b[49m\u001b[43m)\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mlearn\u001b[49m\u001b[43m(\u001b[49m\n\u001b[0;32m 309\u001b[0m \u001b[43m \u001b[49m\u001b[43mtotal_timesteps\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mtotal_timesteps\u001b[49m\u001b[43m,\u001b[49m\n\u001b[0;32m 310\u001b[0m \u001b[43m \u001b[49m\u001b[43mcallback\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mcallback\u001b[49m\u001b[43m,\u001b[49m\n\u001b[0;32m 311\u001b[0m \u001b[43m \u001b[49m\u001b[43mlog_interval\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mlog_interval\u001b[49m\u001b[43m,\u001b[49m\n\u001b[0;32m 312\u001b[0m \u001b[43m \u001b[49m\u001b[43mtb_log_name\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mtb_log_name\u001b[49m\u001b[43m,\u001b[49m\n\u001b[0;32m 313\u001b[0m \u001b[43m \u001b[49m\u001b[43mreset_num_timesteps\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mreset_num_timesteps\u001b[49m\u001b[43m,\u001b[49m\n\u001b[0;32m 314\u001b[0m \u001b[43m \u001b[49m\u001b[43mprogress_bar\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mprogress_bar\u001b[49m\u001b[43m,\u001b[49m\n\u001b[0;32m 315\u001b[0m \u001b[43m \u001b[49m\u001b[43m)\u001b[49m\n", + "File \u001b[1;32mc:\\Projects\\PrimAITE\\.venv\\lib\\site-packages\\stable_baselines3\\common\\on_policy_algorithm.py:259\u001b[0m, in \u001b[0;36mOnPolicyAlgorithm.learn\u001b[1;34m(self, total_timesteps, callback, log_interval, tb_log_name, reset_num_timesteps, progress_bar)\u001b[0m\n\u001b[0;32m 256\u001b[0m \u001b[38;5;28;01massert\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39menv \u001b[38;5;129;01mis\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m \u001b[38;5;28;01mNone\u001b[39;00m\n\u001b[0;32m 258\u001b[0m \u001b[38;5;28;01mwhile\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mnum_timesteps \u001b[38;5;241m<\u001b[39m total_timesteps:\n\u001b[1;32m--> 259\u001b[0m continue_training \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mcollect_rollouts\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43menv\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mcallback\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mrollout_buffer\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mn_rollout_steps\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mn_steps\u001b[49m\u001b[43m)\u001b[49m\n\u001b[0;32m 261\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m continue_training \u001b[38;5;129;01mis\u001b[39;00m \u001b[38;5;28;01mFalse\u001b[39;00m:\n\u001b[0;32m 262\u001b[0m \u001b[38;5;28;01mbreak\u001b[39;00m\n", + "File \u001b[1;32mc:\\Projects\\PrimAITE\\.venv\\lib\\site-packages\\stable_baselines3\\common\\on_policy_algorithm.py:178\u001b[0m, in \u001b[0;36mOnPolicyAlgorithm.collect_rollouts\u001b[1;34m(self, env, callback, rollout_buffer, n_rollout_steps)\u001b[0m\n\u001b[0;32m 175\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;28misinstance\u001b[39m(\u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39maction_space, spaces\u001b[38;5;241m.\u001b[39mBox):\n\u001b[0;32m 176\u001b[0m clipped_actions \u001b[38;5;241m=\u001b[39m np\u001b[38;5;241m.\u001b[39mclip(actions, \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39maction_space\u001b[38;5;241m.\u001b[39mlow, \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39maction_space\u001b[38;5;241m.\u001b[39mhigh)\n\u001b[1;32m--> 178\u001b[0m new_obs, rewards, dones, infos \u001b[38;5;241m=\u001b[39m \u001b[43menv\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mstep\u001b[49m\u001b[43m(\u001b[49m\u001b[43mclipped_actions\u001b[49m\u001b[43m)\u001b[49m\n\u001b[0;32m 180\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mnum_timesteps \u001b[38;5;241m+\u001b[39m\u001b[38;5;241m=\u001b[39m env\u001b[38;5;241m.\u001b[39mnum_envs\n\u001b[0;32m 182\u001b[0m \u001b[38;5;66;03m# Give access to local variables\u001b[39;00m\n", + "File \u001b[1;32mc:\\Projects\\PrimAITE\\.venv\\lib\\site-packages\\stable_baselines3\\common\\vec_env\\base_vec_env.py:197\u001b[0m, in \u001b[0;36mVecEnv.step\u001b[1;34m(self, actions)\u001b[0m\n\u001b[0;32m 190\u001b[0m \u001b[38;5;250m\u001b[39m\u001b[38;5;124;03m\"\"\"\u001b[39;00m\n\u001b[0;32m 191\u001b[0m \u001b[38;5;124;03mStep the environments with the given action\u001b[39;00m\n\u001b[0;32m 192\u001b[0m \n\u001b[0;32m 193\u001b[0m \u001b[38;5;124;03m:param actions: the action\u001b[39;00m\n\u001b[0;32m 194\u001b[0m \u001b[38;5;124;03m:return: observation, reward, done, information\u001b[39;00m\n\u001b[0;32m 195\u001b[0m \u001b[38;5;124;03m\"\"\"\u001b[39;00m\n\u001b[0;32m 196\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mstep_async(actions)\n\u001b[1;32m--> 197\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mstep_wait\u001b[49m\u001b[43m(\u001b[49m\u001b[43m)\u001b[49m\n", + "File \u001b[1;32mc:\\Projects\\PrimAITE\\.venv\\lib\\site-packages\\stable_baselines3\\common\\vec_env\\dummy_vec_env.py:58\u001b[0m, in \u001b[0;36mDummyVecEnv.step_wait\u001b[1;34m(self)\u001b[0m\n\u001b[0;32m 55\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21mstep_wait\u001b[39m(\u001b[38;5;28mself\u001b[39m) \u001b[38;5;241m-\u001b[39m\u001b[38;5;241m>\u001b[39m VecEnvStepReturn:\n\u001b[0;32m 56\u001b[0m \u001b[38;5;66;03m# Avoid circular imports\u001b[39;00m\n\u001b[0;32m 57\u001b[0m \u001b[38;5;28;01mfor\u001b[39;00m env_idx \u001b[38;5;129;01min\u001b[39;00m \u001b[38;5;28mrange\u001b[39m(\u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mnum_envs):\n\u001b[1;32m---> 58\u001b[0m obs, \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mbuf_rews[env_idx], terminated, truncated, \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mbuf_infos[env_idx] \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43menvs\u001b[49m\u001b[43m[\u001b[49m\u001b[43menv_idx\u001b[49m\u001b[43m]\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mstep\u001b[49m\u001b[43m(\u001b[49m\n\u001b[0;32m 59\u001b[0m \u001b[43m \u001b[49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mactions\u001b[49m\u001b[43m[\u001b[49m\u001b[43menv_idx\u001b[49m\u001b[43m]\u001b[49m\n\u001b[0;32m 60\u001b[0m \u001b[43m \u001b[49m\u001b[43m)\u001b[49m\n\u001b[0;32m 61\u001b[0m \u001b[38;5;66;03m# convert to SB3 VecEnv api\u001b[39;00m\n\u001b[0;32m 62\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mbuf_dones[env_idx] \u001b[38;5;241m=\u001b[39m terminated \u001b[38;5;129;01mor\u001b[39;00m truncated\n", + "File \u001b[1;32mc:\\Projects\\PrimAITE\\.venv\\lib\\site-packages\\stable_baselines3\\common\\monitor.py:94\u001b[0m, in \u001b[0;36mMonitor.step\u001b[1;34m(self, action)\u001b[0m\n\u001b[0;32m 92\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mneeds_reset:\n\u001b[0;32m 93\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m \u001b[38;5;167;01mRuntimeError\u001b[39;00m(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mTried to step environment that needs reset\u001b[39m\u001b[38;5;124m\"\u001b[39m)\n\u001b[1;32m---> 94\u001b[0m observation, reward, terminated, truncated, info \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43menv\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mstep\u001b[49m\u001b[43m(\u001b[49m\u001b[43maction\u001b[49m\u001b[43m)\u001b[49m\n\u001b[0;32m 95\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mrewards\u001b[38;5;241m.\u001b[39mappend(\u001b[38;5;28mfloat\u001b[39m(reward))\n\u001b[0;32m 96\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m terminated \u001b[38;5;129;01mor\u001b[39;00m truncated:\n", + "File \u001b[1;32mC:\\Projects\\PrimAITE\\src\\primaite\\session\\environment.py:54\u001b[0m, in \u001b[0;36mPrimaiteGymEnv.step\u001b[1;34m(self, action)\u001b[0m\n\u001b[0;32m 52\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mgame\u001b[38;5;241m.\u001b[39mapply_agent_actions()\n\u001b[0;32m 53\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mgame\u001b[38;5;241m.\u001b[39madvance_timestep()\n\u001b[1;32m---> 54\u001b[0m state \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mgame\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mget_sim_state\u001b[49m\u001b[43m(\u001b[49m\u001b[43m)\u001b[49m\n\u001b[0;32m 55\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mgame\u001b[38;5;241m.\u001b[39mupdate_agents(state)\n\u001b[0;32m 57\u001b[0m next_obs \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_get_obs() \u001b[38;5;66;03m# this doesn't update observation, just gets the current observation\u001b[39;00m\n", + "File \u001b[1;32mC:\\Projects\\PrimAITE\\src\\primaite\\game\\game.py:149\u001b[0m, in \u001b[0;36mPrimaiteGame.get_sim_state\u001b[1;34m(self)\u001b[0m\n\u001b[0;32m 147\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21mget_sim_state\u001b[39m(\u001b[38;5;28mself\u001b[39m) \u001b[38;5;241m-\u001b[39m\u001b[38;5;241m>\u001b[39m Dict:\n\u001b[0;32m 148\u001b[0m \u001b[38;5;250m \u001b[39m\u001b[38;5;124;03m\"\"\"Get the current state of the simulation.\"\"\"\u001b[39;00m\n\u001b[1;32m--> 149\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43msimulation\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mdescribe_state\u001b[49m\u001b[43m(\u001b[49m\u001b[43m)\u001b[49m\n", + "File \u001b[1;32mC:\\Projects\\PrimAITE\\src\\primaite\\simulator\\sim_container.py:56\u001b[0m, in \u001b[0;36mSimulation.describe_state\u001b[1;34m(self)\u001b[0m\n\u001b[0;32m 45\u001b[0m \u001b[38;5;250m\u001b[39m\u001b[38;5;124;03m\"\"\"\u001b[39;00m\n\u001b[0;32m 46\u001b[0m \u001b[38;5;124;03mProduce a dictionary describing the current state of this object.\u001b[39;00m\n\u001b[0;32m 47\u001b[0m \n\u001b[1;32m (...)\u001b[0m\n\u001b[0;32m 51\u001b[0m \u001b[38;5;124;03m:rtype: Dict\u001b[39;00m\n\u001b[0;32m 52\u001b[0m \u001b[38;5;124;03m\"\"\"\u001b[39;00m\n\u001b[0;32m 53\u001b[0m state \u001b[38;5;241m=\u001b[39m \u001b[38;5;28msuper\u001b[39m()\u001b[38;5;241m.\u001b[39mdescribe_state()\n\u001b[0;32m 54\u001b[0m state\u001b[38;5;241m.\u001b[39mupdate(\n\u001b[0;32m 55\u001b[0m {\n\u001b[1;32m---> 56\u001b[0m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mnetwork\u001b[39m\u001b[38;5;124m\"\u001b[39m: \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mnetwork\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mdescribe_state\u001b[49m\u001b[43m(\u001b[49m\u001b[43m)\u001b[49m,\n\u001b[0;32m 57\u001b[0m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mdomain\u001b[39m\u001b[38;5;124m\"\u001b[39m: \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mdomain\u001b[38;5;241m.\u001b[39mdescribe_state(),\n\u001b[0;32m 58\u001b[0m }\n\u001b[0;32m 59\u001b[0m )\n\u001b[0;32m 60\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m state\n", + "File \u001b[1;32mC:\\Projects\\PrimAITE\\src\\primaite\\simulator\\network\\container.py:223\u001b[0m, in \u001b[0;36mNetwork.describe_state\u001b[1;34m(self)\u001b[0m\n\u001b[0;32m 215\u001b[0m \u001b[38;5;250m\u001b[39m\u001b[38;5;124;03m\"\"\"\u001b[39;00m\n\u001b[0;32m 216\u001b[0m \u001b[38;5;124;03mProduce a dictionary describing the current state of the Network.\u001b[39;00m\n\u001b[0;32m 217\u001b[0m \n\u001b[0;32m 218\u001b[0m \u001b[38;5;124;03m:return: A dictionary capturing the current state of the Network and its child objects.\u001b[39;00m\n\u001b[0;32m 219\u001b[0m \u001b[38;5;124;03m\"\"\"\u001b[39;00m\n\u001b[0;32m 220\u001b[0m state \u001b[38;5;241m=\u001b[39m \u001b[38;5;28msuper\u001b[39m()\u001b[38;5;241m.\u001b[39mdescribe_state()\n\u001b[0;32m 221\u001b[0m state\u001b[38;5;241m.\u001b[39mupdate(\n\u001b[0;32m 222\u001b[0m {\n\u001b[1;32m--> 223\u001b[0m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mnodes\u001b[39m\u001b[38;5;124m\"\u001b[39m: {node\u001b[38;5;241m.\u001b[39mhostname: node\u001b[38;5;241m.\u001b[39mdescribe_state() \u001b[38;5;28;01mfor\u001b[39;00m node \u001b[38;5;129;01min\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mnodes\u001b[38;5;241m.\u001b[39mvalues()},\n\u001b[0;32m 224\u001b[0m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mlinks\u001b[39m\u001b[38;5;124m\"\u001b[39m: {},\n\u001b[0;32m 225\u001b[0m }\n\u001b[0;32m 226\u001b[0m )\n\u001b[0;32m 227\u001b[0m \u001b[38;5;66;03m# Update the links one-by-one. The key is a 4-tuple of `hostname_a, port_a, hostname_b, port_b`\u001b[39;00m\n\u001b[0;32m 228\u001b[0m \u001b[38;5;28;01mfor\u001b[39;00m _, link \u001b[38;5;129;01min\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mlinks\u001b[38;5;241m.\u001b[39mitems():\n", + "File \u001b[1;32mC:\\Projects\\PrimAITE\\src\\primaite\\simulator\\network\\container.py:223\u001b[0m, in \u001b[0;36m\u001b[1;34m(.0)\u001b[0m\n\u001b[0;32m 215\u001b[0m \u001b[38;5;250m\u001b[39m\u001b[38;5;124;03m\"\"\"\u001b[39;00m\n\u001b[0;32m 216\u001b[0m \u001b[38;5;124;03mProduce a dictionary describing the current state of the Network.\u001b[39;00m\n\u001b[0;32m 217\u001b[0m \n\u001b[0;32m 218\u001b[0m \u001b[38;5;124;03m:return: A dictionary capturing the current state of the Network and its child objects.\u001b[39;00m\n\u001b[0;32m 219\u001b[0m \u001b[38;5;124;03m\"\"\"\u001b[39;00m\n\u001b[0;32m 220\u001b[0m state \u001b[38;5;241m=\u001b[39m \u001b[38;5;28msuper\u001b[39m()\u001b[38;5;241m.\u001b[39mdescribe_state()\n\u001b[0;32m 221\u001b[0m state\u001b[38;5;241m.\u001b[39mupdate(\n\u001b[0;32m 222\u001b[0m {\n\u001b[1;32m--> 223\u001b[0m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mnodes\u001b[39m\u001b[38;5;124m\"\u001b[39m: {node\u001b[38;5;241m.\u001b[39mhostname: \u001b[43mnode\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mdescribe_state\u001b[49m\u001b[43m(\u001b[49m\u001b[43m)\u001b[49m \u001b[38;5;28;01mfor\u001b[39;00m node \u001b[38;5;129;01min\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mnodes\u001b[38;5;241m.\u001b[39mvalues()},\n\u001b[0;32m 224\u001b[0m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mlinks\u001b[39m\u001b[38;5;124m\"\u001b[39m: {},\n\u001b[0;32m 225\u001b[0m }\n\u001b[0;32m 226\u001b[0m )\n\u001b[0;32m 227\u001b[0m \u001b[38;5;66;03m# Update the links one-by-one. The key is a 4-tuple of `hostname_a, port_a, hostname_b, port_b`\u001b[39;00m\n\u001b[0;32m 228\u001b[0m \u001b[38;5;28;01mfor\u001b[39;00m _, link \u001b[38;5;129;01min\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mlinks\u001b[38;5;241m.\u001b[39mitems():\n", + "File \u001b[1;32mC:\\Projects\\PrimAITE\\src\\primaite\\simulator\\network\\hardware\\base.py:920\u001b[0m, in \u001b[0;36mNode.describe_state\u001b[1;34m(self)\u001b[0m\n\u001b[0;32m 902\u001b[0m \u001b[38;5;250m\u001b[39m\u001b[38;5;124;03m\"\"\"\u001b[39;00m\n\u001b[0;32m 903\u001b[0m \u001b[38;5;124;03mProduce a dictionary describing the current state of this object.\u001b[39;00m\n\u001b[0;32m 904\u001b[0m \n\u001b[1;32m (...)\u001b[0m\n\u001b[0;32m 908\u001b[0m \u001b[38;5;124;03m:rtype: Dict\u001b[39;00m\n\u001b[0;32m 909\u001b[0m \u001b[38;5;124;03m\"\"\"\u001b[39;00m\n\u001b[0;32m 910\u001b[0m state \u001b[38;5;241m=\u001b[39m \u001b[38;5;28msuper\u001b[39m()\u001b[38;5;241m.\u001b[39mdescribe_state()\n\u001b[0;32m 911\u001b[0m state\u001b[38;5;241m.\u001b[39mupdate(\n\u001b[0;32m 912\u001b[0m {\n\u001b[0;32m 913\u001b[0m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mhostname\u001b[39m\u001b[38;5;124m\"\u001b[39m: \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mhostname,\n\u001b[0;32m 914\u001b[0m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124moperating_state\u001b[39m\u001b[38;5;124m\"\u001b[39m: \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39moperating_state\u001b[38;5;241m.\u001b[39mvalue,\n\u001b[0;32m 915\u001b[0m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mNICs\u001b[39m\u001b[38;5;124m\"\u001b[39m: {\n\u001b[0;32m 916\u001b[0m eth_num: network_interface\u001b[38;5;241m.\u001b[39mdescribe_state()\n\u001b[0;32m 917\u001b[0m \u001b[38;5;28;01mfor\u001b[39;00m eth_num, network_interface \u001b[38;5;129;01min\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mnetwork_interface\u001b[38;5;241m.\u001b[39mitems()\n\u001b[0;32m 918\u001b[0m },\n\u001b[0;32m 919\u001b[0m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mfile_system\u001b[39m\u001b[38;5;124m\"\u001b[39m: \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mfile_system\u001b[38;5;241m.\u001b[39mdescribe_state(),\n\u001b[1;32m--> 920\u001b[0m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mapplications\u001b[39m\u001b[38;5;124m\"\u001b[39m: {app\u001b[38;5;241m.\u001b[39mname: app\u001b[38;5;241m.\u001b[39mdescribe_state() \u001b[38;5;28;01mfor\u001b[39;00m app \u001b[38;5;129;01min\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mapplications\u001b[38;5;241m.\u001b[39mvalues()},\n\u001b[0;32m 921\u001b[0m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mservices\u001b[39m\u001b[38;5;124m\"\u001b[39m: {svc\u001b[38;5;241m.\u001b[39mname: svc\u001b[38;5;241m.\u001b[39mdescribe_state() \u001b[38;5;28;01mfor\u001b[39;00m svc \u001b[38;5;129;01min\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mservices\u001b[38;5;241m.\u001b[39mvalues()},\n\u001b[0;32m 922\u001b[0m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mprocess\u001b[39m\u001b[38;5;124m\"\u001b[39m: {proc\u001b[38;5;241m.\u001b[39mname: proc\u001b[38;5;241m.\u001b[39mdescribe_state() \u001b[38;5;28;01mfor\u001b[39;00m proc \u001b[38;5;129;01min\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mprocesses\u001b[38;5;241m.\u001b[39mvalues()},\n\u001b[0;32m 923\u001b[0m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mrevealed_to_red\u001b[39m\u001b[38;5;124m\"\u001b[39m: \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mrevealed_to_red,\n\u001b[0;32m 924\u001b[0m }\n\u001b[0;32m 925\u001b[0m )\n\u001b[0;32m 926\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m state\n", + "File \u001b[1;32mC:\\Projects\\PrimAITE\\src\\primaite\\simulator\\network\\hardware\\base.py:920\u001b[0m, in \u001b[0;36m\u001b[1;34m(.0)\u001b[0m\n\u001b[0;32m 902\u001b[0m \u001b[38;5;250m\u001b[39m\u001b[38;5;124;03m\"\"\"\u001b[39;00m\n\u001b[0;32m 903\u001b[0m \u001b[38;5;124;03mProduce a dictionary describing the current state of this object.\u001b[39;00m\n\u001b[0;32m 904\u001b[0m \n\u001b[1;32m (...)\u001b[0m\n\u001b[0;32m 908\u001b[0m \u001b[38;5;124;03m:rtype: Dict\u001b[39;00m\n\u001b[0;32m 909\u001b[0m \u001b[38;5;124;03m\"\"\"\u001b[39;00m\n\u001b[0;32m 910\u001b[0m state \u001b[38;5;241m=\u001b[39m \u001b[38;5;28msuper\u001b[39m()\u001b[38;5;241m.\u001b[39mdescribe_state()\n\u001b[0;32m 911\u001b[0m state\u001b[38;5;241m.\u001b[39mupdate(\n\u001b[0;32m 912\u001b[0m {\n\u001b[0;32m 913\u001b[0m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mhostname\u001b[39m\u001b[38;5;124m\"\u001b[39m: \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mhostname,\n\u001b[0;32m 914\u001b[0m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124moperating_state\u001b[39m\u001b[38;5;124m\"\u001b[39m: \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39moperating_state\u001b[38;5;241m.\u001b[39mvalue,\n\u001b[0;32m 915\u001b[0m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mNICs\u001b[39m\u001b[38;5;124m\"\u001b[39m: {\n\u001b[0;32m 916\u001b[0m eth_num: network_interface\u001b[38;5;241m.\u001b[39mdescribe_state()\n\u001b[0;32m 917\u001b[0m \u001b[38;5;28;01mfor\u001b[39;00m eth_num, network_interface \u001b[38;5;129;01min\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mnetwork_interface\u001b[38;5;241m.\u001b[39mitems()\n\u001b[0;32m 918\u001b[0m },\n\u001b[0;32m 919\u001b[0m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mfile_system\u001b[39m\u001b[38;5;124m\"\u001b[39m: \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mfile_system\u001b[38;5;241m.\u001b[39mdescribe_state(),\n\u001b[1;32m--> 920\u001b[0m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mapplications\u001b[39m\u001b[38;5;124m\"\u001b[39m: {app\u001b[38;5;241m.\u001b[39mname: \u001b[43mapp\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mdescribe_state\u001b[49m\u001b[43m(\u001b[49m\u001b[43m)\u001b[49m \u001b[38;5;28;01mfor\u001b[39;00m app \u001b[38;5;129;01min\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mapplications\u001b[38;5;241m.\u001b[39mvalues()},\n\u001b[0;32m 921\u001b[0m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mservices\u001b[39m\u001b[38;5;124m\"\u001b[39m: {svc\u001b[38;5;241m.\u001b[39mname: svc\u001b[38;5;241m.\u001b[39mdescribe_state() \u001b[38;5;28;01mfor\u001b[39;00m svc \u001b[38;5;129;01min\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mservices\u001b[38;5;241m.\u001b[39mvalues()},\n\u001b[0;32m 922\u001b[0m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mprocess\u001b[39m\u001b[38;5;124m\"\u001b[39m: {proc\u001b[38;5;241m.\u001b[39mname: proc\u001b[38;5;241m.\u001b[39mdescribe_state() \u001b[38;5;28;01mfor\u001b[39;00m proc \u001b[38;5;129;01min\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mprocesses\u001b[38;5;241m.\u001b[39mvalues()},\n\u001b[0;32m 923\u001b[0m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mrevealed_to_red\u001b[39m\u001b[38;5;124m\"\u001b[39m: \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mrevealed_to_red,\n\u001b[0;32m 924\u001b[0m }\n\u001b[0;32m 925\u001b[0m )\n\u001b[0;32m 926\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m state\n", + "File \u001b[1;32mC:\\Projects\\PrimAITE\\src\\primaite\\simulator\\system\\applications\\web_browser.py:75\u001b[0m, in \u001b[0;36mWebBrowser.describe_state\u001b[1;34m(self)\u001b[0m\n\u001b[0;32m 69\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21mdescribe_state\u001b[39m(\u001b[38;5;28mself\u001b[39m) \u001b[38;5;241m-\u001b[39m\u001b[38;5;241m>\u001b[39m Dict:\n\u001b[0;32m 70\u001b[0m \u001b[38;5;250m \u001b[39m\u001b[38;5;124;03m\"\"\"\u001b[39;00m\n\u001b[0;32m 71\u001b[0m \u001b[38;5;124;03m Produce a dictionary describing the current state of the WebBrowser.\u001b[39;00m\n\u001b[0;32m 72\u001b[0m \n\u001b[0;32m 73\u001b[0m \u001b[38;5;124;03m :return: A dictionary capturing the current state of the WebBrowser and its child objects.\u001b[39;00m\n\u001b[0;32m 74\u001b[0m \u001b[38;5;124;03m \"\"\"\u001b[39;00m\n\u001b[1;32m---> 75\u001b[0m state \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;43msuper\u001b[39;49m\u001b[43m(\u001b[49m\u001b[43m)\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mdescribe_state\u001b[49m\u001b[43m(\u001b[49m\u001b[43m)\u001b[49m\n\u001b[0;32m 76\u001b[0m state[\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mhistory\u001b[39m\u001b[38;5;124m\"\u001b[39m] \u001b[38;5;241m=\u001b[39m [hist_item\u001b[38;5;241m.\u001b[39mstate() \u001b[38;5;28;01mfor\u001b[39;00m hist_item \u001b[38;5;129;01min\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mhistory]\n\u001b[0;32m 77\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m state\n", + "File \u001b[1;32mC:\\Projects\\PrimAITE\\src\\primaite\\simulator\\system\\applications\\application.py:64\u001b[0m, in \u001b[0;36mApplication.describe_state\u001b[1;34m(self)\u001b[0m\n\u001b[0;32m 54\u001b[0m \u001b[38;5;129m@abstractmethod\u001b[39m\n\u001b[0;32m 55\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21mdescribe_state\u001b[39m(\u001b[38;5;28mself\u001b[39m) \u001b[38;5;241m-\u001b[39m\u001b[38;5;241m>\u001b[39m Dict:\n\u001b[0;32m 56\u001b[0m \u001b[38;5;250m \u001b[39m\u001b[38;5;124;03m\"\"\"\u001b[39;00m\n\u001b[0;32m 57\u001b[0m \u001b[38;5;124;03m Produce a dictionary describing the current state of this object.\u001b[39;00m\n\u001b[0;32m 58\u001b[0m \n\u001b[1;32m (...)\u001b[0m\n\u001b[0;32m 62\u001b[0m \u001b[38;5;124;03m :rtype: Dict\u001b[39;00m\n\u001b[0;32m 63\u001b[0m \u001b[38;5;124;03m \"\"\"\u001b[39;00m\n\u001b[1;32m---> 64\u001b[0m state \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;43msuper\u001b[39;49m\u001b[43m(\u001b[49m\u001b[43m)\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mdescribe_state\u001b[49m\u001b[43m(\u001b[49m\u001b[43m)\u001b[49m\n\u001b[0;32m 65\u001b[0m state\u001b[38;5;241m.\u001b[39mupdate(\n\u001b[0;32m 66\u001b[0m {\n\u001b[0;32m 67\u001b[0m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124moperating_state\u001b[39m\u001b[38;5;124m\"\u001b[39m: \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39moperating_state\u001b[38;5;241m.\u001b[39mvalue,\n\u001b[1;32m (...)\u001b[0m\n\u001b[0;32m 71\u001b[0m }\n\u001b[0;32m 72\u001b[0m )\n\u001b[0;32m 73\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m state\n", + "File \u001b[1;32mC:\\Projects\\PrimAITE\\src\\primaite\\simulator\\system\\software.py:263\u001b[0m, in \u001b[0;36mIOSoftware.describe_state\u001b[1;34m(self)\u001b[0m\n\u001b[0;32m 253\u001b[0m \u001b[38;5;129m@abstractmethod\u001b[39m\n\u001b[0;32m 254\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21mdescribe_state\u001b[39m(\u001b[38;5;28mself\u001b[39m) \u001b[38;5;241m-\u001b[39m\u001b[38;5;241m>\u001b[39m Dict:\n\u001b[0;32m 255\u001b[0m \u001b[38;5;250m \u001b[39m\u001b[38;5;124;03m\"\"\"\u001b[39;00m\n\u001b[0;32m 256\u001b[0m \u001b[38;5;124;03m Produce a dictionary describing the current state of this object.\u001b[39;00m\n\u001b[0;32m 257\u001b[0m \n\u001b[1;32m (...)\u001b[0m\n\u001b[0;32m 261\u001b[0m \u001b[38;5;124;03m :rtype: Dict\u001b[39;00m\n\u001b[0;32m 262\u001b[0m \u001b[38;5;124;03m \"\"\"\u001b[39;00m\n\u001b[1;32m--> 263\u001b[0m state \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;43msuper\u001b[39;49m\u001b[43m(\u001b[49m\u001b[43m)\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mdescribe_state\u001b[49m\u001b[43m(\u001b[49m\u001b[43m)\u001b[49m\n\u001b[0;32m 264\u001b[0m state\u001b[38;5;241m.\u001b[39mupdate(\n\u001b[0;32m 265\u001b[0m {\n\u001b[0;32m 266\u001b[0m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124minstalling_count\u001b[39m\u001b[38;5;124m\"\u001b[39m: \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39minstalling_count,\n\u001b[1;32m (...)\u001b[0m\n\u001b[0;32m 271\u001b[0m }\n\u001b[0;32m 272\u001b[0m )\n\u001b[0;32m 273\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m state\n", + "File \u001b[1;32mC:\\Projects\\PrimAITE\\src\\primaite\\simulator\\system\\software.py:149\u001b[0m, in \u001b[0;36mSoftware.describe_state\u001b[1;34m(self)\u001b[0m\n\u001b[0;32m 138\u001b[0m \u001b[38;5;250m\u001b[39m\u001b[38;5;124;03m\"\"\"\u001b[39;00m\n\u001b[0;32m 139\u001b[0m \u001b[38;5;124;03mProduce a dictionary describing the current state of this object.\u001b[39;00m\n\u001b[0;32m 140\u001b[0m \n\u001b[1;32m (...)\u001b[0m\n\u001b[0;32m 144\u001b[0m \u001b[38;5;124;03m:rtype: Dict\u001b[39;00m\n\u001b[0;32m 145\u001b[0m \u001b[38;5;124;03m\"\"\"\u001b[39;00m\n\u001b[0;32m 146\u001b[0m state \u001b[38;5;241m=\u001b[39m \u001b[38;5;28msuper\u001b[39m()\u001b[38;5;241m.\u001b[39mdescribe_state()\n\u001b[0;32m 147\u001b[0m state\u001b[38;5;241m.\u001b[39mupdate(\n\u001b[0;32m 148\u001b[0m {\n\u001b[1;32m--> 149\u001b[0m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mhealth_state_actual\u001b[39m\u001b[38;5;124m\"\u001b[39m: \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mhealth_state_actual\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mvalue\u001b[49m,\n\u001b[0;32m 150\u001b[0m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mhealth_state_visible\u001b[39m\u001b[38;5;124m\"\u001b[39m: \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mhealth_state_visible\u001b[38;5;241m.\u001b[39mvalue,\n\u001b[0;32m 151\u001b[0m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mcriticality\u001b[39m\u001b[38;5;124m\"\u001b[39m: \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mcriticality\u001b[38;5;241m.\u001b[39mvalue,\n\u001b[0;32m 152\u001b[0m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mfixing_count\u001b[39m\u001b[38;5;124m\"\u001b[39m: \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mfixing_count,\n\u001b[0;32m 153\u001b[0m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mscanning_count\u001b[39m\u001b[38;5;124m\"\u001b[39m: \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mscanning_count,\n\u001b[0;32m 154\u001b[0m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mrevealed_to_red\u001b[39m\u001b[38;5;124m\"\u001b[39m: \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mrevealed_to_red,\n\u001b[0;32m 155\u001b[0m }\n\u001b[0;32m 156\u001b[0m )\n\u001b[0;32m 157\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m state\n", + "File \u001b[1;32m~\\AppData\\Local\\Programs\\Python\\Python310\\lib\\types.py:177\u001b[0m, in \u001b[0;36mDynamicClassAttribute.__get__\u001b[1;34m(self, instance, ownerclass)\u001b[0m\n\u001b[0;32m 176\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21m__get__\u001b[39m(\u001b[38;5;28mself\u001b[39m, instance, ownerclass\u001b[38;5;241m=\u001b[39m\u001b[38;5;28;01mNone\u001b[39;00m):\n\u001b[1;32m--> 177\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[43minstance\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;129;43;01mis\u001b[39;49;00m\u001b[43m \u001b[49m\u001b[38;5;28;43;01mNone\u001b[39;49;00m:\n\u001b[0;32m 178\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m__isabstractmethod__:\n\u001b[0;32m 179\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28mself\u001b[39m\n", + "\u001b[1;31mKeyboardInterrupt\u001b[0m: " + ] + } + ], "source": [ "model.learn(total_timesteps=TOTAL_TIMESTEPS)\n" ] }, { "cell_type": "code", - "execution_count": null, + "execution_count": 9, "metadata": {}, "outputs": [], "source": [ @@ -83,7 +7216,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 10, "metadata": {}, "outputs": [], "source": [ @@ -93,9 +7226,187 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 11, "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "c:\\Projects\\PrimAITE\\.venv\\lib\\site-packages\\stable_baselines3\\common\\evaluation.py:67: UserWarning: Evaluation environment is not wrapped with a ``Monitor`` wrapper. This may result in reporting modified episode lengths and rewards, if other wrappers happen to modify these. Consider wrapping environment first with ``Monitor`` wrapper.\n", + " warnings.warn(\n", + "2024-04-08 15:04:51,136: Resetting environment, episode 473, avg. reward: 0.0\n", + "2024-04-08 15:04:51,140: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_473.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 15:04:53,329: Resetting environment, episode 474, avg. reward: -62.59999999999992\n", + "2024-04-08 15:04:53,332: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_474.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 15:04:55,400: Resetting environment, episode 475, avg. reward: -58.649999999999935\n", + "2024-04-08 15:04:55,403: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_475.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 15:04:57,612: Resetting environment, episode 476, avg. reward: -54.549999999999955\n", + "2024-04-08 15:04:57,617: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_476.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 15:05:02,916: Resetting environment, episode 477, avg. reward: -64.99999999999991\n", + "2024-04-08 15:05:02,918: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_477.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 15:05:05,225: Resetting environment, episode 478, avg. reward: -53.19999999999996\n", + "2024-04-08 15:05:05,228: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_478.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 15:05:07,766: Resetting environment, episode 479, avg. reward: -55.79999999999997\n", + "2024-04-08 15:05:07,769: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_479.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 15:05:10,062: Resetting environment, episode 480, avg. reward: -32.75000000000003\n", + "2024-04-08 15:05:10,065: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_480.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 15:05:12,370: Resetting environment, episode 481, avg. reward: -23.549999999999986\n", + "2024-04-08 15:05:12,373: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_481.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 15:05:14,716: Resetting environment, episode 482, avg. reward: -15.04999999999997\n", + "2024-04-08 15:05:14,719: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_482.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-04-08 15:05:16,779: Resetting environment, episode 483, avg. reward: -50.549999999999976\n", + "2024-04-08 15:05:16,782: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_483.json\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" + ] + }, + { + "data": { + "text/plain": [ + "(-47.170001389086245, 16.315777792523683)" + ] + }, + "execution_count": 11, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ "from stable_baselines3.common.evaluation import evaluate_policy\n", "\n", @@ -119,7 +7430,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.9.18" + "version": "3.10.11" } }, "nbformat": 4, diff --git a/src/primaite/simulator/_package_data/create-simulation_demo.ipynb b/src/primaite/simulator/_package_data/create-simulation_demo.ipynb index d9742b50..57003e55 100644 --- a/src/primaite/simulator/_package_data/create-simulation_demo.ipynb +++ b/src/primaite/simulator/_package_data/create-simulation_demo.ipynb @@ -18,7 +18,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 119, "metadata": {}, "outputs": [], "source": [ @@ -36,9 +36,24 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 120, "metadata": {}, - "outputs": [], + "outputs": [ + { + "data": { + "text/plain": [ + "{'uuid': '42d005b2-4dc8-4aec-be54-3493242eee32',\n", + " 'network': {'uuid': '069f61a4-ac40-431f-ad13-2fc9b26dc091',\n", + " 'nodes': {},\n", + " 'links': {}},\n", + " 'domain': {'uuid': 'f0629156-e9af-493d-b098-f47d73126122', 'accounts': {}}}" + ] + }, + "execution_count": 120, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ "my_sim = Simulation()\n", "net = my_sim.network\n", @@ -54,22 +69,23 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 121, "metadata": {}, "outputs": [], "source": [ - "from primaite.simulator.network.hardware.base import Node\n" + "from primaite.simulator.network.hardware.nodes.host.computer import Computer\n", + "from primaite.simulator.network.hardware.nodes.host.server import Server" ] }, { "cell_type": "code", - "execution_count": null, + "execution_count": 122, "metadata": {}, "outputs": [], "source": [ - "my_pc = Node(hostname=\"primaite_pc\",)\n", + "my_pc = Computer(hostname=\"primaite_pc\", ip_address=\"192.168.1.10\", subnet_mask=\"255.255.255.0\")\n", "net.add_node(my_pc)\n", - "my_server = Node(hostname=\"google_server\")\n", + "my_server = Server(hostname=\"google_server\", ip_address=\"192.168.1.11\", subnet_mask=\"255.255.255.0\")\n", "net.add_node(my_server)\n" ] }, @@ -82,32 +98,42 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 123, "metadata": {}, "outputs": [], "source": [ - "from primaite.simulator.network.hardware.base import NIC, Link, Switch\n" + "from primaite.simulator.network.hardware.nodes.host.host_node import NIC\n", + "from primaite.simulator.network.hardware.nodes.network.switch import Switch\n" ] }, { "cell_type": "code", - "execution_count": null, + "execution_count": 124, "metadata": {}, - "outputs": [], + "outputs": [ + { + "data": { + "text/plain": [ + "Link(uuid='42b8f911-3640-4ccb-b277-b48b294a1fc8', endpoint_a=NIC(ip_address=IPv4Address('130.1.1.2'), subnet_mask=IPv4Address('255.255.255.0'), uuid='53993d8f-216e-4c00-9b03-c6bb9e2437b5', mac_address='17:9d:82:db:ca:c8', speed=100, mtu=1500, enabled=False, port_num=2, port_name=None, pcap=None, nmne={}, wake_on_lan=False, gateway='130.1.1.255'), endpoint_b=SwitchPort(uuid='c03d4d22-f309-49b6-a1ad-45a04c40d25e', mac_address='84:01:f3:bb:47:1c', speed=100, mtu=1500, enabled=False, port_num=2, port_name=None, pcap=None, nmne={}), bandwidth=100.0, current_load=0.0)" + ] + }, + "execution_count": 124, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ - "my_swtich = Switch(hostname=\"switch1\", num_ports=12)\n", - "net.add_node(my_swtich)\n", + "my_switch = Switch(hostname=\"switch1\", num_ports=12)\n", + "net.add_node(my_switch)\n", "\n", "pc_nic = NIC(ip_address=\"130.1.1.1\", gateway=\"130.1.1.255\", subnet_mask=\"255.255.255.0\")\n", "my_pc.connect_nic(pc_nic)\n", "\n", - "\n", "server_nic = NIC(ip_address=\"130.1.1.2\", gateway=\"130.1.1.255\", subnet_mask=\"255.255.255.0\")\n", "my_server.connect_nic(server_nic)\n", "\n", - "\n", - "net.connect(pc_nic, my_swtich.switch_ports[1])\n", - "net.connect(server_nic, my_swtich.switch_ports[2])\n" + "net.connect(pc_nic, my_switch.network_interface[1])\n", + "net.connect(server_nic, my_switch.network_interface[2])\n" ] }, { @@ -119,29 +145,41 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 125, "metadata": {}, "outputs": [], "source": [ "from primaite.simulator.file_system.file_type import FileType\n", - "from primaite.simulator.file_system.file_system import File" + "from primaite.simulator.file_system.file_system import File\n", + "from primaite.simulator.system.core.sys_log import SysLog" ] }, { "cell_type": "code", - "execution_count": null, + "execution_count": 126, "metadata": {}, "outputs": [], "source": [ "my_pc_downloads_folder = my_pc.file_system.create_folder(\"downloads\")\n", - "my_pc_downloads_folder.add_file(File(name=\"firefox_installer.zip\",file_type=FileType.ZIP))" + "my_pc_downloads_folder.add_file(File(name=\"firefox_installer.zip\",folder_id=\"Test\", folder_name=\"downloads\" ,file_type=FileType.ZIP, sys_log=SysLog(hostname=\"Test\")))" ] }, { "cell_type": "code", - "execution_count": null, + "execution_count": 127, "metadata": {}, - "outputs": [], + "outputs": [ + { + "data": { + "text/plain": [ + "File(uuid='24789051-6762-48f4-8a56-c28882374273', name='favicon.ico', health_status=, visible_health_status=, previous_hash=None, revealed_to_red=False, sys_log=, deleted=False, folder_id='7a86576b-607f-468b-826f-4834cf2b3511', folder_name='root', file_type=, sim_size=0, real=False, sim_path=None, sim_root=WindowsPath('C:/Projects/PrimAITE/simulation_output/2024-04-08_12-19-36/google_server/fs'), num_access=0, folder=Folder(uuid='7a86576b-607f-468b-826f-4834cf2b3511', name='root', health_status=, visible_health_status=, previous_hash=None, revealed_to_red=False, sys_log=, deleted=False, files={'24789051-6762-48f4-8a56-c28882374273': File(uuid='24789051-6762-48f4-8a56-c28882374273', name='favicon.ico', health_status=, visible_health_status=, previous_hash=None, revealed_to_red=False, sys_log=, deleted=False, folder_id='7a86576b-607f-468b-826f-4834cf2b3511', folder_name='root', file_type=, sim_size=0, real=False, sim_path=None, sim_root=WindowsPath('C:/Projects/PrimAITE/simulation_output/2024-04-08_12-19-36/google_server/fs'), num_access=0, folder=Folder(uuid='7a86576b-607f-468b-826f-4834cf2b3511', name='root', health_status=, visible_health_status=, previous_hash=None, revealed_to_red=False, sys_log=, deleted=False, files={...}, deleted_files={}, scan_duration=3, scan_countdown=0, red_scan_duration=3, red_scan_countdown=0, restore_duration=3, restore_countdown=0))}, deleted_files={}, scan_duration=3, scan_countdown=0, red_scan_duration=3, red_scan_countdown=0, restore_duration=3, restore_countdown=0))" + ] + }, + "execution_count": 127, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ "my_server_folder = my_server.file_system.create_folder(\"static\")\n", "my_server.file_system.create_file(\"favicon.ico\", file_type=FileType.PNG)" @@ -156,13 +194,16 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 128, "metadata": {}, "outputs": [], "source": [ "from primaite.simulator.system.applications.application import Application, ApplicationOperatingState\n", "from primaite.simulator.system.software import SoftwareHealthState, SoftwareCriticality\n", "from primaite.simulator.network.transmission.transport_layer import Port\n", + "from primaite.simulator.network.transmission.network_layer import IPProtocol\n", + "from primaite.simulator.file_system.file_system import FileSystem\n", + "from pathlib import Path\n", "\n", "# no applications exist yet so we will create our own.\n", "class MSPaint(Application):\n", @@ -172,16 +213,16 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 129, "metadata": {}, "outputs": [], "source": [ - "mspaint = MSPaint(name = \"mspaint\", health_state_actual=SoftwareHealthState.GOOD, health_state_visible=SoftwareHealthState.GOOD, criticality=SoftwareCriticality.MEDIUM, ports={Port.HTTP}, operating_state=ApplicationOperatingState.RUNNING,execution_control_status='manual')" + "mspaint = MSPaint(name = \"mspaint\", health_state_actual=SoftwareHealthState.GOOD, health_state_visible=SoftwareHealthState.GOOD, criticality=SoftwareCriticality.MEDIUM, port=Port.HTTP, protocol = IPProtocol.NONE,operating_state=ApplicationOperatingState.RUNNING,execution_control_status='manual', file_system=FileSystem(sys_log=SysLog(hostname=\"Test\"), sim_root=Path(__name__).parent),)" ] }, { "cell_type": "code", - "execution_count": null, + "execution_count": 130, "metadata": {}, "outputs": [], "source": [ @@ -197,7 +238,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 131, "metadata": {}, "outputs": [], "source": [ @@ -206,7 +247,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 132, "metadata": {}, "outputs": [], "source": [ @@ -223,18 +264,515 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 133, "metadata": {}, - "outputs": [], + "outputs": [ + { + "data": { + "text/plain": [ + "{'uuid': '42d005b2-4dc8-4aec-be54-3493242eee32',\n", + " 'network': {'uuid': '069f61a4-ac40-431f-ad13-2fc9b26dc091',\n", + " 'nodes': {'primaite_pc': {'uuid': '52246eed-9a3f-4b19-ad0c-48fc3bbb998d',\n", + " 'hostname': 'primaite_pc',\n", + " 'operating_state': 2,\n", + " 'NICs': {1: {'uuid': '73dcb42e-7db4-45cf-b439-9b8066c8e32e',\n", + " 'mac_address': 'c9:84:ec:48:87:77',\n", + " 'speed': 100,\n", + " 'mtu': 1500,\n", + " 'enabled': False,\n", + " 'nmne': {},\n", + " 'ip_address': '192.168.1.10',\n", + " 'subnet_mask': '255.255.255.0',\n", + " 'wake_on_lan': False},\n", + " 2: {'uuid': 'e0fbda66-afcb-4a79-b696-aad0778279a2',\n", + " 'mac_address': 'cb:66:8b:b2:dc:51',\n", + " 'speed': 100,\n", + " 'mtu': 1500,\n", + " 'enabled': False,\n", + " 'nmne': {},\n", + " 'ip_address': '130.1.1.1',\n", + " 'subnet_mask': '255.255.255.0',\n", + " 'wake_on_lan': False}},\n", + " 'file_system': {'uuid': '8a857927-dd5e-40e9-86fd-1df8b3a2b463',\n", + " 'folders': {'root': {'uuid': 'acb725c9-461e-40c5-b2c0-ed198865e1f2',\n", + " 'name': 'root',\n", + " 'health_status': 1,\n", + " 'visible_status': 1,\n", + " 'previous_hash': None,\n", + " 'revealed_to_red': False,\n", + " 'files': {},\n", + " 'deleted_files': {}},\n", + " 'downloads': {'uuid': '484f7bcf-b8da-4995-8538-82b2a4d059c7',\n", + " 'name': 'downloads',\n", + " 'health_status': 1,\n", + " 'visible_status': 1,\n", + " 'previous_hash': None,\n", + " 'revealed_to_red': False,\n", + " 'files': {'firefox_installer.zip': {'uuid': '5e1e5bec-a984-4ae1-9799-78083bd2e3c2',\n", + " 'name': 'firefox_installer.zip',\n", + " 'health_status': 1,\n", + " 'visible_status': 1,\n", + " 'previous_hash': None,\n", + " 'revealed_to_red': False,\n", + " 'size': 1024000,\n", + " 'file_type': 'ZIP',\n", + " 'num_access': 0}},\n", + " 'deleted_files': {}}},\n", + " 'deleted_folders': {},\n", + " 'num_file_creations': 0,\n", + " 'num_file_deletions': 0},\n", + " 'applications': {'WebBrowser': {'uuid': '5987fc38-686d-439f-b513-23166884596e',\n", + " 'health_state_actual': 0,\n", + " 'health_state_visible': 0,\n", + " 'criticality': 1,\n", + " 'fixing_count': 0,\n", + " 'scanning_count': 0,\n", + " 'revealed_to_red': False,\n", + " 'installing_count': 0,\n", + " 'max_sessions': 100,\n", + " 'tcp': True,\n", + " 'udp': True,\n", + " 'port': 80,\n", + " 'operating_state': 2,\n", + " 'execution_control_status': 'manual',\n", + " 'num_executions': 0,\n", + " 'groups': [],\n", + " 'history': []},\n", + " 'mspaint': {'uuid': '88eb36c5-dba4-4f79-ad95-5957f7de3fa2',\n", + " 'health_state_actual': 1,\n", + " 'health_state_visible': 1,\n", + " 'criticality': 3,\n", + " 'fixing_count': 0,\n", + " 'scanning_count': 0,\n", + " 'revealed_to_red': False,\n", + " 'installing_count': 0,\n", + " 'max_sessions': 100,\n", + " 'tcp': True,\n", + " 'udp': True,\n", + " 'port': 80,\n", + " 'operating_state': 1,\n", + " 'execution_control_status': 'manual',\n", + " 'num_executions': 0,\n", + " 'groups': []}},\n", + " 'services': {'ARP': {'uuid': 'e220dde6-88d5-4e24-a2de-5bce0cd4a916',\n", + " 'health_state_actual': 0,\n", + " 'health_state_visible': 0,\n", + " 'criticality': 1,\n", + " 'fixing_count': 0,\n", + " 'scanning_count': 0,\n", + " 'revealed_to_red': False,\n", + " 'installing_count': 0,\n", + " 'max_sessions': 100,\n", + " 'tcp': True,\n", + " 'udp': True,\n", + " 'port': 219,\n", + " 'operating_state': 2},\n", + " 'ICMP': {'uuid': 'ef728c73-97b7-480f-bedb-04dc3d5efd57',\n", + " 'health_state_actual': 0,\n", + " 'health_state_visible': 0,\n", + " 'criticality': 1,\n", + " 'fixing_count': 0,\n", + " 'scanning_count': 0,\n", + " 'revealed_to_red': False,\n", + " 'installing_count': 0,\n", + " 'max_sessions': 100,\n", + " 'tcp': True,\n", + " 'udp': True,\n", + " 'port': 0,\n", + " 'operating_state': 2},\n", + " 'DNSClient': {'uuid': '30b159f1-a4e8-41f5-923b-c692d104f385',\n", + " 'health_state_actual': 0,\n", + " 'health_state_visible': 0,\n", + " 'criticality': 1,\n", + " 'fixing_count': 0,\n", + " 'scanning_count': 0,\n", + " 'revealed_to_red': False,\n", + " 'installing_count': 0,\n", + " 'max_sessions': 100,\n", + " 'tcp': True,\n", + " 'udp': True,\n", + " 'port': 53,\n", + " 'operating_state': 2},\n", + " 'FTPClient': {'uuid': '5f267d5f-6bb8-4e97-b6b9-855ee2d50c25',\n", + " 'health_state_actual': 0,\n", + " 'health_state_visible': 0,\n", + " 'criticality': 1,\n", + " 'fixing_count': 0,\n", + " 'scanning_count': 0,\n", + " 'revealed_to_red': False,\n", + " 'installing_count': 0,\n", + " 'max_sessions': 100,\n", + " 'tcp': True,\n", + " 'udp': True,\n", + " 'port': 21,\n", + " 'operating_state': 2},\n", + " 'NTPClient': {'uuid': '1ea99f1e-dc04-4548-a384-913851a7e4fd',\n", + " 'health_state_actual': 0,\n", + " 'health_state_visible': 0,\n", + " 'criticality': 1,\n", + " 'fixing_count': 0,\n", + " 'scanning_count': 0,\n", + " 'revealed_to_red': False,\n", + " 'installing_count': 0,\n", + " 'max_sessions': 100,\n", + " 'tcp': True,\n", + " 'udp': True,\n", + " 'port': 123,\n", + " 'operating_state': 2}},\n", + " 'process': {},\n", + " 'revealed_to_red': False},\n", + " 'google_server': {'uuid': 'b9a41d9c-6642-441b-8049-8302ddafd3b1',\n", + " 'hostname': 'google_server',\n", + " 'operating_state': 2,\n", + " 'NICs': {1: {'uuid': 'd0736beb-085a-4754-8b44-de73e6a8c80f',\n", + " 'mac_address': '45:27:ed:64:ac:09',\n", + " 'speed': 100,\n", + " 'mtu': 1500,\n", + " 'enabled': False,\n", + " 'nmne': {},\n", + " 'ip_address': '192.168.1.11',\n", + " 'subnet_mask': '255.255.255.0',\n", + " 'wake_on_lan': False},\n", + " 2: {'uuid': '53993d8f-216e-4c00-9b03-c6bb9e2437b5',\n", + " 'mac_address': '17:9d:82:db:ca:c8',\n", + " 'speed': 100,\n", + " 'mtu': 1500,\n", + " 'enabled': False,\n", + " 'nmne': {},\n", + " 'ip_address': '130.1.1.2',\n", + " 'subnet_mask': '255.255.255.0',\n", + " 'wake_on_lan': False}},\n", + " 'file_system': {'uuid': '8d4ded3a-56bb-46f0-ad7f-40d65b523581',\n", + " 'folders': {'root': {'uuid': '7a86576b-607f-468b-826f-4834cf2b3511',\n", + " 'name': 'root',\n", + " 'health_status': 1,\n", + " 'visible_status': 1,\n", + " 'previous_hash': None,\n", + " 'revealed_to_red': False,\n", + " 'files': {'favicon.ico': {'uuid': '24789051-6762-48f4-8a56-c28882374273',\n", + " 'name': 'favicon.ico',\n", + " 'health_status': 1,\n", + " 'visible_status': 1,\n", + " 'previous_hash': None,\n", + " 'revealed_to_red': False,\n", + " 'size': 0,\n", + " 'file_type': 'UNKNOWN',\n", + " 'num_access': 0}},\n", + " 'deleted_files': {}},\n", + " 'static': {'uuid': '154b2ad3-e43d-4924-b758-e11db0e176de',\n", + " 'name': 'static',\n", + " 'health_status': 1,\n", + " 'visible_status': 1,\n", + " 'previous_hash': None,\n", + " 'revealed_to_red': False,\n", + " 'files': {},\n", + " 'deleted_files': {}}},\n", + " 'deleted_folders': {},\n", + " 'num_file_creations': 1,\n", + " 'num_file_deletions': 0},\n", + " 'applications': {'WebBrowser': {'uuid': '9b368321-e22d-4e35-9395-80632492c20a',\n", + " 'health_state_actual': 0,\n", + " 'health_state_visible': 0,\n", + " 'criticality': 1,\n", + " 'fixing_count': 0,\n", + " 'scanning_count': 0,\n", + " 'revealed_to_red': False,\n", + " 'installing_count': 0,\n", + " 'max_sessions': 100,\n", + " 'tcp': True,\n", + " 'udp': True,\n", + " 'port': 80,\n", + " 'operating_state': 2,\n", + " 'execution_control_status': 'manual',\n", + " 'num_executions': 0,\n", + " 'groups': [],\n", + " 'history': []}},\n", + " 'services': {'ARP': {'uuid': '30df82c0-5823-4464-8c23-5b99922f98f7',\n", + " 'health_state_actual': 0,\n", + " 'health_state_visible': 0,\n", + " 'criticality': 1,\n", + " 'fixing_count': 0,\n", + " 'scanning_count': 0,\n", + " 'revealed_to_red': False,\n", + " 'installing_count': 0,\n", + " 'max_sessions': 100,\n", + " 'tcp': True,\n", + " 'udp': True,\n", + " 'port': 219,\n", + " 'operating_state': 2},\n", + " 'ICMP': {'uuid': '2d02a2de-7ec8-4da1-9538-c85eb397d4e3',\n", + " 'health_state_actual': 0,\n", + " 'health_state_visible': 0,\n", + " 'criticality': 1,\n", + " 'fixing_count': 0,\n", + " 'scanning_count': 0,\n", + " 'revealed_to_red': False,\n", + " 'installing_count': 0,\n", + " 'max_sessions': 100,\n", + " 'tcp': True,\n", + " 'udp': True,\n", + " 'port': 0,\n", + " 'operating_state': 2},\n", + " 'DNSClient': {'uuid': 'db979263-ff81-4a04-95e8-d94442e9ddfa',\n", + " 'health_state_actual': 0,\n", + " 'health_state_visible': 0,\n", + " 'criticality': 1,\n", + " 'fixing_count': 0,\n", + " 'scanning_count': 0,\n", + " 'revealed_to_red': False,\n", + " 'installing_count': 0,\n", + " 'max_sessions': 100,\n", + " 'tcp': True,\n", + " 'udp': True,\n", + " 'port': 53,\n", + " 'operating_state': 2},\n", + " 'FTPClient': {'uuid': 'd9d6417b-d1e0-416b-a711-3478fa248194',\n", + " 'health_state_actual': 0,\n", + " 'health_state_visible': 0,\n", + " 'criticality': 1,\n", + " 'fixing_count': 0,\n", + " 'scanning_count': 0,\n", + " 'revealed_to_red': False,\n", + " 'installing_count': 0,\n", + " 'max_sessions': 100,\n", + " 'tcp': True,\n", + " 'udp': True,\n", + " 'port': 21,\n", + " 'operating_state': 2},\n", + " 'NTPClient': {'uuid': 'b23a1032-a817-492b-bdd6-2ecc6fb4591c',\n", + " 'health_state_actual': 0,\n", + " 'health_state_visible': 0,\n", + " 'criticality': 1,\n", + " 'fixing_count': 0,\n", + " 'scanning_count': 0,\n", + " 'revealed_to_red': False,\n", + " 'installing_count': 0,\n", + " 'max_sessions': 100,\n", + " 'tcp': True,\n", + " 'udp': True,\n", + " 'port': 123,\n", + " 'operating_state': 2}},\n", + " 'process': {},\n", + " 'revealed_to_red': False},\n", + " 'switch1': {'uuid': 'e658eac3-c4b8-4768-bf27-e2d90b7f57c0',\n", + " 'hostname': 'switch1',\n", + " 'operating_state': 2,\n", + " 'NICs': {1: {'uuid': '7ebc80f5-902f-4253-8ea6-0cafa3d1cccd',\n", + " 'mac_address': 'df:d2:c7:2a:a1:52',\n", + " 'speed': 100,\n", + " 'mtu': 1500,\n", + " 'enabled': False,\n", + " 'nmne': {}},\n", + " 2: {'uuid': 'c03d4d22-f309-49b6-a1ad-45a04c40d25e',\n", + " 'mac_address': '84:01:f3:bb:47:1c',\n", + " 'speed': 100,\n", + " 'mtu': 1500,\n", + " 'enabled': False,\n", + " 'nmne': {}},\n", + " 3: {'uuid': '4207353c-e0cd-456d-89fe-13ddfc605cff',\n", + " 'mac_address': '8b:31:ac:cc:05:c9',\n", + " 'speed': 100,\n", + " 'mtu': 1500,\n", + " 'enabled': False,\n", + " 'nmne': {}},\n", + " 4: {'uuid': '8aa1395f-e360-48a7-be97-ed1a5ca191ae',\n", + " 'mac_address': '75:3c:ae:bd:3a:b5',\n", + " 'speed': 100,\n", + " 'mtu': 1500,\n", + " 'enabled': False,\n", + " 'nmne': {}},\n", + " 5: {'uuid': '8b5d575c-ab0c-43ac-abfc-fa5ae75183e5',\n", + " 'mac_address': 'e7:7f:c4:af:8e:5b',\n", + " 'speed': 100,\n", + " 'mtu': 1500,\n", + " 'enabled': False,\n", + " 'nmne': {}},\n", + " 6: {'uuid': '9d3cd584-f684-4f2e-9c8a-423d859fe3d3',\n", + " 'mac_address': '48:cf:18:8d:92:80',\n", + " 'speed': 100,\n", + " 'mtu': 1500,\n", + " 'enabled': False,\n", + " 'nmne': {}},\n", + " 7: {'uuid': 'd42338bb-d579-483d-9e05-0318e17e574a',\n", + " 'mac_address': 'c6:99:5c:41:13:d7',\n", + " 'speed': 100,\n", + " 'mtu': 1500,\n", + " 'enabled': False,\n", + " 'nmne': {}},\n", + " 8: {'uuid': '55bbd70b-491d-4452-8326-390ec3fadc28',\n", + " 'mac_address': '81:ab:39:0c:a2:dd',\n", + " 'speed': 100,\n", + " 'mtu': 1500,\n", + " 'enabled': False,\n", + " 'nmne': {}},\n", + " 9: {'uuid': '0755d768-79c7-48cf-9220-d2dad32e574b',\n", + " 'mac_address': '62:35:0c:5e:cc:5d',\n", + " 'speed': 100,\n", + " 'mtu': 1500,\n", + " 'enabled': False,\n", + " 'nmne': {}},\n", + " 10: {'uuid': 'deaecc57-ec76-4e27-a37e-f66964901b03',\n", + " 'mac_address': '51:26:00:c6:7e:ac',\n", + " 'speed': 100,\n", + " 'mtu': 1500,\n", + " 'enabled': False,\n", + " 'nmne': {}},\n", + " 11: {'uuid': '53fe318c-4969-42fe-920b-37a491f54d84',\n", + " 'mac_address': '35:59:c7:13:ab:a5',\n", + " 'speed': 100,\n", + " 'mtu': 1500,\n", + " 'enabled': False,\n", + " 'nmne': {}},\n", + " 12: {'uuid': '5a81caa0-9d91-4a86-9bd4-4ecb589c70ae',\n", + " 'mac_address': '7a:6b:ec:15:1e:de',\n", + " 'speed': 100,\n", + " 'mtu': 1500,\n", + " 'enabled': False,\n", + " 'nmne': {}}},\n", + " 'file_system': {'uuid': '289bea1e-69bf-44d5-80fe-212dad8afcd5',\n", + " 'folders': {'root': {'uuid': '3b588b3c-bc4a-4c06-a688-eced0128b128',\n", + " 'name': 'root',\n", + " 'health_status': 1,\n", + " 'visible_status': 1,\n", + " 'previous_hash': None,\n", + " 'revealed_to_red': False,\n", + " 'files': {},\n", + " 'deleted_files': {}}},\n", + " 'deleted_folders': {},\n", + " 'num_file_creations': 0,\n", + " 'num_file_deletions': 0},\n", + " 'applications': {},\n", + " 'services': {},\n", + " 'process': {},\n", + " 'revealed_to_red': False,\n", + " 'ports': {1: {'uuid': '7ebc80f5-902f-4253-8ea6-0cafa3d1cccd',\n", + " 'mac_address': 'df:d2:c7:2a:a1:52',\n", + " 'speed': 100,\n", + " 'mtu': 1500,\n", + " 'enabled': False,\n", + " 'nmne': {}},\n", + " 2: {'uuid': 'c03d4d22-f309-49b6-a1ad-45a04c40d25e',\n", + " 'mac_address': '84:01:f3:bb:47:1c',\n", + " 'speed': 100,\n", + " 'mtu': 1500,\n", + " 'enabled': False,\n", + " 'nmne': {}},\n", + " 3: {'uuid': '4207353c-e0cd-456d-89fe-13ddfc605cff',\n", + " 'mac_address': '8b:31:ac:cc:05:c9',\n", + " 'speed': 100,\n", + " 'mtu': 1500,\n", + " 'enabled': False,\n", + " 'nmne': {}},\n", + " 4: {'uuid': '8aa1395f-e360-48a7-be97-ed1a5ca191ae',\n", + " 'mac_address': '75:3c:ae:bd:3a:b5',\n", + " 'speed': 100,\n", + " 'mtu': 1500,\n", + " 'enabled': False,\n", + " 'nmne': {}},\n", + " 5: {'uuid': '8b5d575c-ab0c-43ac-abfc-fa5ae75183e5',\n", + " 'mac_address': 'e7:7f:c4:af:8e:5b',\n", + " 'speed': 100,\n", + " 'mtu': 1500,\n", + " 'enabled': False,\n", + " 'nmne': {}},\n", + " 6: {'uuid': '9d3cd584-f684-4f2e-9c8a-423d859fe3d3',\n", + " 'mac_address': '48:cf:18:8d:92:80',\n", + " 'speed': 100,\n", + " 'mtu': 1500,\n", + " 'enabled': False,\n", + " 'nmne': {}},\n", + " 7: {'uuid': 'd42338bb-d579-483d-9e05-0318e17e574a',\n", + " 'mac_address': 'c6:99:5c:41:13:d7',\n", + " 'speed': 100,\n", + " 'mtu': 1500,\n", + " 'enabled': False,\n", + " 'nmne': {}},\n", + " 8: {'uuid': '55bbd70b-491d-4452-8326-390ec3fadc28',\n", + " 'mac_address': '81:ab:39:0c:a2:dd',\n", + " 'speed': 100,\n", + " 'mtu': 1500,\n", + " 'enabled': False,\n", + " 'nmne': {}},\n", + " 9: {'uuid': '0755d768-79c7-48cf-9220-d2dad32e574b',\n", + " 'mac_address': '62:35:0c:5e:cc:5d',\n", + " 'speed': 100,\n", + " 'mtu': 1500,\n", + " 'enabled': False,\n", + " 'nmne': {}},\n", + " 10: {'uuid': 'deaecc57-ec76-4e27-a37e-f66964901b03',\n", + " 'mac_address': '51:26:00:c6:7e:ac',\n", + " 'speed': 100,\n", + " 'mtu': 1500,\n", + " 'enabled': False,\n", + " 'nmne': {}},\n", + " 11: {'uuid': '53fe318c-4969-42fe-920b-37a491f54d84',\n", + " 'mac_address': '35:59:c7:13:ab:a5',\n", + " 'speed': 100,\n", + " 'mtu': 1500,\n", + " 'enabled': False,\n", + " 'nmne': {}},\n", + " 12: {'uuid': '5a81caa0-9d91-4a86-9bd4-4ecb589c70ae',\n", + " 'mac_address': '7a:6b:ec:15:1e:de',\n", + " 'speed': 100,\n", + " 'mtu': 1500,\n", + " 'enabled': False,\n", + " 'nmne': {}}},\n", + " 'num_ports': 12,\n", + " 'mac_address_table': {}}},\n", + " 'links': {'primaite_pc:eth-2<->switch1:eth-1': {'uuid': '3d053257-7473-4a66-afbc-ee33a18f2e39',\n", + " 'endpoint_a': 'e0fbda66-afcb-4a79-b696-aad0778279a2',\n", + " 'endpoint_b': '7ebc80f5-902f-4253-8ea6-0cafa3d1cccd',\n", + " 'bandwidth': 100.0,\n", + " 'current_load': 0.0,\n", + " 'hostname_a': 'primaite_pc',\n", + " 'hostname_b': 'switch1',\n", + " 'port_a': 2,\n", + " 'port_b': 1},\n", + " 'google_server:eth-2<->switch1:eth-2': {'uuid': '42b8f911-3640-4ccb-b277-b48b294a1fc8',\n", + " 'endpoint_a': '53993d8f-216e-4c00-9b03-c6bb9e2437b5',\n", + " 'endpoint_b': 'c03d4d22-f309-49b6-a1ad-45a04c40d25e',\n", + " 'bandwidth': 100.0,\n", + " 'current_load': 0.0,\n", + " 'hostname_a': 'google_server',\n", + " 'hostname_b': 'switch1',\n", + " 'port_a': 2,\n", + " 'port_b': 2}}},\n", + " 'domain': {'uuid': 'f0629156-e9af-493d-b098-f47d73126122',\n", + " 'accounts': {'admin': {'uuid': 'b76653a9-d40e-483b-85a3-1b44628a11d0',\n", + " 'num_logons': 0,\n", + " 'num_logoffs': 0,\n", + " 'num_group_changes': 0,\n", + " 'username': 'admin',\n", + " 'password': 'admin12',\n", + " 'account_type': 2,\n", + " 'enabled': True}}}}" + ] + }, + "execution_count": 133, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ "my_sim.describe_state()" ] }, { "cell_type": "code", - "execution_count": null, + "execution_count": 134, "metadata": {}, - "outputs": [], + "outputs": [ + { + "data": { + "text/plain": [ + "'{\"uuid\": \"42d005b2-4dc8-4aec-be54-3493242eee32\", \"network\": {\"uuid\": \"069f61a4-ac40-431f-ad13-2fc9b26dc091\", \"nodes\": {\"primaite_pc\": {\"uuid\": \"52246eed-9a3f-4b19-ad0c-48fc3bbb998d\", \"hostname\": \"primaite_pc\", \"operating_state\": 2, \"NICs\": {\"1\": {\"uuid\": \"73dcb42e-7db4-45cf-b439-9b8066c8e32e\", \"mac_address\": \"c9:84:ec:48:87:77\", \"speed\": 100, \"mtu\": 1500, \"enabled\": false, \"nmne\": {}, \"ip_address\": \"192.168.1.10\", \"subnet_mask\": \"255.255.255.0\", \"wake_on_lan\": false}, \"2\": {\"uuid\": \"e0fbda66-afcb-4a79-b696-aad0778279a2\", \"mac_address\": \"cb:66:8b:b2:dc:51\", \"speed\": 100, \"mtu\": 1500, \"enabled\": false, \"nmne\": {}, \"ip_address\": \"130.1.1.1\", \"subnet_mask\": \"255.255.255.0\", \"wake_on_lan\": false}}, \"file_system\": {\"uuid\": \"8a857927-dd5e-40e9-86fd-1df8b3a2b463\", \"folders\": {\"root\": {\"uuid\": \"acb725c9-461e-40c5-b2c0-ed198865e1f2\", \"name\": \"root\", \"health_status\": 1, \"visible_status\": 1, \"previous_hash\": null, \"revealed_to_red\": false, \"files\": {}, \"deleted_files\": {}}, \"downloads\": {\"uuid\": \"484f7bcf-b8da-4995-8538-82b2a4d059c7\", \"name\": \"downloads\", \"health_status\": 1, \"visible_status\": 1, \"previous_hash\": null, \"revealed_to_red\": false, \"files\": {\"firefox_installer.zip\": {\"uuid\": \"5e1e5bec-a984-4ae1-9799-78083bd2e3c2\", \"name\": \"firefox_installer.zip\", \"health_status\": 1, \"visible_status\": 1, \"previous_hash\": null, \"revealed_to_red\": false, \"size\": 1024000, \"file_type\": \"ZIP\", \"num_access\": 0}}, \"deleted_files\": {}}}, \"deleted_folders\": {}, \"num_file_creations\": 0, \"num_file_deletions\": 0}, \"applications\": {\"WebBrowser\": {\"uuid\": \"5987fc38-686d-439f-b513-23166884596e\", \"health_state_actual\": 0, \"health_state_visible\": 0, \"criticality\": 1, \"fixing_count\": 0, \"scanning_count\": 0, \"revealed_to_red\": false, \"installing_count\": 0, \"max_sessions\": 100, \"tcp\": true, \"udp\": true, \"port\": 80, \"operating_state\": 2, \"execution_control_status\": \"manual\", \"num_executions\": 0, \"groups\": [], \"history\": []}, \"mspaint\": {\"uuid\": \"88eb36c5-dba4-4f79-ad95-5957f7de3fa2\", \"health_state_actual\": 1, \"health_state_visible\": 1, \"criticality\": 3, \"fixing_count\": 0, \"scanning_count\": 0, \"revealed_to_red\": false, \"installing_count\": 0, \"max_sessions\": 100, \"tcp\": true, \"udp\": true, \"port\": 80, \"operating_state\": 1, \"execution_control_status\": \"manual\", \"num_executions\": 0, \"groups\": []}}, \"services\": {\"ARP\": {\"uuid\": \"e220dde6-88d5-4e24-a2de-5bce0cd4a916\", \"health_state_actual\": 0, \"health_state_visible\": 0, \"criticality\": 1, \"fixing_count\": 0, \"scanning_count\": 0, \"revealed_to_red\": false, \"installing_count\": 0, \"max_sessions\": 100, \"tcp\": true, \"udp\": true, \"port\": 219, \"operating_state\": 2}, \"ICMP\": {\"uuid\": \"ef728c73-97b7-480f-bedb-04dc3d5efd57\", \"health_state_actual\": 0, \"health_state_visible\": 0, \"criticality\": 1, \"fixing_count\": 0, \"scanning_count\": 0, \"revealed_to_red\": false, \"installing_count\": 0, \"max_sessions\": 100, \"tcp\": true, \"udp\": true, \"port\": 0, \"operating_state\": 2}, \"DNSClient\": {\"uuid\": \"30b159f1-a4e8-41f5-923b-c692d104f385\", \"health_state_actual\": 0, \"health_state_visible\": 0, \"criticality\": 1, \"fixing_count\": 0, \"scanning_count\": 0, \"revealed_to_red\": false, \"installing_count\": 0, \"max_sessions\": 100, \"tcp\": true, \"udp\": true, \"port\": 53, \"operating_state\": 2}, \"FTPClient\": {\"uuid\": \"5f267d5f-6bb8-4e97-b6b9-855ee2d50c25\", \"health_state_actual\": 0, \"health_state_visible\": 0, \"criticality\": 1, \"fixing_count\": 0, \"scanning_count\": 0, \"revealed_to_red\": false, \"installing_count\": 0, \"max_sessions\": 100, \"tcp\": true, \"udp\": true, \"port\": 21, \"operating_state\": 2}, \"NTPClient\": {\"uuid\": \"1ea99f1e-dc04-4548-a384-913851a7e4fd\", \"health_state_actual\": 0, \"health_state_visible\": 0, \"criticality\": 1, \"fixing_count\": 0, \"scanning_count\": 0, \"revealed_to_red\": false, \"installing_count\": 0, \"max_sessions\": 100, \"tcp\": true, \"udp\": true, \"port\": 123, \"operating_state\": 2}}, \"process\": {}, \"revealed_to_red\": false}, \"google_server\": {\"uuid\": \"b9a41d9c-6642-441b-8049-8302ddafd3b1\", \"hostname\": \"google_server\", \"operating_state\": 2, \"NICs\": {\"1\": {\"uuid\": \"d0736beb-085a-4754-8b44-de73e6a8c80f\", \"mac_address\": \"45:27:ed:64:ac:09\", \"speed\": 100, \"mtu\": 1500, \"enabled\": false, \"nmne\": {}, \"ip_address\": \"192.168.1.11\", \"subnet_mask\": \"255.255.255.0\", \"wake_on_lan\": false}, \"2\": {\"uuid\": \"53993d8f-216e-4c00-9b03-c6bb9e2437b5\", \"mac_address\": \"17:9d:82:db:ca:c8\", \"speed\": 100, \"mtu\": 1500, \"enabled\": false, \"nmne\": {}, \"ip_address\": \"130.1.1.2\", \"subnet_mask\": \"255.255.255.0\", \"wake_on_lan\": false}}, \"file_system\": {\"uuid\": \"8d4ded3a-56bb-46f0-ad7f-40d65b523581\", \"folders\": {\"root\": {\"uuid\": \"7a86576b-607f-468b-826f-4834cf2b3511\", \"name\": \"root\", \"health_status\": 1, \"visible_status\": 1, \"previous_hash\": null, \"revealed_to_red\": false, \"files\": {\"favicon.ico\": {\"uuid\": \"24789051-6762-48f4-8a56-c28882374273\", \"name\": \"favicon.ico\", \"health_status\": 1, \"visible_status\": 1, \"previous_hash\": null, \"revealed_to_red\": false, \"size\": 0, \"file_type\": \"UNKNOWN\", \"num_access\": 0}}, \"deleted_files\": {}}, \"static\": {\"uuid\": \"154b2ad3-e43d-4924-b758-e11db0e176de\", \"name\": \"static\", \"health_status\": 1, \"visible_status\": 1, \"previous_hash\": null, \"revealed_to_red\": false, \"files\": {}, \"deleted_files\": {}}}, \"deleted_folders\": {}, \"num_file_creations\": 1, \"num_file_deletions\": 0}, \"applications\": {\"WebBrowser\": {\"uuid\": \"9b368321-e22d-4e35-9395-80632492c20a\", \"health_state_actual\": 0, \"health_state_visible\": 0, \"criticality\": 1, \"fixing_count\": 0, \"scanning_count\": 0, \"revealed_to_red\": false, \"installing_count\": 0, \"max_sessions\": 100, \"tcp\": true, \"udp\": true, \"port\": 80, \"operating_state\": 2, \"execution_control_status\": \"manual\", \"num_executions\": 0, \"groups\": [], \"history\": []}}, \"services\": {\"ARP\": {\"uuid\": \"30df82c0-5823-4464-8c23-5b99922f98f7\", \"health_state_actual\": 0, \"health_state_visible\": 0, \"criticality\": 1, \"fixing_count\": 0, \"scanning_count\": 0, \"revealed_to_red\": false, \"installing_count\": 0, \"max_sessions\": 100, \"tcp\": true, \"udp\": true, \"port\": 219, \"operating_state\": 2}, \"ICMP\": {\"uuid\": \"2d02a2de-7ec8-4da1-9538-c85eb397d4e3\", \"health_state_actual\": 0, \"health_state_visible\": 0, \"criticality\": 1, \"fixing_count\": 0, \"scanning_count\": 0, \"revealed_to_red\": false, \"installing_count\": 0, \"max_sessions\": 100, \"tcp\": true, \"udp\": true, \"port\": 0, \"operating_state\": 2}, \"DNSClient\": {\"uuid\": \"db979263-ff81-4a04-95e8-d94442e9ddfa\", \"health_state_actual\": 0, \"health_state_visible\": 0, \"criticality\": 1, \"fixing_count\": 0, \"scanning_count\": 0, \"revealed_to_red\": false, \"installing_count\": 0, \"max_sessions\": 100, \"tcp\": true, \"udp\": true, \"port\": 53, \"operating_state\": 2}, \"FTPClient\": {\"uuid\": \"d9d6417b-d1e0-416b-a711-3478fa248194\", \"health_state_actual\": 0, \"health_state_visible\": 0, \"criticality\": 1, \"fixing_count\": 0, \"scanning_count\": 0, \"revealed_to_red\": false, \"installing_count\": 0, \"max_sessions\": 100, \"tcp\": true, \"udp\": true, \"port\": 21, \"operating_state\": 2}, \"NTPClient\": {\"uuid\": \"b23a1032-a817-492b-bdd6-2ecc6fb4591c\", \"health_state_actual\": 0, \"health_state_visible\": 0, \"criticality\": 1, \"fixing_count\": 0, \"scanning_count\": 0, \"revealed_to_red\": false, \"installing_count\": 0, \"max_sessions\": 100, \"tcp\": true, \"udp\": true, \"port\": 123, \"operating_state\": 2}}, \"process\": {}, \"revealed_to_red\": false}, \"switch1\": {\"uuid\": \"e658eac3-c4b8-4768-bf27-e2d90b7f57c0\", \"hostname\": \"switch1\", \"operating_state\": 2, \"NICs\": {\"1\": {\"uuid\": \"7ebc80f5-902f-4253-8ea6-0cafa3d1cccd\", \"mac_address\": \"df:d2:c7:2a:a1:52\", \"speed\": 100, \"mtu\": 1500, \"enabled\": false, \"nmne\": {}}, \"2\": {\"uuid\": \"c03d4d22-f309-49b6-a1ad-45a04c40d25e\", \"mac_address\": \"84:01:f3:bb:47:1c\", \"speed\": 100, \"mtu\": 1500, \"enabled\": false, \"nmne\": {}}, \"3\": {\"uuid\": \"4207353c-e0cd-456d-89fe-13ddfc605cff\", \"mac_address\": \"8b:31:ac:cc:05:c9\", \"speed\": 100, \"mtu\": 1500, \"enabled\": false, \"nmne\": {}}, \"4\": {\"uuid\": \"8aa1395f-e360-48a7-be97-ed1a5ca191ae\", \"mac_address\": \"75:3c:ae:bd:3a:b5\", \"speed\": 100, \"mtu\": 1500, \"enabled\": false, \"nmne\": {}}, \"5\": {\"uuid\": \"8b5d575c-ab0c-43ac-abfc-fa5ae75183e5\", \"mac_address\": \"e7:7f:c4:af:8e:5b\", \"speed\": 100, \"mtu\": 1500, \"enabled\": false, \"nmne\": {}}, \"6\": {\"uuid\": \"9d3cd584-f684-4f2e-9c8a-423d859fe3d3\", \"mac_address\": \"48:cf:18:8d:92:80\", \"speed\": 100, \"mtu\": 1500, \"enabled\": false, \"nmne\": {}}, \"7\": {\"uuid\": \"d42338bb-d579-483d-9e05-0318e17e574a\", \"mac_address\": \"c6:99:5c:41:13:d7\", \"speed\": 100, \"mtu\": 1500, \"enabled\": false, \"nmne\": {}}, \"8\": {\"uuid\": \"55bbd70b-491d-4452-8326-390ec3fadc28\", \"mac_address\": \"81:ab:39:0c:a2:dd\", \"speed\": 100, \"mtu\": 1500, \"enabled\": false, \"nmne\": {}}, \"9\": {\"uuid\": \"0755d768-79c7-48cf-9220-d2dad32e574b\", \"mac_address\": \"62:35:0c:5e:cc:5d\", \"speed\": 100, \"mtu\": 1500, \"enabled\": false, \"nmne\": {}}, \"10\": {\"uuid\": \"deaecc57-ec76-4e27-a37e-f66964901b03\", \"mac_address\": \"51:26:00:c6:7e:ac\", \"speed\": 100, \"mtu\": 1500, \"enabled\": false, \"nmne\": {}}, \"11\": {\"uuid\": \"53fe318c-4969-42fe-920b-37a491f54d84\", \"mac_address\": \"35:59:c7:13:ab:a5\", \"speed\": 100, \"mtu\": 1500, \"enabled\": false, \"nmne\": {}}, \"12\": {\"uuid\": \"5a81caa0-9d91-4a86-9bd4-4ecb589c70ae\", \"mac_address\": \"7a:6b:ec:15:1e:de\", \"speed\": 100, \"mtu\": 1500, \"enabled\": false, \"nmne\": {}}}, \"file_system\": {\"uuid\": \"289bea1e-69bf-44d5-80fe-212dad8afcd5\", \"folders\": {\"root\": {\"uuid\": \"3b588b3c-bc4a-4c06-a688-eced0128b128\", \"name\": \"root\", \"health_status\": 1, \"visible_status\": 1, \"previous_hash\": null, \"revealed_to_red\": false, \"files\": {}, \"deleted_files\": {}}}, \"deleted_folders\": {}, \"num_file_creations\": 0, \"num_file_deletions\": 0}, \"applications\": {}, \"services\": {}, \"process\": {}, \"revealed_to_red\": false, \"ports\": {\"1\": {\"uuid\": \"7ebc80f5-902f-4253-8ea6-0cafa3d1cccd\", \"mac_address\": \"df:d2:c7:2a:a1:52\", \"speed\": 100, \"mtu\": 1500, \"enabled\": false, \"nmne\": {}}, \"2\": {\"uuid\": \"c03d4d22-f309-49b6-a1ad-45a04c40d25e\", \"mac_address\": \"84:01:f3:bb:47:1c\", \"speed\": 100, \"mtu\": 1500, \"enabled\": false, \"nmne\": {}}, \"3\": {\"uuid\": \"4207353c-e0cd-456d-89fe-13ddfc605cff\", \"mac_address\": \"8b:31:ac:cc:05:c9\", \"speed\": 100, \"mtu\": 1500, \"enabled\": false, \"nmne\": {}}, \"4\": {\"uuid\": \"8aa1395f-e360-48a7-be97-ed1a5ca191ae\", \"mac_address\": \"75:3c:ae:bd:3a:b5\", \"speed\": 100, \"mtu\": 1500, \"enabled\": false, \"nmne\": {}}, \"5\": {\"uuid\": \"8b5d575c-ab0c-43ac-abfc-fa5ae75183e5\", \"mac_address\": \"e7:7f:c4:af:8e:5b\", \"speed\": 100, \"mtu\": 1500, \"enabled\": false, \"nmne\": {}}, \"6\": {\"uuid\": \"9d3cd584-f684-4f2e-9c8a-423d859fe3d3\", \"mac_address\": \"48:cf:18:8d:92:80\", \"speed\": 100, \"mtu\": 1500, \"enabled\": false, \"nmne\": {}}, \"7\": {\"uuid\": \"d42338bb-d579-483d-9e05-0318e17e574a\", \"mac_address\": \"c6:99:5c:41:13:d7\", \"speed\": 100, \"mtu\": 1500, \"enabled\": false, \"nmne\": {}}, \"8\": {\"uuid\": \"55bbd70b-491d-4452-8326-390ec3fadc28\", \"mac_address\": \"81:ab:39:0c:a2:dd\", \"speed\": 100, \"mtu\": 1500, \"enabled\": false, \"nmne\": {}}, \"9\": {\"uuid\": \"0755d768-79c7-48cf-9220-d2dad32e574b\", \"mac_address\": \"62:35:0c:5e:cc:5d\", \"speed\": 100, \"mtu\": 1500, \"enabled\": false, \"nmne\": {}}, \"10\": {\"uuid\": \"deaecc57-ec76-4e27-a37e-f66964901b03\", \"mac_address\": \"51:26:00:c6:7e:ac\", \"speed\": 100, \"mtu\": 1500, \"enabled\": false, \"nmne\": {}}, \"11\": {\"uuid\": \"53fe318c-4969-42fe-920b-37a491f54d84\", \"mac_address\": \"35:59:c7:13:ab:a5\", \"speed\": 100, \"mtu\": 1500, \"enabled\": false, \"nmne\": {}}, \"12\": {\"uuid\": \"5a81caa0-9d91-4a86-9bd4-4ecb589c70ae\", \"mac_address\": \"7a:6b:ec:15:1e:de\", \"speed\": 100, \"mtu\": 1500, \"enabled\": false, \"nmne\": {}}}, \"num_ports\": 12, \"mac_address_table\": {}}}, \"links\": {\"primaite_pc:eth-2<->switch1:eth-1\": {\"uuid\": \"3d053257-7473-4a66-afbc-ee33a18f2e39\", \"endpoint_a\": \"e0fbda66-afcb-4a79-b696-aad0778279a2\", \"endpoint_b\": \"7ebc80f5-902f-4253-8ea6-0cafa3d1cccd\", \"bandwidth\": 100.0, \"current_load\": 0.0, \"hostname_a\": \"primaite_pc\", \"hostname_b\": \"switch1\", \"port_a\": 2, \"port_b\": 1}, \"google_server:eth-2<->switch1:eth-2\": {\"uuid\": \"42b8f911-3640-4ccb-b277-b48b294a1fc8\", \"endpoint_a\": \"53993d8f-216e-4c00-9b03-c6bb9e2437b5\", \"endpoint_b\": \"c03d4d22-f309-49b6-a1ad-45a04c40d25e\", \"bandwidth\": 100.0, \"current_load\": 0.0, \"hostname_a\": \"google_server\", \"hostname_b\": \"switch1\", \"port_a\": 2, \"port_b\": 2}}}, \"domain\": {\"uuid\": \"f0629156-e9af-493d-b098-f47d73126122\", \"accounts\": {\"admin\": {\"uuid\": \"b76653a9-d40e-483b-85a3-1b44628a11d0\", \"num_logons\": 0, \"num_logoffs\": 0, \"num_group_changes\": 0, \"username\": \"admin\", \"password\": \"admin12\", \"account_type\": 2, \"enabled\": true}}}}'" + ] + }, + "execution_count": 134, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ "import json\n", "json.dumps(my_sim.describe_state())" @@ -257,7 +795,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.10.12" + "version": "3.10.11" }, "orig_nbformat": 4 }, diff --git a/src/primaite/simulator/_package_data/network_simulator_demo.ipynb b/src/primaite/simulator/_package_data/network_simulator_demo.ipynb index b537f54b..47703c9c 100644 --- a/src/primaite/simulator/_package_data/network_simulator_demo.ipynb +++ b/src/primaite/simulator/_package_data/network_simulator_demo.ipynb @@ -59,7 +59,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 1, "id": "de57ac8c-5b28-4847-a759-2ceaf5593329", "metadata": { "tags": [] @@ -71,7 +71,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 2, "id": "a1e2e4df-67c0-4584-ab27-47e2c7c7fcd2", "metadata": { "tags": [] @@ -91,12 +91,70 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 3, "id": "cc199741-ef2e-47f5-b2f0-e20049ccf40f", "metadata": { "tags": [] }, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "+------------------------------------------------+\n", + "| Nodes |\n", + "+-------------------+----------+-----------------+\n", + "| Node | Type | Operating State |\n", + "+-------------------+----------+-----------------+\n", + "| router_1 | Router | ON |\n", + "| switch_1 | Switch | ON |\n", + "| switch_2 | Switch | ON |\n", + "| domain_controller | Server | ON |\n", + "| database_server | Server | ON |\n", + "| web_server | Server | ON |\n", + "| backup_server | Server | ON |\n", + "| security_suite | Server | ON |\n", + "| client_1 | Computer | ON |\n", + "| client_2 | Computer | ON |\n", + "+-------------------+----------+-----------------+\n", + "+-----------------------------------------------------------------------------+\n", + "| IP Addresses |\n", + "+-------------------+------+----------------+---------------+-----------------+\n", + "| Node | Port | IP Address | Subnet Mask | Default Gateway |\n", + "+-------------------+------+----------------+---------------+-----------------+\n", + "| router_1 | 1 | 192.168.1.1 | 255.255.255.0 | None |\n", + "| router_1 | 2 | 192.168.10.1 | 255.255.255.0 | None |\n", + "| router_1 | 3 | 127.0.0.1 | 255.0.0.0 | None |\n", + "| router_1 | 4 | 127.0.0.1 | 255.0.0.0 | None |\n", + "| router_1 | 5 | 127.0.0.1 | 255.0.0.0 | None |\n", + "| domain_controller | 1 | 192.168.1.10 | 255.255.255.0 | 192.168.1.1 |\n", + "| database_server | 1 | 192.168.1.14 | 255.255.255.0 | 192.168.1.1 |\n", + "| web_server | 1 | 192.168.1.12 | 255.255.255.0 | 192.168.1.1 |\n", + "| backup_server | 1 | 192.168.1.16 | 255.255.255.0 | 192.168.1.1 |\n", + "| security_suite | 1 | 192.168.1.110 | 255.255.255.0 | 192.168.1.1 |\n", + "| security_suite | 2 | 192.168.10.110 | 255.255.255.0 | 192.168.1.1 |\n", + "| client_1 | 1 | 192.168.10.21 | 255.255.255.0 | 192.168.10.1 |\n", + "| client_2 | 1 | 192.168.10.22 | 255.255.255.0 | 192.168.10.1 |\n", + "+-------------------+------+----------------+---------------+-----------------+\n", + "+---------------------------------------------------------------------------------------------------------------------------------------------------------------+\n", + "| Links |\n", + "+------------+----------------------------------------+-------------------+------------------------------------------+-------+-------------------+--------------+\n", + "| Endpoint A | A Port | Endpoint B | B Port | is Up | Bandwidth (MBits) | Current Load |\n", + "+------------+----------------------------------------+-------------------+------------------------------------------+-------+-------------------+--------------+\n", + "| router_1 | Port 2: eb:31:e8:11:28:ac/192.168.10.1 | switch_2 | Port 8: d3:59:e2:73:4e:b8 | True | 100.0 | 0.00006% |\n", + "| router_1 | Port 1: 3f:c3:3d:00:74:c4/192.168.1.1 | switch_1 | Port 8: a9:ea:54:9f:35:f8 | True | 100.0 | 0.00018% |\n", + "| switch_1 | Port 7: 63:ea:45:e6:f4:22 | security_suite | Port 1: 18:9d:a1:f0:6f:0b/192.168.1.110 | True | 100.0 | 0.00003% |\n", + "| switch_1 | Port 4: 08:0e:a9:03:d7:3c | backup_server | Port 1: c3:e5:81:c9:8b:74/192.168.1.16 | True | 100.0 | 0.00003% |\n", + "| switch_1 | Port 2: 75:c5:30:0f:5d:92 | web_server | Port 1: 90:94:52:a6:1f:c5/192.168.1.12 | True | 100.0 | 0.00015% |\n", + "| switch_1 | Port 3: f1:62:75:5d:d9:59 | database_server | Port 1: 2e:e8:cb:a5:97:12/192.168.1.14 | True | 100.0 | 0.00017% |\n", + "| switch_1 | Port 1: 08:79:a7:3f:b5:96 | domain_controller | Port 1: 00:c3:ff:62:87:8f/192.168.1.10 | True | 100.0 | 0.00003% |\n", + "| switch_2 | Port 7: 88:9c:57:5c:53:5e | security_suite | Port 2: 9e:b2:c8:04:d8:97/192.168.10.110 | True | 100.0 | 0.00000% |\n", + "| switch_2 | Port 2: a8:1b:b2:78:12:34 | client_2 | Port 1: 6a:b1:ff:36:ef:40/192.168.10.22 | True | 100.0 | 0.00003% |\n", + "| switch_2 | Port 1: 42:08:3f:1e:ea:dd | client_1 | Port 1: f6:6d:35:8a:67:d8/192.168.10.21 | True | 100.0 | 0.00003% |\n", + "+------------+----------------------------------------+-------------------+------------------------------------------+-------+-------------------+--------------+\n" + ] + } + ], "source": [ "network.show()" ] @@ -133,12 +191,30 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 4, "id": "e76d1854-961e-438c-b40f-77fd9c3abe38", "metadata": { "tags": [] }, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "+---------------------------------------------------------------+\n", + "| router_1 Network Interfaces |\n", + "+------+-------------------+-----------------+-------+----------+\n", + "| Port | MAC Address | Address | Speed | Status |\n", + "+------+-------------------+-----------------+-------+----------+\n", + "| 1 | 3f:c3:3d:00:74:c4 | 192.168.1.1/24 | 100 | Enabled |\n", + "| 2 | eb:31:e8:11:28:ac | 192.168.10.1/24 | 100 | Enabled |\n", + "| 3 | 7b:4f:23:8d:b5:18 | 127.0.0.1/8 | 100 | Disabled |\n", + "| 4 | cd:89:ba:42:ee:04 | 127.0.0.1/8 | 100 | Disabled |\n", + "| 5 | 8d:92:27:76:79:c5 | 127.0.0.1/8 | 100 | Disabled |\n", + "+------+-------------------+-----------------+-------+----------+\n" + ] + } + ], "source": [ "network.get_node_by_hostname(\"router_1\").show()" ] @@ -153,12 +229,32 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 5, "id": "92de8b42-92d7-4934-9c12-50bf724c9eb2", "metadata": { "tags": [] }, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "+-------------------------------------------------------+\n", + "| router_1 ARP Cache |\n", + "+---------------+-------------------+-------------------+\n", + "| IP Address | MAC Address | Via |\n", + "+---------------+-------------------+-------------------+\n", + "| 192.168.10.21 | f6:6d:35:8a:67:d8 | eb:31:e8:11:28:ac |\n", + "| 192.168.10.22 | 6a:b1:ff:36:ef:40 | eb:31:e8:11:28:ac |\n", + "| 192.168.1.10 | 00:c3:ff:62:87:8f | 3f:c3:3d:00:74:c4 |\n", + "| 192.168.1.14 | 2e:e8:cb:a5:97:12 | 3f:c3:3d:00:74:c4 |\n", + "| 192.168.1.12 | 90:94:52:a6:1f:c5 | 3f:c3:3d:00:74:c4 |\n", + "| 192.168.1.16 | c3:e5:81:c9:8b:74 | 3f:c3:3d:00:74:c4 |\n", + "| 192.168.1.110 | 18:9d:a1:f0:6f:0b | 3f:c3:3d:00:74:c4 |\n", + "+---------------+-------------------+-------------------+\n" + ] + } + ], "source": [ "network.get_node_by_hostname(\"router_1\").arp.show()" ] @@ -173,12 +269,32 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 6, "id": "5922282a-d22b-4e55-9176-f3f3654c849f", "metadata": { "tags": [] }, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "+---------------------------------------------------------------------------------------------------------------------------------------+\n", + "| router_1 Access Control List |\n", + "+-------+--------+----------+--------+--------------+------------------------+--------+--------------+------------------------+---------+\n", + "| Index | Action | Protocol | Src IP | Src Wildcard | Src Port | Dst IP | Dst Wildcard | Dst Port | Matched |\n", + "+-------+--------+----------+--------+--------------+------------------------+--------+--------------+------------------------+---------+\n", + "| 0 | PERMIT | ANY | ANY | ANY | 5432 (POSTGRES_SERVER) | ANY | ANY | 5432 (POSTGRES_SERVER) | 0 |\n", + "| 1 | PERMIT | ANY | ANY | ANY | 53 (DNS) | ANY | ANY | 53 (DNS) | 0 |\n", + "| 2 | PERMIT | ANY | ANY | ANY | 21 (FTP) | ANY | ANY | 21 (FTP) | 0 |\n", + "| 3 | PERMIT | ANY | ANY | ANY | 80 (HTTP) | ANY | ANY | 80 (HTTP) | 0 |\n", + "| 22 | PERMIT | ANY | ANY | ANY | 219 (ARP) | ANY | ANY | 219 (ARP) | 0 |\n", + "| 23 | PERMIT | ICMP | ANY | ANY | ANY | ANY | ANY | ANY | 0 |\n", + "| 24 | DENY | ANY | ANY | ANY | ANY | ANY | ANY | ANY | 0 |\n", + "+-------+--------+----------+--------+--------------+------------------------+--------+--------------+------------------------+---------+\n" + ] + } + ], "source": [ "network.get_node_by_hostname(\"router_1\").acl.show()" ] @@ -193,12 +309,25 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 7, "id": "327203be-f475-4727-82a1-e992d3b70ed8", "metadata": { "tags": [] }, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "+-------------------------------------+\n", + "| router_1 Route Table |\n", + "+-------+---------+----------+--------+\n", + "| Index | Address | Next Hop | Metric |\n", + "+-------+---------+----------+--------+\n", + "+-------+---------+----------+--------+\n" + ] + } + ], "source": [ "network.get_node_by_hostname(\"router_1\").route_table.show()" ] @@ -213,12 +342,25 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 8, "id": "3d0aa004-b10c-445f-aaab-340e0e716c74", "metadata": { "tags": [] }, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "+-----------------------------+\n", + "| router_1 Sys Log |\n", + "+-----------+-------+---------+\n", + "| Timestamp | Level | Message |\n", + "+-----------+-------+---------+\n", + "+-----------+-------+---------+\n" + ] + } + ], "source": [ "network.get_node_by_hostname(\"router_1\").sys_log.show(last_n=10)" ] @@ -238,17 +380,52 @@ "id": "4879394d-2981-40de-a229-e19b09a34e6e", "metadata": {}, "source": [ - "Calling `switch.show()` displays the Switch orts on the Switch." + "Calling `switch.show()` displays the Switch ports on the Switch." ] }, { "cell_type": "code", - "execution_count": null, + "execution_count": 30, "id": "e7fd439b-5442-4e9d-9e7d-86dacb77f458", "metadata": { "tags": [] }, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "+---------------------------------------------+\n", + "| switch_1 Switch Ports |\n", + "+------+-------------------+-------+----------+\n", + "| Port | MAC Address | Speed | Status |\n", + "+------+-------------------+-------+----------+\n", + "| 1 | 08:79:a7:3f:b5:96 | 100 | Enabled |\n", + "| 2 | 75:c5:30:0f:5d:92 | 100 | Enabled |\n", + "| 3 | f1:62:75:5d:d9:59 | 100 | Enabled |\n", + "| 4 | 08:0e:a9:03:d7:3c | 100 | Enabled |\n", + "| 5 | ae:40:29:58:c7:95 | 100 | Disabled |\n", + "| 6 | 7d:54:38:7f:79:e8 | 100 | Disabled |\n", + "| 7 | 63:ea:45:e6:f4:22 | 100 | Enabled |\n", + "| 8 | a9:ea:54:9f:35:f8 | 100 | Enabled |\n", + "+------+-------------------+-------+----------+\n", + "+---------------------------------------------+\n", + "| switch_2 Switch Ports |\n", + "+------+-------------------+-------+----------+\n", + "| Port | MAC Address | Speed | Status |\n", + "+------+-------------------+-------+----------+\n", + "| 1 | 42:08:3f:1e:ea:dd | 100 | Enabled |\n", + "| 2 | a8:1b:b2:78:12:34 | 100 | Enabled |\n", + "| 3 | 43:e4:54:fe:e7:1f | 100 | Disabled |\n", + "| 4 | 24:bf:74:7c:c4:11 | 100 | Disabled |\n", + "| 5 | 4b:57:f7:46:c9:4f | 100 | Disabled |\n", + "| 6 | 10:03:9d:39:0c:81 | 100 | Disabled |\n", + "| 7 | 88:9c:57:5c:53:5e | 100 | Enabled |\n", + "| 8 | d3:59:e2:73:4e:b8 | 100 | Enabled |\n", + "+------+-------------------+-------+----------+\n" + ] + } + ], "source": [ "network.get_node_by_hostname(\"switch_1\").show()" ] @@ -265,14 +442,28 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 10, "id": "d06e1310-4a77-4315-a59f-cb1b49ca2352", "metadata": { "tags": [] }, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "+--------------------------------+\n", + "| switch_1 ARP Cache |\n", + "+------------+-------------+-----+\n", + "| IP Address | MAC Address | Via |\n", + "+------------+-------------+-----+\n", + "+------------+-------------+-----+\n" + ] + } + ], "source": [ - "network.get_node_by_hostname(\"switch_1\").arp.show()" + "network.get_node_by_hostname(\"switch_1\").arp.show()\n", + "#network.get_node_by_hostname(\"switch_1\").software_manager" ] }, { @@ -285,12 +476,25 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 11, "id": "a0d984b7-a7c1-4bbd-aa5a-9d3caecb08dc", "metadata": { "tags": [] }, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "+-----------------------------+\n", + "| switch_1 Sys Log |\n", + "+-----------+-------+---------+\n", + "| Timestamp | Level | Message |\n", + "+-----------+-------+---------+\n", + "+-----------+-------+---------+\n" + ] + } + ], "source": [ "network.get_node_by_hostname(\"switch_1\").sys_log.show()" ] @@ -317,12 +521,38 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 12, "id": "656c37f6-b145-42af-9714-8d2886d0eff8", "metadata": { "tags": [] }, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "+-----------------------------------------------------------------------+\n", + "| security_suite Network Interface Cards |\n", + "+------+------+-------------------+-------------------+-------+---------+\n", + "| Port | Type | MAC Address | Address | Speed | Status |\n", + "+------+------+-------------------+-------------------+-------+---------+\n", + "| 1 | NIC | 18:9d:a1:f0:6f:0b | 192.168.1.110/24 | 100 | Enabled |\n", + "| 2 | NIC | 9e:b2:c8:04:d8:97 | 192.168.10.110/24 | 100 | Enabled |\n", + "+------+------+-------------------+-------------------+-------+---------+\n", + "+---------------------------+\n", + "| security_suite Open Ports |\n", + "+-------------+-------------+\n", + "| Port | Name |\n", + "+-------------+-------------+\n", + "| 21 | FTP |\n", + "| 53 | DNS |\n", + "| 80 | HTTP |\n", + "| 123 | NTP |\n", + "| 219 | ARP |\n", + "+-------------+-------------+\n" + ] + } + ], "source": [ "network.get_node_by_hostname(\"security_suite\").show()" ] @@ -337,12 +567,26 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 13, "id": "66b267d6-2308-486a-b9aa-cb8d3bcf0753", "metadata": { "tags": [] }, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "+-----------------------------------------------------+\n", + "| security_suite ARP Cache |\n", + "+-------------+-------------------+-------------------+\n", + "| IP Address | MAC Address | Via |\n", + "+-------------+-------------------+-------------------+\n", + "| 192.168.1.1 | 3f:c3:3d:00:74:c4 | 18:9d:a1:f0:6f:0b |\n", + "+-------------+-------------------+-------------------+\n" + ] + } + ], "source": [ "network.get_node_by_hostname(\"security_suite\").arp.show()" ] @@ -357,12 +601,25 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 14, "id": "1b5debe8-ef1b-445d-8fa9-6a45568f21f3", "metadata": { "tags": [] }, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "+-----------------------------+\n", + "| security_suite Sys Log |\n", + "+-----------+-------+---------+\n", + "| Timestamp | Level | Message |\n", + "+-----------+-------+---------+\n", + "+-----------+-------+---------+\n" + ] + } + ], "source": [ "network.get_node_by_hostname(\"security_suite\").sys_log.show()" ] @@ -379,12 +636,38 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 15, "id": "495b7de4-b6ce-41a6-9114-f74752ab4491", "metadata": { "tags": [] }, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "+-----------------------------------------------------------------------------+\n", + "| IP Addresses |\n", + "+-------------------+------+----------------+---------------+-----------------+\n", + "| Node | Port | IP Address | Subnet Mask | Default Gateway |\n", + "+-------------------+------+----------------+---------------+-----------------+\n", + "| router_1 | 1 | 192.168.1.1 | 255.255.255.0 | None |\n", + "| router_1 | 2 | 192.168.10.1 | 255.255.255.0 | None |\n", + "| router_1 | 3 | 127.0.0.1 | 255.0.0.0 | None |\n", + "| router_1 | 4 | 127.0.0.1 | 255.0.0.0 | None |\n", + "| router_1 | 5 | 127.0.0.1 | 255.0.0.0 | None |\n", + "| domain_controller | 1 | 192.168.1.10 | 255.255.255.0 | 192.168.1.1 |\n", + "| database_server | 1 | 192.168.1.14 | 255.255.255.0 | 192.168.1.1 |\n", + "| web_server | 1 | 192.168.1.12 | 255.255.255.0 | 192.168.1.1 |\n", + "| backup_server | 1 | 192.168.1.16 | 255.255.255.0 | 192.168.1.1 |\n", + "| security_suite | 1 | 192.168.1.110 | 255.255.255.0 | 192.168.1.1 |\n", + "| security_suite | 2 | 192.168.10.110 | 255.255.255.0 | 192.168.1.1 |\n", + "| client_1 | 1 | 192.168.10.21 | 255.255.255.0 | 192.168.10.1 |\n", + "| client_2 | 1 | 192.168.10.22 | 255.255.255.0 | 192.168.10.1 |\n", + "+-------------------+------+----------------+---------------+-----------------+\n" + ] + } + ], "source": [ "network.show(nodes=False, links=False)" ] @@ -399,24 +682,60 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 16, "id": "a38abb71-994e-49e8-8f51-e9a550e95b99", "metadata": { "tags": [] }, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Pinging 192.168.10.1:\n", + "Reply from 192.168.10.1: bytes=32, time=<1ms, TTL=62\n", + "Reply from 192.168.10.1: bytes=32, time=<1ms, TTL=62\n", + "Reply from 192.168.10.1: bytes=32, time=<1ms, TTL=62\n", + "Reply from 192.168.10.1: bytes=32, time=<1ms, TTL=62\n", + "Ping statistics for 192.168.10.1: Packets: Sent = 4, Received = 4, Lost = 0 (0.0% loss)\n" + ] + }, + { + "data": { + "text/plain": [ + "True" + ] + }, + "execution_count": 16, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ "network.get_node_by_hostname(\"client_1\").ping(\"192.168.10.1\")" ] }, { "cell_type": "code", - "execution_count": null, + "execution_count": 17, "id": "8388e1e9-30e3-4534-8e5a-c6e9144149d2", "metadata": { "tags": [] }, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "+-----------------------------+\n", + "| client_1 Sys Log |\n", + "+-----------+-------+---------+\n", + "| Timestamp | Level | Message |\n", + "+-----------+-------+---------+\n", + "+-----------+-------+---------+\n" + ] + } + ], "source": [ "network.get_node_by_hostname(\"client_1\").sys_log.show(15)" ] @@ -431,12 +750,35 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 18, "id": "ff8e976a-c16b-470c-8923-325713a30d6c", "metadata": { "tags": [] }, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Pinging 192.168.1.1:\n", + "Reply from 192.168.10.1: bytes=32, time=<1ms, TTL=62\n", + "Reply from 192.168.10.1: bytes=32, time=<1ms, TTL=62\n", + "Reply from 192.168.10.1: bytes=32, time=<1ms, TTL=62\n", + "Reply from 192.168.10.1: bytes=32, time=<1ms, TTL=62\n", + "Ping statistics for 192.168.1.1: Packets: Sent = 4, Received = 4, Lost = 0 (0.0% loss)\n" + ] + }, + { + "data": { + "text/plain": [ + "True" + ] + }, + "execution_count": 18, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ "network.get_node_by_hostname(\"client_1\").ping(\"192.168.1.1\")" ] @@ -451,12 +793,35 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 19, "id": "c4163f8d-6a72-410c-9f5c-4f881b7de45e", "metadata": { "tags": [] }, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Pinging 192.168.1.12:\n", + "Reply from 192.168.1.12: bytes=32, time=<1ms, TTL=59\n", + "Reply from 192.168.1.12: bytes=32, time=<1ms, TTL=59\n", + "Reply from 192.168.1.12: bytes=32, time=<1ms, TTL=59\n", + "Reply from 192.168.1.12: bytes=32, time=<1ms, TTL=59\n", + "Ping statistics for 192.168.1.12: Packets: Sent = 4, Received = 4, Lost = 0 (0.0% loss)\n" + ] + }, + { + "data": { + "text/plain": [ + "True" + ] + }, + "execution_count": 19, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ "network.get_node_by_hostname(\"client_1\").ping(\"192.168.1.12\")" ] @@ -471,12 +836,25 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 20, "id": "e79a523a-5780-45b6-8798-c434e0e522bd", "metadata": { "tags": [] }, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "+-----------------------------+\n", + "| web_server Sys Log |\n", + "+-----------+-------+---------+\n", + "| Timestamp | Level | Message |\n", + "+-----------+-------+---------+\n", + "+-----------+-------+---------+\n" + ] + } + ], "source": [ "network.get_node_by_hostname(\"web_server\").sys_log.show()" ] @@ -501,12 +879,35 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 21, "id": "603cf913-e261-49da-a7dd-85e1bb6dec56", "metadata": { "tags": [] }, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Pinging 192.168.1.12:\n", + "Reply from 192.168.1.12: bytes=32, time=<1ms, TTL=59\n", + "Reply from 192.168.1.12: bytes=32, time=<1ms, TTL=59\n", + "Reply from 192.168.1.12: bytes=32, time=<1ms, TTL=59\n", + "Reply from 192.168.1.12: bytes=32, time=<1ms, TTL=59\n", + "Ping statistics for 192.168.1.12: Packets: Sent = 4, Received = 4, Lost = 0 (0.0% loss)\n" + ] + }, + { + "data": { + "text/plain": [ + "True" + ] + }, + "execution_count": 21, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ "network.get_node_by_hostname(\"client_2\").ping(\"192.168.1.12\")" ] @@ -521,12 +922,25 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 22, "id": "e047de00-3de4-4823-b26a-2c8d64c7a663", "metadata": { "tags": [] }, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "+-----------------------------+\n", + "| client_2 Sys Log |\n", + "+-----------+-------+---------+\n", + "| Timestamp | Level | Message |\n", + "+-----------+-------+---------+\n", + "+-----------+-------+---------+\n" + ] + } + ], "source": [ "network.get_node_by_hostname(\"client_2\").sys_log.show()" ] @@ -541,16 +955,27 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 23, "id": "6db355ae-b99a-441b-a2c4-4ffe78f46bff", "metadata": { "tags": [] }, - "outputs": [], + "outputs": [ + { + "data": { + "text/plain": [ + "True" + ] + }, + "execution_count": 23, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ "from primaite.simulator.network.transmission.network_layer import IPProtocol\n", "from primaite.simulator.network.transmission.transport_layer import Port\n", - "from primaite.simulator.network.hardware.nodes.router import ACLAction\n", + "from primaite.simulator.network.hardware.nodes.network.router import ACLAction\n", "network.get_node_by_hostname(\"router_1\").acl.add_rule(\n", " action=ACLAction.DENY,\n", " protocol=IPProtocol.ICMP,\n", @@ -561,12 +986,32 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 24, "id": "a345e000-8842-4827-af96-adc0fbe390fb", "metadata": { "tags": [] }, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "+----------------------------------------------------------------------------------------------------------------------------------------------+\n", + "| router_1 Access Control List |\n", + "+-------+--------+----------+---------------+--------------+------------------------+--------+--------------+------------------------+---------+\n", + "| Index | Action | Protocol | Src IP | Src Wildcard | Src Port | Dst IP | Dst Wildcard | Dst Port | Matched |\n", + "+-------+--------+----------+---------------+--------------+------------------------+--------+--------------+------------------------+---------+\n", + "| 0 | PERMIT | ANY | ANY | ANY | 5432 (POSTGRES_SERVER) | ANY | ANY | 5432 (POSTGRES_SERVER) | 0 |\n", + "| 1 | DENY | ICMP | 192.168.10.22 | ANY | ANY | ANY | ANY | ANY | 0 |\n", + "| 2 | PERMIT | ANY | ANY | ANY | 21 (FTP) | ANY | ANY | 21 (FTP) | 0 |\n", + "| 3 | PERMIT | ANY | ANY | ANY | 80 (HTTP) | ANY | ANY | 80 (HTTP) | 0 |\n", + "| 22 | PERMIT | ANY | ANY | ANY | 219 (ARP) | ANY | ANY | 219 (ARP) | 0 |\n", + "| 23 | PERMIT | ICMP | ANY | ANY | ANY | ANY | ANY | ANY | 24 |\n", + "| 24 | DENY | ANY | ANY | ANY | ANY | ANY | ANY | ANY | 0 |\n", + "+-------+--------+----------+---------------+--------------+------------------------+--------+--------------+------------------------+---------+\n" + ] + } + ], "source": [ "network.get_node_by_hostname(\"router_1\").acl.show()" ] @@ -581,12 +1026,31 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 25, "id": "a4f4ff31-590f-40fb-b13d-efaa8c2720b6", "metadata": { "tags": [] }, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Pinging 192.168.1.12:\n", + "Ping statistics for 192.168.1.12: Packets: Sent = 4, Received = 0, Lost = 4 (100.0% loss)\n" + ] + }, + { + "data": { + "text/plain": [ + "False" + ] + }, + "execution_count": 25, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ "network.get_node_by_hostname(\"client_2\").ping(\"192.168.1.12\")" ] @@ -601,12 +1065,25 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 26, "id": "f62b8a4e-fd3b-4059-b108-3d4a0b18f2a0", "metadata": { "tags": [] }, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "+-----------------------------+\n", + "| client_2 Sys Log |\n", + "+-----------+-------+---------+\n", + "| Timestamp | Level | Message |\n", + "+-----------+-------+---------+\n", + "+-----------+-------+---------+\n" + ] + } + ], "source": [ "network.get_node_by_hostname(\"client_2\").sys_log.show()" ] @@ -621,12 +1098,25 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 27, "id": "7e53d776-99da-4d2c-a2a7-bd7ce27bff4c", "metadata": { "tags": [] }, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "+-----------------------------+\n", + "| router_1 Sys Log |\n", + "+-----------+-------+---------+\n", + "| Timestamp | Level | Message |\n", + "+-----------+-------+---------+\n", + "+-----------+-------+---------+\n" + ] + } + ], "source": [ "network.get_node_by_hostname(\"router_1\").sys_log.show()" ] @@ -641,24 +1131,60 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 28, "id": "d542734b-7582-4af7-8254-bda3de50d091", "metadata": { "tags": [] }, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Pinging 192.168.1.12:\n", + "Reply from 192.168.1.12: bytes=32, time=<1ms, TTL=59\n", + "Reply from 192.168.1.12: bytes=32, time=<1ms, TTL=59\n", + "Reply from 192.168.1.12: bytes=32, time=<1ms, TTL=59\n", + "Reply from 192.168.1.12: bytes=32, time=<1ms, TTL=59\n", + "Ping statistics for 192.168.1.12: Packets: Sent = 4, Received = 4, Lost = 0 (0.0% loss)\n" + ] + }, + { + "data": { + "text/plain": [ + "True" + ] + }, + "execution_count": 28, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ "network.get_node_by_hostname(\"client_1\").ping(\"192.168.1.12\")" ] }, { "cell_type": "code", - "execution_count": null, + "execution_count": 29, "id": "d78e9fe3-02c6-4792-944f-5622e26e0412", "metadata": { "tags": [] }, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "+-----------------------------+\n", + "| client_1 Sys Log |\n", + "+-----------+-------+---------+\n", + "| Timestamp | Level | Message |\n", + "+-----------+-------+---------+\n", + "+-----------+-------+---------+\n" + ] + } + ], "source": [ "network.get_node_by_hostname(\"client_1\").sys_log.show()" ] diff --git a/src/primaite/simulator/network/hardware/nodes/host/host_node.py b/src/primaite/simulator/network/hardware/nodes/host/host_node.py index 31378689..9d08b9f4 100644 --- a/src/primaite/simulator/network/hardware/nodes/host/host_node.py +++ b/src/primaite/simulator/network/hardware/nodes/host/host_node.py @@ -316,6 +316,10 @@ class HostNode(Node): super().__init__(**kwargs) self.connect_nic(NIC(ip_address=ip_address, subnet_mask=subnet_mask)) + @property + def arp(self) -> Optional[ARP]: + return self.software_manager.software.get("ARP") + def _install_system_software(self): """ Installs the system software and network services typically found on an operating system. diff --git a/src/primaite/simulator/network/hardware/nodes/network/network_node.py b/src/primaite/simulator/network/hardware/nodes/network/network_node.py index ebdb6ed8..a3dc3be3 100644 --- a/src/primaite/simulator/network/hardware/nodes/network/network_node.py +++ b/src/primaite/simulator/network/hardware/nodes/network/network_node.py @@ -1,8 +1,9 @@ from abc import abstractmethod +from typing import Optional from primaite.simulator.network.hardware.base import NetworkInterface, Node from primaite.simulator.network.transmission.data_link_layer import Frame - +from primaite.simulator.system.services.arp.arp import ARP class NetworkNode(Node): """ @@ -28,3 +29,7 @@ class NetworkNode(Node): :type from_network_interface: NetworkInterface """ pass + + @property + def arp(self) -> Optional[ARP]: + return self.software_manager.software.get("ARP") diff --git a/src/primaite/simulator/network/hardware/nodes/network/router.py b/src/primaite/simulator/network/hardware/nodes/network/router.py index 1c36c696..426c5415 100644 --- a/src/primaite/simulator/network/hardware/nodes/network/router.py +++ b/src/primaite/simulator/network/hardware/nodes/network/router.py @@ -1215,8 +1215,7 @@ class Router(NetworkNode): icmp: RouterICMP = self.software_manager.icmp # noqa icmp.router = self self.software_manager.install(RouterARP) - arp: RouterARP = self.software_manager.arp # noqa - arp.router = self + self.arp.router = self def _set_default_acl(self): """ From c13d3f191faf9a414f64728fd73fe2bb4d1cb187 Mon Sep 17 00:00:00 2001 From: Charlie Crane Date: Tue, 9 Apr 2024 13:34:57 +0100 Subject: [PATCH 095/124] #2453 - Correcting errors found from pipeline pre-commit checks --- .../create-simulation_demo.ipynb | 240 +++++++++--------- .../network_simulator_demo.ipynb | 170 +++++-------- .../network/hardware/nodes/host/host_node.py | 6 + .../hardware/nodes/network/network_node.py | 6 + 4 files changed, 192 insertions(+), 230 deletions(-) diff --git a/src/primaite/simulator/_package_data/create-simulation_demo.ipynb b/src/primaite/simulator/_package_data/create-simulation_demo.ipynb index 57003e55..5ef31243 100644 --- a/src/primaite/simulator/_package_data/create-simulation_demo.ipynb +++ b/src/primaite/simulator/_package_data/create-simulation_demo.ipynb @@ -18,7 +18,7 @@ }, { "cell_type": "code", - "execution_count": 119, + "execution_count": 1, "metadata": {}, "outputs": [], "source": [ @@ -36,20 +36,20 @@ }, { "cell_type": "code", - "execution_count": 120, + "execution_count": 2, "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "{'uuid': '42d005b2-4dc8-4aec-be54-3493242eee32',\n", - " 'network': {'uuid': '069f61a4-ac40-431f-ad13-2fc9b26dc091',\n", + "{'uuid': '91c88b2a-caf1-47be-a394-d0c22e5110be',\n", + " 'network': {'uuid': 'a9121808-0401-460c-9833-23d4ba91e9bc',\n", " 'nodes': {},\n", " 'links': {}},\n", - " 'domain': {'uuid': 'f0629156-e9af-493d-b098-f47d73126122', 'accounts': {}}}" + " 'domain': {'uuid': '25fbe0e9-76e8-4fd7-ad22-da2d2b5a509d', 'accounts': {}}}" ] }, - "execution_count": 120, + "execution_count": 2, "metadata": {}, "output_type": "execute_result" } @@ -69,7 +69,7 @@ }, { "cell_type": "code", - "execution_count": 121, + "execution_count": 3, "metadata": {}, "outputs": [], "source": [ @@ -79,7 +79,7 @@ }, { "cell_type": "code", - "execution_count": 122, + "execution_count": 4, "metadata": {}, "outputs": [], "source": [ @@ -98,7 +98,7 @@ }, { "cell_type": "code", - "execution_count": 123, + "execution_count": 5, "metadata": {}, "outputs": [], "source": [ @@ -108,16 +108,16 @@ }, { "cell_type": "code", - "execution_count": 124, + "execution_count": 6, "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "Link(uuid='42b8f911-3640-4ccb-b277-b48b294a1fc8', endpoint_a=NIC(ip_address=IPv4Address('130.1.1.2'), subnet_mask=IPv4Address('255.255.255.0'), uuid='53993d8f-216e-4c00-9b03-c6bb9e2437b5', mac_address='17:9d:82:db:ca:c8', speed=100, mtu=1500, enabled=False, port_num=2, port_name=None, pcap=None, nmne={}, wake_on_lan=False, gateway='130.1.1.255'), endpoint_b=SwitchPort(uuid='c03d4d22-f309-49b6-a1ad-45a04c40d25e', mac_address='84:01:f3:bb:47:1c', speed=100, mtu=1500, enabled=False, port_num=2, port_name=None, pcap=None, nmne={}), bandwidth=100.0, current_load=0.0)" + "Link(uuid='2bd19485-0a6b-4878-978b-b082a672d9b9', endpoint_a=NIC(ip_address=IPv4Address('130.1.1.2'), subnet_mask=IPv4Address('255.255.255.0'), uuid='8a628493-83fb-44bf-a1b0-ef19e362ae5f', mac_address='44:89:a5:ce:7f:6f', speed=100, mtu=1500, enabled=False, port_num=2, port_name=None, pcap=None, nmne={}, wake_on_lan=False, gateway='130.1.1.255'), endpoint_b=SwitchPort(uuid='a049bb8f-53d3-4575-b325-dfb55516edcd', mac_address='aa:45:88:e1:13:e5', speed=100, mtu=1500, enabled=False, port_num=2, port_name=None, pcap=None, nmne={}), bandwidth=100.0, current_load=0.0)" ] }, - "execution_count": 124, + "execution_count": 6, "metadata": {}, "output_type": "execute_result" } @@ -145,7 +145,7 @@ }, { "cell_type": "code", - "execution_count": 125, + "execution_count": 7, "metadata": {}, "outputs": [], "source": [ @@ -156,7 +156,7 @@ }, { "cell_type": "code", - "execution_count": 126, + "execution_count": 8, "metadata": {}, "outputs": [], "source": [ @@ -166,16 +166,16 @@ }, { "cell_type": "code", - "execution_count": 127, + "execution_count": 9, "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "File(uuid='24789051-6762-48f4-8a56-c28882374273', name='favicon.ico', health_status=, visible_health_status=, previous_hash=None, revealed_to_red=False, sys_log=, deleted=False, folder_id='7a86576b-607f-468b-826f-4834cf2b3511', folder_name='root', file_type=, sim_size=0, real=False, sim_path=None, sim_root=WindowsPath('C:/Projects/PrimAITE/simulation_output/2024-04-08_12-19-36/google_server/fs'), num_access=0, folder=Folder(uuid='7a86576b-607f-468b-826f-4834cf2b3511', name='root', health_status=, visible_health_status=, previous_hash=None, revealed_to_red=False, sys_log=, deleted=False, files={'24789051-6762-48f4-8a56-c28882374273': File(uuid='24789051-6762-48f4-8a56-c28882374273', name='favicon.ico', health_status=, visible_health_status=, previous_hash=None, revealed_to_red=False, sys_log=, deleted=False, folder_id='7a86576b-607f-468b-826f-4834cf2b3511', folder_name='root', file_type=, sim_size=0, real=False, sim_path=None, sim_root=WindowsPath('C:/Projects/PrimAITE/simulation_output/2024-04-08_12-19-36/google_server/fs'), num_access=0, folder=Folder(uuid='7a86576b-607f-468b-826f-4834cf2b3511', name='root', health_status=, visible_health_status=, previous_hash=None, revealed_to_red=False, sys_log=, deleted=False, files={...}, deleted_files={}, scan_duration=3, scan_countdown=0, red_scan_duration=3, red_scan_countdown=0, restore_duration=3, restore_countdown=0))}, deleted_files={}, scan_duration=3, scan_countdown=0, red_scan_duration=3, red_scan_countdown=0, restore_duration=3, restore_countdown=0))" + "File(uuid='3ceeded4-77b9-4a86-949c-73188d5f4c34', name='favicon.ico', health_status=, visible_health_status=, previous_hash=None, revealed_to_red=False, sys_log=, deleted=False, folder_id='cbbd3631-a915-400d-bc02-f31f72447ce5', folder_name='root', file_type=, sim_size=0, real=False, sim_path=None, sim_root=WindowsPath('C:/Projects/PrimAITE/simulation_output/2024-04-09_13-24-30/google_server/fs'), num_access=0, folder=Folder(uuid='cbbd3631-a915-400d-bc02-f31f72447ce5', name='root', health_status=, visible_health_status=, previous_hash=None, revealed_to_red=False, sys_log=, deleted=False, files={'3ceeded4-77b9-4a86-949c-73188d5f4c34': File(uuid='3ceeded4-77b9-4a86-949c-73188d5f4c34', name='favicon.ico', health_status=, visible_health_status=, previous_hash=None, revealed_to_red=False, sys_log=, deleted=False, folder_id='cbbd3631-a915-400d-bc02-f31f72447ce5', folder_name='root', file_type=, sim_size=0, real=False, sim_path=None, sim_root=WindowsPath('C:/Projects/PrimAITE/simulation_output/2024-04-09_13-24-30/google_server/fs'), num_access=0, folder=Folder(uuid='cbbd3631-a915-400d-bc02-f31f72447ce5', name='root', health_status=, visible_health_status=, previous_hash=None, revealed_to_red=False, sys_log=, deleted=False, files={...}, deleted_files={}, scan_duration=3, scan_countdown=0, red_scan_duration=3, red_scan_countdown=0, restore_duration=3, restore_countdown=0))}, deleted_files={}, scan_duration=3, scan_countdown=0, red_scan_duration=3, red_scan_countdown=0, restore_duration=3, restore_countdown=0))" ] }, - "execution_count": 127, + "execution_count": 9, "metadata": {}, "output_type": "execute_result" } @@ -194,16 +194,16 @@ }, { "cell_type": "code", - "execution_count": 128, + "execution_count": 10, "metadata": {}, "outputs": [], "source": [ + "from pathlib import Path\n", "from primaite.simulator.system.applications.application import Application, ApplicationOperatingState\n", "from primaite.simulator.system.software import SoftwareHealthState, SoftwareCriticality\n", "from primaite.simulator.network.transmission.transport_layer import Port\n", "from primaite.simulator.network.transmission.network_layer import IPProtocol\n", "from primaite.simulator.file_system.file_system import FileSystem\n", - "from pathlib import Path\n", "\n", "# no applications exist yet so we will create our own.\n", "class MSPaint(Application):\n", @@ -213,7 +213,7 @@ }, { "cell_type": "code", - "execution_count": 129, + "execution_count": 11, "metadata": {}, "outputs": [], "source": [ @@ -222,7 +222,7 @@ }, { "cell_type": "code", - "execution_count": 130, + "execution_count": 12, "metadata": {}, "outputs": [], "source": [ @@ -238,7 +238,7 @@ }, { "cell_type": "code", - "execution_count": 131, + "execution_count": 13, "metadata": {}, "outputs": [], "source": [ @@ -247,7 +247,7 @@ }, { "cell_type": "code", - "execution_count": 132, + "execution_count": 14, "metadata": {}, "outputs": [], "source": [ @@ -264,19 +264,19 @@ }, { "cell_type": "code", - "execution_count": 133, + "execution_count": 15, "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "{'uuid': '42d005b2-4dc8-4aec-be54-3493242eee32',\n", - " 'network': {'uuid': '069f61a4-ac40-431f-ad13-2fc9b26dc091',\n", - " 'nodes': {'primaite_pc': {'uuid': '52246eed-9a3f-4b19-ad0c-48fc3bbb998d',\n", + "{'uuid': '91c88b2a-caf1-47be-a394-d0c22e5110be',\n", + " 'network': {'uuid': 'a9121808-0401-460c-9833-23d4ba91e9bc',\n", + " 'nodes': {'primaite_pc': {'uuid': 'dd0e95be-2491-4d5b-8388-df3975a19e8a',\n", " 'hostname': 'primaite_pc',\n", " 'operating_state': 2,\n", - " 'NICs': {1: {'uuid': '73dcb42e-7db4-45cf-b439-9b8066c8e32e',\n", - " 'mac_address': 'c9:84:ec:48:87:77',\n", + " 'NICs': {1: {'uuid': '279e2645-b680-4d2e-b13c-66d5cfacbd38',\n", + " 'mac_address': 'bd:76:20:24:cf:04',\n", " 'speed': 100,\n", " 'mtu': 1500,\n", " 'enabled': False,\n", @@ -284,8 +284,8 @@ " 'ip_address': '192.168.1.10',\n", " 'subnet_mask': '255.255.255.0',\n", " 'wake_on_lan': False},\n", - " 2: {'uuid': 'e0fbda66-afcb-4a79-b696-aad0778279a2',\n", - " 'mac_address': 'cb:66:8b:b2:dc:51',\n", + " 2: {'uuid': '40c0db02-4d14-4826-b49b-e6a521941cec',\n", + " 'mac_address': 'd8:b2:0c:af:3f:83',\n", " 'speed': 100,\n", " 'mtu': 1500,\n", " 'enabled': False,\n", @@ -293,8 +293,8 @@ " 'ip_address': '130.1.1.1',\n", " 'subnet_mask': '255.255.255.0',\n", " 'wake_on_lan': False}},\n", - " 'file_system': {'uuid': '8a857927-dd5e-40e9-86fd-1df8b3a2b463',\n", - " 'folders': {'root': {'uuid': 'acb725c9-461e-40c5-b2c0-ed198865e1f2',\n", + " 'file_system': {'uuid': '91d3aed7-53c6-471f-b903-9889396be280',\n", + " 'folders': {'root': {'uuid': '81bdc04e-9a0d-4306-9a9c-ee926fff6df8',\n", " 'name': 'root',\n", " 'health_status': 1,\n", " 'visible_status': 1,\n", @@ -302,13 +302,13 @@ " 'revealed_to_red': False,\n", " 'files': {},\n", " 'deleted_files': {}},\n", - " 'downloads': {'uuid': '484f7bcf-b8da-4995-8538-82b2a4d059c7',\n", + " 'downloads': {'uuid': '56abdf27-b8d4-42f4-9b09-b7912db1c4f3',\n", " 'name': 'downloads',\n", " 'health_status': 1,\n", " 'visible_status': 1,\n", " 'previous_hash': None,\n", " 'revealed_to_red': False,\n", - " 'files': {'firefox_installer.zip': {'uuid': '5e1e5bec-a984-4ae1-9799-78083bd2e3c2',\n", + " 'files': {'firefox_installer.zip': {'uuid': '02236b61-14bb-46aa-9fd5-7174c0d7d730',\n", " 'name': 'firefox_installer.zip',\n", " 'health_status': 1,\n", " 'visible_status': 1,\n", @@ -321,7 +321,7 @@ " 'deleted_folders': {},\n", " 'num_file_creations': 0,\n", " 'num_file_deletions': 0},\n", - " 'applications': {'WebBrowser': {'uuid': '5987fc38-686d-439f-b513-23166884596e',\n", + " 'applications': {'WebBrowser': {'uuid': 'a6a12776-e307-4d71-9e7a-d9ca97ecd6b0',\n", " 'health_state_actual': 0,\n", " 'health_state_visible': 0,\n", " 'criticality': 1,\n", @@ -338,7 +338,7 @@ " 'num_executions': 0,\n", " 'groups': [],\n", " 'history': []},\n", - " 'mspaint': {'uuid': '88eb36c5-dba4-4f79-ad95-5957f7de3fa2',\n", + " 'mspaint': {'uuid': 'efd34549-cc92-4474-80ab-5fb6c3159ff6',\n", " 'health_state_actual': 1,\n", " 'health_state_visible': 1,\n", " 'criticality': 3,\n", @@ -354,7 +354,7 @@ " 'execution_control_status': 'manual',\n", " 'num_executions': 0,\n", " 'groups': []}},\n", - " 'services': {'ARP': {'uuid': 'e220dde6-88d5-4e24-a2de-5bce0cd4a916',\n", + " 'services': {'ARP': {'uuid': 'e61c25ff-a6c2-4eec-b031-131eaf33490c',\n", " 'health_state_actual': 0,\n", " 'health_state_visible': 0,\n", " 'criticality': 1,\n", @@ -367,7 +367,7 @@ " 'udp': True,\n", " 'port': 219,\n", " 'operating_state': 2},\n", - " 'ICMP': {'uuid': 'ef728c73-97b7-480f-bedb-04dc3d5efd57',\n", + " 'ICMP': {'uuid': '74debeed-b758-41cb-bea2-51ac283e6ae2',\n", " 'health_state_actual': 0,\n", " 'health_state_visible': 0,\n", " 'criticality': 1,\n", @@ -380,7 +380,7 @@ " 'udp': True,\n", " 'port': 0,\n", " 'operating_state': 2},\n", - " 'DNSClient': {'uuid': '30b159f1-a4e8-41f5-923b-c692d104f385',\n", + " 'DNSClient': {'uuid': '6680efc0-e005-41e8-bb49-39a0d9c4b118',\n", " 'health_state_actual': 0,\n", " 'health_state_visible': 0,\n", " 'criticality': 1,\n", @@ -393,7 +393,7 @@ " 'udp': True,\n", " 'port': 53,\n", " 'operating_state': 2},\n", - " 'FTPClient': {'uuid': '5f267d5f-6bb8-4e97-b6b9-855ee2d50c25',\n", + " 'FTPClient': {'uuid': '21b05ac9-e9b4-4c5c-a812-f6748e14d8c3',\n", " 'health_state_actual': 0,\n", " 'health_state_visible': 0,\n", " 'criticality': 1,\n", @@ -406,7 +406,7 @@ " 'udp': True,\n", " 'port': 21,\n", " 'operating_state': 2},\n", - " 'NTPClient': {'uuid': '1ea99f1e-dc04-4548-a384-913851a7e4fd',\n", + " 'NTPClient': {'uuid': '7ab7c911-5037-4e82-b00c-be4f72c13aa7',\n", " 'health_state_actual': 0,\n", " 'health_state_visible': 0,\n", " 'criticality': 1,\n", @@ -421,11 +421,11 @@ " 'operating_state': 2}},\n", " 'process': {},\n", " 'revealed_to_red': False},\n", - " 'google_server': {'uuid': 'b9a41d9c-6642-441b-8049-8302ddafd3b1',\n", + " 'google_server': {'uuid': '42d61d8d-2493-4b8a-944f-7962abc9d20b',\n", " 'hostname': 'google_server',\n", " 'operating_state': 2,\n", - " 'NICs': {1: {'uuid': 'd0736beb-085a-4754-8b44-de73e6a8c80f',\n", - " 'mac_address': '45:27:ed:64:ac:09',\n", + " 'NICs': {1: {'uuid': 'e384a4fc-754f-44a4-9158-c63f72f52f76',\n", + " 'mac_address': 'ea:5d:4f:10:b2:27',\n", " 'speed': 100,\n", " 'mtu': 1500,\n", " 'enabled': False,\n", @@ -433,8 +433,8 @@ " 'ip_address': '192.168.1.11',\n", " 'subnet_mask': '255.255.255.0',\n", " 'wake_on_lan': False},\n", - " 2: {'uuid': '53993d8f-216e-4c00-9b03-c6bb9e2437b5',\n", - " 'mac_address': '17:9d:82:db:ca:c8',\n", + " 2: {'uuid': '8a628493-83fb-44bf-a1b0-ef19e362ae5f',\n", + " 'mac_address': '44:89:a5:ce:7f:6f',\n", " 'speed': 100,\n", " 'mtu': 1500,\n", " 'enabled': False,\n", @@ -442,14 +442,14 @@ " 'ip_address': '130.1.1.2',\n", " 'subnet_mask': '255.255.255.0',\n", " 'wake_on_lan': False}},\n", - " 'file_system': {'uuid': '8d4ded3a-56bb-46f0-ad7f-40d65b523581',\n", - " 'folders': {'root': {'uuid': '7a86576b-607f-468b-826f-4834cf2b3511',\n", + " 'file_system': {'uuid': 'f25cee1f-2ebe-4fd3-8d5c-649b0d342b61',\n", + " 'folders': {'root': {'uuid': 'cbbd3631-a915-400d-bc02-f31f72447ce5',\n", " 'name': 'root',\n", " 'health_status': 1,\n", " 'visible_status': 1,\n", " 'previous_hash': None,\n", " 'revealed_to_red': False,\n", - " 'files': {'favicon.ico': {'uuid': '24789051-6762-48f4-8a56-c28882374273',\n", + " 'files': {'favicon.ico': {'uuid': '3ceeded4-77b9-4a86-949c-73188d5f4c34',\n", " 'name': 'favicon.ico',\n", " 'health_status': 1,\n", " 'visible_status': 1,\n", @@ -459,7 +459,7 @@ " 'file_type': 'UNKNOWN',\n", " 'num_access': 0}},\n", " 'deleted_files': {}},\n", - " 'static': {'uuid': '154b2ad3-e43d-4924-b758-e11db0e176de',\n", + " 'static': {'uuid': 'd8241ce0-f55e-43ec-bd68-741b79a9a565',\n", " 'name': 'static',\n", " 'health_status': 1,\n", " 'visible_status': 1,\n", @@ -470,7 +470,7 @@ " 'deleted_folders': {},\n", " 'num_file_creations': 1,\n", " 'num_file_deletions': 0},\n", - " 'applications': {'WebBrowser': {'uuid': '9b368321-e22d-4e35-9395-80632492c20a',\n", + " 'applications': {'WebBrowser': {'uuid': '957d0049-e703-4882-8e57-b2ab4c79d458',\n", " 'health_state_actual': 0,\n", " 'health_state_visible': 0,\n", " 'criticality': 1,\n", @@ -487,7 +487,7 @@ " 'num_executions': 0,\n", " 'groups': [],\n", " 'history': []}},\n", - " 'services': {'ARP': {'uuid': '30df82c0-5823-4464-8c23-5b99922f98f7',\n", + " 'services': {'ARP': {'uuid': '82ea1bcf-a0fe-418d-873e-5f075ebb4d3b',\n", " 'health_state_actual': 0,\n", " 'health_state_visible': 0,\n", " 'criticality': 1,\n", @@ -500,7 +500,7 @@ " 'udp': True,\n", " 'port': 219,\n", " 'operating_state': 2},\n", - " 'ICMP': {'uuid': '2d02a2de-7ec8-4da1-9538-c85eb397d4e3',\n", + " 'ICMP': {'uuid': 'bc084dc4-0a7d-4954-9e6e-54bed797e837',\n", " 'health_state_actual': 0,\n", " 'health_state_visible': 0,\n", " 'criticality': 1,\n", @@ -513,7 +513,7 @@ " 'udp': True,\n", " 'port': 0,\n", " 'operating_state': 2},\n", - " 'DNSClient': {'uuid': 'db979263-ff81-4a04-95e8-d94442e9ddfa',\n", + " 'DNSClient': {'uuid': '5a9ecc18-71c0-4728-a9c6-e31b33529581',\n", " 'health_state_actual': 0,\n", " 'health_state_visible': 0,\n", " 'criticality': 1,\n", @@ -526,7 +526,7 @@ " 'udp': True,\n", " 'port': 53,\n", " 'operating_state': 2},\n", - " 'FTPClient': {'uuid': 'd9d6417b-d1e0-416b-a711-3478fa248194',\n", + " 'FTPClient': {'uuid': 'f0a411eb-5423-4c98-8689-d94af57deefc',\n", " 'health_state_actual': 0,\n", " 'health_state_visible': 0,\n", " 'criticality': 1,\n", @@ -539,7 +539,7 @@ " 'udp': True,\n", " 'port': 21,\n", " 'operating_state': 2},\n", - " 'NTPClient': {'uuid': 'b23a1032-a817-492b-bdd6-2ecc6fb4591c',\n", + " 'NTPClient': {'uuid': 'd36f2c4f-af30-4618-ae8e-fe68c98e1382',\n", " 'health_state_actual': 0,\n", " 'health_state_visible': 0,\n", " 'criticality': 1,\n", @@ -554,83 +554,83 @@ " 'operating_state': 2}},\n", " 'process': {},\n", " 'revealed_to_red': False},\n", - " 'switch1': {'uuid': 'e658eac3-c4b8-4768-bf27-e2d90b7f57c0',\n", + " 'switch1': {'uuid': 'a9e08b28-d1f4-4c34-b410-71333cd6b42b',\n", " 'hostname': 'switch1',\n", " 'operating_state': 2,\n", - " 'NICs': {1: {'uuid': '7ebc80f5-902f-4253-8ea6-0cafa3d1cccd',\n", - " 'mac_address': 'df:d2:c7:2a:a1:52',\n", + " 'NICs': {1: {'uuid': '3546e960-30f8-49ee-95b9-57570b228333',\n", + " 'mac_address': '8d:d9:3e:f3:a3:ce',\n", " 'speed': 100,\n", " 'mtu': 1500,\n", " 'enabled': False,\n", " 'nmne': {}},\n", - " 2: {'uuid': 'c03d4d22-f309-49b6-a1ad-45a04c40d25e',\n", - " 'mac_address': '84:01:f3:bb:47:1c',\n", + " 2: {'uuid': 'a049bb8f-53d3-4575-b325-dfb55516edcd',\n", + " 'mac_address': 'aa:45:88:e1:13:e5',\n", " 'speed': 100,\n", " 'mtu': 1500,\n", " 'enabled': False,\n", " 'nmne': {}},\n", - " 3: {'uuid': '4207353c-e0cd-456d-89fe-13ddfc605cff',\n", - " 'mac_address': '8b:31:ac:cc:05:c9',\n", + " 3: {'uuid': '179c030c-d8fe-474b-a9d1-6c6bd6e6ca63',\n", + " 'mac_address': '10:d7:bc:39:4d:9d',\n", " 'speed': 100,\n", " 'mtu': 1500,\n", " 'enabled': False,\n", " 'nmne': {}},\n", - " 4: {'uuid': '8aa1395f-e360-48a7-be97-ed1a5ca191ae',\n", - " 'mac_address': '75:3c:ae:bd:3a:b5',\n", + " 4: {'uuid': '56f84a14-0a98-4bc5-983b-31900fc9a2c5',\n", + " 'mac_address': '61:62:18:cf:2a:ea',\n", " 'speed': 100,\n", " 'mtu': 1500,\n", " 'enabled': False,\n", " 'nmne': {}},\n", - " 5: {'uuid': '8b5d575c-ab0c-43ac-abfc-fa5ae75183e5',\n", - " 'mac_address': 'e7:7f:c4:af:8e:5b',\n", + " 5: {'uuid': '0ff4b64e-be4c-473e-8dcd-b7a0078ff890',\n", + " 'mac_address': '21:5e:6b:1b:d0:bf',\n", " 'speed': 100,\n", " 'mtu': 1500,\n", " 'enabled': False,\n", " 'nmne': {}},\n", - " 6: {'uuid': '9d3cd584-f684-4f2e-9c8a-423d859fe3d3',\n", - " 'mac_address': '48:cf:18:8d:92:80',\n", + " 6: {'uuid': '0edf239b-bbb8-4076-ba85-cb07c65722d5',\n", + " 'mac_address': '40:58:ac:11:9c:1a',\n", " 'speed': 100,\n", " 'mtu': 1500,\n", " 'enabled': False,\n", " 'nmne': {}},\n", - " 7: {'uuid': 'd42338bb-d579-483d-9e05-0318e17e574a',\n", - " 'mac_address': 'c6:99:5c:41:13:d7',\n", + " 7: {'uuid': 'a7f578e5-a6f5-4cf8-abca-207e483637c2',\n", + " 'mac_address': 'e0:ef:90:e2:ce:b4',\n", " 'speed': 100,\n", " 'mtu': 1500,\n", " 'enabled': False,\n", " 'nmne': {}},\n", - " 8: {'uuid': '55bbd70b-491d-4452-8326-390ec3fadc28',\n", - " 'mac_address': '81:ab:39:0c:a2:dd',\n", + " 8: {'uuid': 'dc2069dd-ef3c-4e0b-81cb-a73caba917a8',\n", + " 'mac_address': '2c:2a:27:d6:9a:a8',\n", " 'speed': 100,\n", " 'mtu': 1500,\n", " 'enabled': False,\n", " 'nmne': {}},\n", - " 9: {'uuid': '0755d768-79c7-48cf-9220-d2dad32e574b',\n", - " 'mac_address': '62:35:0c:5e:cc:5d',\n", + " 9: {'uuid': 'afbc1a01-efdb-424c-9a7d-b3c3165f6d78',\n", + " 'mac_address': 'e0:f5:79:04:4f:2a',\n", " 'speed': 100,\n", " 'mtu': 1500,\n", " 'enabled': False,\n", " 'nmne': {}},\n", - " 10: {'uuid': 'deaecc57-ec76-4e27-a37e-f66964901b03',\n", - " 'mac_address': '51:26:00:c6:7e:ac',\n", + " 10: {'uuid': 'bdd805f4-a3dc-4a94-ba67-3a62b138f41c',\n", + " 'mac_address': '9a:20:3d:cb:a0:98',\n", " 'speed': 100,\n", " 'mtu': 1500,\n", " 'enabled': False,\n", " 'nmne': {}},\n", - " 11: {'uuid': '53fe318c-4969-42fe-920b-37a491f54d84',\n", - " 'mac_address': '35:59:c7:13:ab:a5',\n", + " 11: {'uuid': '19f6f871-cba9-423a-a1a5-6a0e347e98cb',\n", + " 'mac_address': '69:d9:8c:1d:a9:75',\n", " 'speed': 100,\n", " 'mtu': 1500,\n", " 'enabled': False,\n", " 'nmne': {}},\n", - " 12: {'uuid': '5a81caa0-9d91-4a86-9bd4-4ecb589c70ae',\n", - " 'mac_address': '7a:6b:ec:15:1e:de',\n", + " 12: {'uuid': '5c2aa6f5-12ce-466b-b46b-95ec519a5f47',\n", + " 'mac_address': 'db:7e:8c:91:1b:3f',\n", " 'speed': 100,\n", " 'mtu': 1500,\n", " 'enabled': False,\n", " 'nmne': {}}},\n", - " 'file_system': {'uuid': '289bea1e-69bf-44d5-80fe-212dad8afcd5',\n", - " 'folders': {'root': {'uuid': '3b588b3c-bc4a-4c06-a688-eced0128b128',\n", + " 'file_system': {'uuid': '91dea1d3-3947-49b9-a691-750bc25bbb9c',\n", + " 'folders': {'root': {'uuid': 'b7ebbf43-d86f-43d3-bbc7-f6b197af40b9',\n", " 'name': 'root',\n", " 'health_status': 1,\n", " 'visible_status': 1,\n", @@ -645,100 +645,100 @@ " 'services': {},\n", " 'process': {},\n", " 'revealed_to_red': False,\n", - " 'ports': {1: {'uuid': '7ebc80f5-902f-4253-8ea6-0cafa3d1cccd',\n", - " 'mac_address': 'df:d2:c7:2a:a1:52',\n", + " 'ports': {1: {'uuid': '3546e960-30f8-49ee-95b9-57570b228333',\n", + " 'mac_address': '8d:d9:3e:f3:a3:ce',\n", " 'speed': 100,\n", " 'mtu': 1500,\n", " 'enabled': False,\n", " 'nmne': {}},\n", - " 2: {'uuid': 'c03d4d22-f309-49b6-a1ad-45a04c40d25e',\n", - " 'mac_address': '84:01:f3:bb:47:1c',\n", + " 2: {'uuid': 'a049bb8f-53d3-4575-b325-dfb55516edcd',\n", + " 'mac_address': 'aa:45:88:e1:13:e5',\n", " 'speed': 100,\n", " 'mtu': 1500,\n", " 'enabled': False,\n", " 'nmne': {}},\n", - " 3: {'uuid': '4207353c-e0cd-456d-89fe-13ddfc605cff',\n", - " 'mac_address': '8b:31:ac:cc:05:c9',\n", + " 3: {'uuid': '179c030c-d8fe-474b-a9d1-6c6bd6e6ca63',\n", + " 'mac_address': '10:d7:bc:39:4d:9d',\n", " 'speed': 100,\n", " 'mtu': 1500,\n", " 'enabled': False,\n", " 'nmne': {}},\n", - " 4: {'uuid': '8aa1395f-e360-48a7-be97-ed1a5ca191ae',\n", - " 'mac_address': '75:3c:ae:bd:3a:b5',\n", + " 4: {'uuid': '56f84a14-0a98-4bc5-983b-31900fc9a2c5',\n", + " 'mac_address': '61:62:18:cf:2a:ea',\n", " 'speed': 100,\n", " 'mtu': 1500,\n", " 'enabled': False,\n", " 'nmne': {}},\n", - " 5: {'uuid': '8b5d575c-ab0c-43ac-abfc-fa5ae75183e5',\n", - " 'mac_address': 'e7:7f:c4:af:8e:5b',\n", + " 5: {'uuid': '0ff4b64e-be4c-473e-8dcd-b7a0078ff890',\n", + " 'mac_address': '21:5e:6b:1b:d0:bf',\n", " 'speed': 100,\n", " 'mtu': 1500,\n", " 'enabled': False,\n", " 'nmne': {}},\n", - " 6: {'uuid': '9d3cd584-f684-4f2e-9c8a-423d859fe3d3',\n", - " 'mac_address': '48:cf:18:8d:92:80',\n", + " 6: {'uuid': '0edf239b-bbb8-4076-ba85-cb07c65722d5',\n", + " 'mac_address': '40:58:ac:11:9c:1a',\n", " 'speed': 100,\n", " 'mtu': 1500,\n", " 'enabled': False,\n", " 'nmne': {}},\n", - " 7: {'uuid': 'd42338bb-d579-483d-9e05-0318e17e574a',\n", - " 'mac_address': 'c6:99:5c:41:13:d7',\n", + " 7: {'uuid': 'a7f578e5-a6f5-4cf8-abca-207e483637c2',\n", + " 'mac_address': 'e0:ef:90:e2:ce:b4',\n", " 'speed': 100,\n", " 'mtu': 1500,\n", " 'enabled': False,\n", " 'nmne': {}},\n", - " 8: {'uuid': '55bbd70b-491d-4452-8326-390ec3fadc28',\n", - " 'mac_address': '81:ab:39:0c:a2:dd',\n", + " 8: {'uuid': 'dc2069dd-ef3c-4e0b-81cb-a73caba917a8',\n", + " 'mac_address': '2c:2a:27:d6:9a:a8',\n", " 'speed': 100,\n", " 'mtu': 1500,\n", " 'enabled': False,\n", " 'nmne': {}},\n", - " 9: {'uuid': '0755d768-79c7-48cf-9220-d2dad32e574b',\n", - " 'mac_address': '62:35:0c:5e:cc:5d',\n", + " 9: {'uuid': 'afbc1a01-efdb-424c-9a7d-b3c3165f6d78',\n", + " 'mac_address': 'e0:f5:79:04:4f:2a',\n", " 'speed': 100,\n", " 'mtu': 1500,\n", " 'enabled': False,\n", " 'nmne': {}},\n", - " 10: {'uuid': 'deaecc57-ec76-4e27-a37e-f66964901b03',\n", - " 'mac_address': '51:26:00:c6:7e:ac',\n", + " 10: {'uuid': 'bdd805f4-a3dc-4a94-ba67-3a62b138f41c',\n", + " 'mac_address': '9a:20:3d:cb:a0:98',\n", " 'speed': 100,\n", " 'mtu': 1500,\n", " 'enabled': False,\n", " 'nmne': {}},\n", - " 11: {'uuid': '53fe318c-4969-42fe-920b-37a491f54d84',\n", - " 'mac_address': '35:59:c7:13:ab:a5',\n", + " 11: {'uuid': '19f6f871-cba9-423a-a1a5-6a0e347e98cb',\n", + " 'mac_address': '69:d9:8c:1d:a9:75',\n", " 'speed': 100,\n", " 'mtu': 1500,\n", " 'enabled': False,\n", " 'nmne': {}},\n", - " 12: {'uuid': '5a81caa0-9d91-4a86-9bd4-4ecb589c70ae',\n", - " 'mac_address': '7a:6b:ec:15:1e:de',\n", + " 12: {'uuid': '5c2aa6f5-12ce-466b-b46b-95ec519a5f47',\n", + " 'mac_address': 'db:7e:8c:91:1b:3f',\n", " 'speed': 100,\n", " 'mtu': 1500,\n", " 'enabled': False,\n", " 'nmne': {}}},\n", " 'num_ports': 12,\n", " 'mac_address_table': {}}},\n", - " 'links': {'primaite_pc:eth-2<->switch1:eth-1': {'uuid': '3d053257-7473-4a66-afbc-ee33a18f2e39',\n", - " 'endpoint_a': 'e0fbda66-afcb-4a79-b696-aad0778279a2',\n", - " 'endpoint_b': '7ebc80f5-902f-4253-8ea6-0cafa3d1cccd',\n", + " 'links': {'primaite_pc:eth-2<->switch1:eth-1': {'uuid': '405f3032-6f5d-427f-b42e-5eee4cdc3a7c',\n", + " 'endpoint_a': '40c0db02-4d14-4826-b49b-e6a521941cec',\n", + " 'endpoint_b': '3546e960-30f8-49ee-95b9-57570b228333',\n", " 'bandwidth': 100.0,\n", " 'current_load': 0.0,\n", " 'hostname_a': 'primaite_pc',\n", " 'hostname_b': 'switch1',\n", " 'port_a': 2,\n", " 'port_b': 1},\n", - " 'google_server:eth-2<->switch1:eth-2': {'uuid': '42b8f911-3640-4ccb-b277-b48b294a1fc8',\n", - " 'endpoint_a': '53993d8f-216e-4c00-9b03-c6bb9e2437b5',\n", - " 'endpoint_b': 'c03d4d22-f309-49b6-a1ad-45a04c40d25e',\n", + " 'google_server:eth-2<->switch1:eth-2': {'uuid': '2bd19485-0a6b-4878-978b-b082a672d9b9',\n", + " 'endpoint_a': '8a628493-83fb-44bf-a1b0-ef19e362ae5f',\n", + " 'endpoint_b': 'a049bb8f-53d3-4575-b325-dfb55516edcd',\n", " 'bandwidth': 100.0,\n", " 'current_load': 0.0,\n", " 'hostname_a': 'google_server',\n", " 'hostname_b': 'switch1',\n", " 'port_a': 2,\n", " 'port_b': 2}}},\n", - " 'domain': {'uuid': 'f0629156-e9af-493d-b098-f47d73126122',\n", - " 'accounts': {'admin': {'uuid': 'b76653a9-d40e-483b-85a3-1b44628a11d0',\n", + " 'domain': {'uuid': '25fbe0e9-76e8-4fd7-ad22-da2d2b5a509d',\n", + " 'accounts': {'admin': {'uuid': '78783f13-6149-47b3-9b9d-f98d658bf54a',\n", " 'num_logons': 0,\n", " 'num_logoffs': 0,\n", " 'num_group_changes': 0,\n", @@ -748,7 +748,7 @@ " 'enabled': True}}}}" ] }, - "execution_count": 133, + "execution_count": 15, "metadata": {}, "output_type": "execute_result" } @@ -759,16 +759,16 @@ }, { "cell_type": "code", - "execution_count": 134, + "execution_count": 16, "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "'{\"uuid\": \"42d005b2-4dc8-4aec-be54-3493242eee32\", \"network\": {\"uuid\": \"069f61a4-ac40-431f-ad13-2fc9b26dc091\", \"nodes\": {\"primaite_pc\": {\"uuid\": \"52246eed-9a3f-4b19-ad0c-48fc3bbb998d\", \"hostname\": \"primaite_pc\", \"operating_state\": 2, \"NICs\": {\"1\": {\"uuid\": \"73dcb42e-7db4-45cf-b439-9b8066c8e32e\", \"mac_address\": \"c9:84:ec:48:87:77\", \"speed\": 100, \"mtu\": 1500, \"enabled\": false, \"nmne\": {}, \"ip_address\": \"192.168.1.10\", \"subnet_mask\": \"255.255.255.0\", \"wake_on_lan\": false}, \"2\": {\"uuid\": \"e0fbda66-afcb-4a79-b696-aad0778279a2\", \"mac_address\": \"cb:66:8b:b2:dc:51\", \"speed\": 100, \"mtu\": 1500, \"enabled\": false, \"nmne\": {}, \"ip_address\": \"130.1.1.1\", \"subnet_mask\": \"255.255.255.0\", \"wake_on_lan\": false}}, \"file_system\": {\"uuid\": \"8a857927-dd5e-40e9-86fd-1df8b3a2b463\", \"folders\": {\"root\": {\"uuid\": \"acb725c9-461e-40c5-b2c0-ed198865e1f2\", \"name\": \"root\", \"health_status\": 1, \"visible_status\": 1, \"previous_hash\": null, \"revealed_to_red\": false, \"files\": {}, \"deleted_files\": {}}, \"downloads\": {\"uuid\": \"484f7bcf-b8da-4995-8538-82b2a4d059c7\", \"name\": \"downloads\", \"health_status\": 1, \"visible_status\": 1, \"previous_hash\": null, \"revealed_to_red\": false, \"files\": {\"firefox_installer.zip\": {\"uuid\": \"5e1e5bec-a984-4ae1-9799-78083bd2e3c2\", \"name\": \"firefox_installer.zip\", \"health_status\": 1, \"visible_status\": 1, \"previous_hash\": null, \"revealed_to_red\": false, \"size\": 1024000, \"file_type\": \"ZIP\", \"num_access\": 0}}, \"deleted_files\": {}}}, \"deleted_folders\": {}, \"num_file_creations\": 0, \"num_file_deletions\": 0}, \"applications\": {\"WebBrowser\": {\"uuid\": \"5987fc38-686d-439f-b513-23166884596e\", \"health_state_actual\": 0, \"health_state_visible\": 0, \"criticality\": 1, \"fixing_count\": 0, \"scanning_count\": 0, \"revealed_to_red\": false, \"installing_count\": 0, \"max_sessions\": 100, \"tcp\": true, \"udp\": true, \"port\": 80, \"operating_state\": 2, \"execution_control_status\": \"manual\", \"num_executions\": 0, \"groups\": [], \"history\": []}, \"mspaint\": {\"uuid\": \"88eb36c5-dba4-4f79-ad95-5957f7de3fa2\", \"health_state_actual\": 1, \"health_state_visible\": 1, \"criticality\": 3, \"fixing_count\": 0, \"scanning_count\": 0, \"revealed_to_red\": false, \"installing_count\": 0, \"max_sessions\": 100, \"tcp\": true, \"udp\": true, \"port\": 80, \"operating_state\": 1, \"execution_control_status\": \"manual\", \"num_executions\": 0, \"groups\": []}}, \"services\": {\"ARP\": {\"uuid\": \"e220dde6-88d5-4e24-a2de-5bce0cd4a916\", \"health_state_actual\": 0, \"health_state_visible\": 0, \"criticality\": 1, \"fixing_count\": 0, \"scanning_count\": 0, \"revealed_to_red\": false, \"installing_count\": 0, \"max_sessions\": 100, \"tcp\": true, \"udp\": true, \"port\": 219, \"operating_state\": 2}, \"ICMP\": {\"uuid\": \"ef728c73-97b7-480f-bedb-04dc3d5efd57\", \"health_state_actual\": 0, \"health_state_visible\": 0, \"criticality\": 1, \"fixing_count\": 0, \"scanning_count\": 0, \"revealed_to_red\": false, \"installing_count\": 0, \"max_sessions\": 100, \"tcp\": true, \"udp\": true, \"port\": 0, \"operating_state\": 2}, \"DNSClient\": {\"uuid\": \"30b159f1-a4e8-41f5-923b-c692d104f385\", \"health_state_actual\": 0, \"health_state_visible\": 0, \"criticality\": 1, \"fixing_count\": 0, \"scanning_count\": 0, \"revealed_to_red\": false, \"installing_count\": 0, \"max_sessions\": 100, \"tcp\": true, \"udp\": true, \"port\": 53, \"operating_state\": 2}, \"FTPClient\": {\"uuid\": \"5f267d5f-6bb8-4e97-b6b9-855ee2d50c25\", \"health_state_actual\": 0, \"health_state_visible\": 0, \"criticality\": 1, \"fixing_count\": 0, \"scanning_count\": 0, \"revealed_to_red\": false, \"installing_count\": 0, \"max_sessions\": 100, \"tcp\": true, \"udp\": true, \"port\": 21, \"operating_state\": 2}, \"NTPClient\": {\"uuid\": \"1ea99f1e-dc04-4548-a384-913851a7e4fd\", \"health_state_actual\": 0, \"health_state_visible\": 0, \"criticality\": 1, \"fixing_count\": 0, \"scanning_count\": 0, \"revealed_to_red\": false, \"installing_count\": 0, \"max_sessions\": 100, \"tcp\": true, \"udp\": true, \"port\": 123, \"operating_state\": 2}}, \"process\": {}, \"revealed_to_red\": false}, \"google_server\": {\"uuid\": \"b9a41d9c-6642-441b-8049-8302ddafd3b1\", \"hostname\": \"google_server\", \"operating_state\": 2, \"NICs\": {\"1\": {\"uuid\": \"d0736beb-085a-4754-8b44-de73e6a8c80f\", \"mac_address\": \"45:27:ed:64:ac:09\", \"speed\": 100, \"mtu\": 1500, \"enabled\": false, \"nmne\": {}, \"ip_address\": \"192.168.1.11\", \"subnet_mask\": \"255.255.255.0\", \"wake_on_lan\": false}, \"2\": {\"uuid\": \"53993d8f-216e-4c00-9b03-c6bb9e2437b5\", \"mac_address\": \"17:9d:82:db:ca:c8\", \"speed\": 100, \"mtu\": 1500, \"enabled\": false, \"nmne\": {}, \"ip_address\": \"130.1.1.2\", \"subnet_mask\": \"255.255.255.0\", \"wake_on_lan\": false}}, \"file_system\": {\"uuid\": \"8d4ded3a-56bb-46f0-ad7f-40d65b523581\", \"folders\": {\"root\": {\"uuid\": \"7a86576b-607f-468b-826f-4834cf2b3511\", \"name\": \"root\", \"health_status\": 1, \"visible_status\": 1, \"previous_hash\": null, \"revealed_to_red\": false, \"files\": {\"favicon.ico\": {\"uuid\": \"24789051-6762-48f4-8a56-c28882374273\", \"name\": \"favicon.ico\", \"health_status\": 1, \"visible_status\": 1, \"previous_hash\": null, \"revealed_to_red\": false, \"size\": 0, \"file_type\": \"UNKNOWN\", \"num_access\": 0}}, \"deleted_files\": {}}, \"static\": {\"uuid\": \"154b2ad3-e43d-4924-b758-e11db0e176de\", \"name\": \"static\", \"health_status\": 1, \"visible_status\": 1, \"previous_hash\": null, \"revealed_to_red\": false, \"files\": {}, \"deleted_files\": {}}}, \"deleted_folders\": {}, \"num_file_creations\": 1, \"num_file_deletions\": 0}, \"applications\": {\"WebBrowser\": {\"uuid\": \"9b368321-e22d-4e35-9395-80632492c20a\", \"health_state_actual\": 0, \"health_state_visible\": 0, \"criticality\": 1, \"fixing_count\": 0, \"scanning_count\": 0, \"revealed_to_red\": false, \"installing_count\": 0, \"max_sessions\": 100, \"tcp\": true, \"udp\": true, \"port\": 80, \"operating_state\": 2, \"execution_control_status\": \"manual\", \"num_executions\": 0, \"groups\": [], \"history\": []}}, \"services\": {\"ARP\": {\"uuid\": \"30df82c0-5823-4464-8c23-5b99922f98f7\", \"health_state_actual\": 0, \"health_state_visible\": 0, \"criticality\": 1, \"fixing_count\": 0, \"scanning_count\": 0, \"revealed_to_red\": false, \"installing_count\": 0, \"max_sessions\": 100, \"tcp\": true, \"udp\": true, \"port\": 219, \"operating_state\": 2}, \"ICMP\": {\"uuid\": \"2d02a2de-7ec8-4da1-9538-c85eb397d4e3\", \"health_state_actual\": 0, \"health_state_visible\": 0, \"criticality\": 1, \"fixing_count\": 0, \"scanning_count\": 0, \"revealed_to_red\": false, \"installing_count\": 0, \"max_sessions\": 100, \"tcp\": true, \"udp\": true, \"port\": 0, \"operating_state\": 2}, \"DNSClient\": {\"uuid\": \"db979263-ff81-4a04-95e8-d94442e9ddfa\", \"health_state_actual\": 0, \"health_state_visible\": 0, \"criticality\": 1, \"fixing_count\": 0, \"scanning_count\": 0, \"revealed_to_red\": false, \"installing_count\": 0, \"max_sessions\": 100, \"tcp\": true, \"udp\": true, \"port\": 53, \"operating_state\": 2}, \"FTPClient\": {\"uuid\": \"d9d6417b-d1e0-416b-a711-3478fa248194\", \"health_state_actual\": 0, \"health_state_visible\": 0, \"criticality\": 1, \"fixing_count\": 0, \"scanning_count\": 0, \"revealed_to_red\": false, \"installing_count\": 0, \"max_sessions\": 100, \"tcp\": true, \"udp\": true, \"port\": 21, \"operating_state\": 2}, \"NTPClient\": {\"uuid\": \"b23a1032-a817-492b-bdd6-2ecc6fb4591c\", \"health_state_actual\": 0, \"health_state_visible\": 0, \"criticality\": 1, \"fixing_count\": 0, \"scanning_count\": 0, \"revealed_to_red\": false, \"installing_count\": 0, \"max_sessions\": 100, \"tcp\": true, \"udp\": true, \"port\": 123, \"operating_state\": 2}}, \"process\": {}, \"revealed_to_red\": false}, \"switch1\": {\"uuid\": \"e658eac3-c4b8-4768-bf27-e2d90b7f57c0\", \"hostname\": \"switch1\", \"operating_state\": 2, \"NICs\": {\"1\": {\"uuid\": \"7ebc80f5-902f-4253-8ea6-0cafa3d1cccd\", \"mac_address\": \"df:d2:c7:2a:a1:52\", \"speed\": 100, \"mtu\": 1500, \"enabled\": false, \"nmne\": {}}, \"2\": {\"uuid\": \"c03d4d22-f309-49b6-a1ad-45a04c40d25e\", \"mac_address\": \"84:01:f3:bb:47:1c\", \"speed\": 100, \"mtu\": 1500, \"enabled\": false, \"nmne\": {}}, \"3\": {\"uuid\": \"4207353c-e0cd-456d-89fe-13ddfc605cff\", \"mac_address\": \"8b:31:ac:cc:05:c9\", \"speed\": 100, \"mtu\": 1500, \"enabled\": false, \"nmne\": {}}, \"4\": {\"uuid\": \"8aa1395f-e360-48a7-be97-ed1a5ca191ae\", \"mac_address\": \"75:3c:ae:bd:3a:b5\", \"speed\": 100, \"mtu\": 1500, \"enabled\": false, \"nmne\": {}}, \"5\": {\"uuid\": \"8b5d575c-ab0c-43ac-abfc-fa5ae75183e5\", \"mac_address\": \"e7:7f:c4:af:8e:5b\", \"speed\": 100, \"mtu\": 1500, \"enabled\": false, \"nmne\": {}}, \"6\": {\"uuid\": \"9d3cd584-f684-4f2e-9c8a-423d859fe3d3\", \"mac_address\": \"48:cf:18:8d:92:80\", \"speed\": 100, \"mtu\": 1500, \"enabled\": false, \"nmne\": {}}, \"7\": {\"uuid\": \"d42338bb-d579-483d-9e05-0318e17e574a\", \"mac_address\": \"c6:99:5c:41:13:d7\", \"speed\": 100, \"mtu\": 1500, \"enabled\": false, \"nmne\": {}}, \"8\": {\"uuid\": \"55bbd70b-491d-4452-8326-390ec3fadc28\", \"mac_address\": \"81:ab:39:0c:a2:dd\", \"speed\": 100, \"mtu\": 1500, \"enabled\": false, \"nmne\": {}}, \"9\": {\"uuid\": \"0755d768-79c7-48cf-9220-d2dad32e574b\", \"mac_address\": \"62:35:0c:5e:cc:5d\", \"speed\": 100, \"mtu\": 1500, \"enabled\": false, \"nmne\": {}}, \"10\": {\"uuid\": \"deaecc57-ec76-4e27-a37e-f66964901b03\", \"mac_address\": \"51:26:00:c6:7e:ac\", \"speed\": 100, \"mtu\": 1500, \"enabled\": false, \"nmne\": {}}, \"11\": {\"uuid\": \"53fe318c-4969-42fe-920b-37a491f54d84\", \"mac_address\": \"35:59:c7:13:ab:a5\", \"speed\": 100, \"mtu\": 1500, \"enabled\": false, \"nmne\": {}}, \"12\": {\"uuid\": \"5a81caa0-9d91-4a86-9bd4-4ecb589c70ae\", \"mac_address\": \"7a:6b:ec:15:1e:de\", \"speed\": 100, \"mtu\": 1500, \"enabled\": false, \"nmne\": {}}}, \"file_system\": {\"uuid\": \"289bea1e-69bf-44d5-80fe-212dad8afcd5\", \"folders\": {\"root\": {\"uuid\": \"3b588b3c-bc4a-4c06-a688-eced0128b128\", \"name\": \"root\", \"health_status\": 1, \"visible_status\": 1, \"previous_hash\": null, \"revealed_to_red\": false, \"files\": {}, \"deleted_files\": {}}}, \"deleted_folders\": {}, \"num_file_creations\": 0, \"num_file_deletions\": 0}, \"applications\": {}, \"services\": {}, \"process\": {}, \"revealed_to_red\": false, \"ports\": {\"1\": {\"uuid\": \"7ebc80f5-902f-4253-8ea6-0cafa3d1cccd\", \"mac_address\": \"df:d2:c7:2a:a1:52\", \"speed\": 100, \"mtu\": 1500, \"enabled\": false, \"nmne\": {}}, \"2\": {\"uuid\": \"c03d4d22-f309-49b6-a1ad-45a04c40d25e\", \"mac_address\": \"84:01:f3:bb:47:1c\", \"speed\": 100, \"mtu\": 1500, \"enabled\": false, \"nmne\": {}}, \"3\": {\"uuid\": \"4207353c-e0cd-456d-89fe-13ddfc605cff\", \"mac_address\": \"8b:31:ac:cc:05:c9\", \"speed\": 100, \"mtu\": 1500, \"enabled\": false, \"nmne\": {}}, \"4\": {\"uuid\": \"8aa1395f-e360-48a7-be97-ed1a5ca191ae\", \"mac_address\": \"75:3c:ae:bd:3a:b5\", \"speed\": 100, \"mtu\": 1500, \"enabled\": false, \"nmne\": {}}, \"5\": {\"uuid\": \"8b5d575c-ab0c-43ac-abfc-fa5ae75183e5\", \"mac_address\": \"e7:7f:c4:af:8e:5b\", \"speed\": 100, \"mtu\": 1500, \"enabled\": false, \"nmne\": {}}, \"6\": {\"uuid\": \"9d3cd584-f684-4f2e-9c8a-423d859fe3d3\", \"mac_address\": \"48:cf:18:8d:92:80\", \"speed\": 100, \"mtu\": 1500, \"enabled\": false, \"nmne\": {}}, \"7\": {\"uuid\": \"d42338bb-d579-483d-9e05-0318e17e574a\", \"mac_address\": \"c6:99:5c:41:13:d7\", \"speed\": 100, \"mtu\": 1500, \"enabled\": false, \"nmne\": {}}, \"8\": {\"uuid\": \"55bbd70b-491d-4452-8326-390ec3fadc28\", \"mac_address\": \"81:ab:39:0c:a2:dd\", \"speed\": 100, \"mtu\": 1500, \"enabled\": false, \"nmne\": {}}, \"9\": {\"uuid\": \"0755d768-79c7-48cf-9220-d2dad32e574b\", \"mac_address\": \"62:35:0c:5e:cc:5d\", \"speed\": 100, \"mtu\": 1500, \"enabled\": false, \"nmne\": {}}, \"10\": {\"uuid\": \"deaecc57-ec76-4e27-a37e-f66964901b03\", \"mac_address\": \"51:26:00:c6:7e:ac\", \"speed\": 100, \"mtu\": 1500, \"enabled\": false, \"nmne\": {}}, \"11\": {\"uuid\": \"53fe318c-4969-42fe-920b-37a491f54d84\", \"mac_address\": \"35:59:c7:13:ab:a5\", \"speed\": 100, \"mtu\": 1500, \"enabled\": false, \"nmne\": {}}, \"12\": {\"uuid\": \"5a81caa0-9d91-4a86-9bd4-4ecb589c70ae\", \"mac_address\": \"7a:6b:ec:15:1e:de\", \"speed\": 100, \"mtu\": 1500, \"enabled\": false, \"nmne\": {}}}, \"num_ports\": 12, \"mac_address_table\": {}}}, \"links\": {\"primaite_pc:eth-2<->switch1:eth-1\": {\"uuid\": \"3d053257-7473-4a66-afbc-ee33a18f2e39\", \"endpoint_a\": \"e0fbda66-afcb-4a79-b696-aad0778279a2\", \"endpoint_b\": \"7ebc80f5-902f-4253-8ea6-0cafa3d1cccd\", \"bandwidth\": 100.0, \"current_load\": 0.0, \"hostname_a\": \"primaite_pc\", \"hostname_b\": \"switch1\", \"port_a\": 2, \"port_b\": 1}, \"google_server:eth-2<->switch1:eth-2\": {\"uuid\": \"42b8f911-3640-4ccb-b277-b48b294a1fc8\", \"endpoint_a\": \"53993d8f-216e-4c00-9b03-c6bb9e2437b5\", \"endpoint_b\": \"c03d4d22-f309-49b6-a1ad-45a04c40d25e\", \"bandwidth\": 100.0, \"current_load\": 0.0, \"hostname_a\": \"google_server\", \"hostname_b\": \"switch1\", \"port_a\": 2, \"port_b\": 2}}}, \"domain\": {\"uuid\": \"f0629156-e9af-493d-b098-f47d73126122\", \"accounts\": {\"admin\": {\"uuid\": \"b76653a9-d40e-483b-85a3-1b44628a11d0\", \"num_logons\": 0, \"num_logoffs\": 0, \"num_group_changes\": 0, \"username\": \"admin\", \"password\": \"admin12\", \"account_type\": 2, \"enabled\": true}}}}'" + "'{\"uuid\": \"91c88b2a-caf1-47be-a394-d0c22e5110be\", \"network\": {\"uuid\": \"a9121808-0401-460c-9833-23d4ba91e9bc\", \"nodes\": {\"primaite_pc\": {\"uuid\": \"dd0e95be-2491-4d5b-8388-df3975a19e8a\", \"hostname\": \"primaite_pc\", \"operating_state\": 2, \"NICs\": {\"1\": {\"uuid\": \"279e2645-b680-4d2e-b13c-66d5cfacbd38\", \"mac_address\": \"bd:76:20:24:cf:04\", \"speed\": 100, \"mtu\": 1500, \"enabled\": false, \"nmne\": {}, \"ip_address\": \"192.168.1.10\", \"subnet_mask\": \"255.255.255.0\", \"wake_on_lan\": false}, \"2\": {\"uuid\": \"40c0db02-4d14-4826-b49b-e6a521941cec\", \"mac_address\": \"d8:b2:0c:af:3f:83\", \"speed\": 100, \"mtu\": 1500, \"enabled\": false, \"nmne\": {}, \"ip_address\": \"130.1.1.1\", \"subnet_mask\": \"255.255.255.0\", \"wake_on_lan\": false}}, \"file_system\": {\"uuid\": \"91d3aed7-53c6-471f-b903-9889396be280\", \"folders\": {\"root\": {\"uuid\": \"81bdc04e-9a0d-4306-9a9c-ee926fff6df8\", \"name\": \"root\", \"health_status\": 1, \"visible_status\": 1, \"previous_hash\": null, \"revealed_to_red\": false, \"files\": {}, \"deleted_files\": {}}, \"downloads\": {\"uuid\": \"56abdf27-b8d4-42f4-9b09-b7912db1c4f3\", \"name\": \"downloads\", \"health_status\": 1, \"visible_status\": 1, \"previous_hash\": null, \"revealed_to_red\": false, \"files\": {\"firefox_installer.zip\": {\"uuid\": \"02236b61-14bb-46aa-9fd5-7174c0d7d730\", \"name\": \"firefox_installer.zip\", \"health_status\": 1, \"visible_status\": 1, \"previous_hash\": null, \"revealed_to_red\": false, \"size\": 1024000, \"file_type\": \"ZIP\", \"num_access\": 0}}, \"deleted_files\": {}}}, \"deleted_folders\": {}, \"num_file_creations\": 0, \"num_file_deletions\": 0}, \"applications\": {\"WebBrowser\": {\"uuid\": \"a6a12776-e307-4d71-9e7a-d9ca97ecd6b0\", \"health_state_actual\": 0, \"health_state_visible\": 0, \"criticality\": 1, \"fixing_count\": 0, \"scanning_count\": 0, \"revealed_to_red\": false, \"installing_count\": 0, \"max_sessions\": 100, \"tcp\": true, \"udp\": true, \"port\": 80, \"operating_state\": 2, \"execution_control_status\": \"manual\", \"num_executions\": 0, \"groups\": [], \"history\": []}, \"mspaint\": {\"uuid\": \"efd34549-cc92-4474-80ab-5fb6c3159ff6\", \"health_state_actual\": 1, \"health_state_visible\": 1, \"criticality\": 3, \"fixing_count\": 0, \"scanning_count\": 0, \"revealed_to_red\": false, \"installing_count\": 0, \"max_sessions\": 100, \"tcp\": true, \"udp\": true, \"port\": 80, \"operating_state\": 1, \"execution_control_status\": \"manual\", \"num_executions\": 0, \"groups\": []}}, \"services\": {\"ARP\": {\"uuid\": \"e61c25ff-a6c2-4eec-b031-131eaf33490c\", \"health_state_actual\": 0, \"health_state_visible\": 0, \"criticality\": 1, \"fixing_count\": 0, \"scanning_count\": 0, \"revealed_to_red\": false, \"installing_count\": 0, \"max_sessions\": 100, \"tcp\": true, \"udp\": true, \"port\": 219, \"operating_state\": 2}, \"ICMP\": {\"uuid\": \"74debeed-b758-41cb-bea2-51ac283e6ae2\", \"health_state_actual\": 0, \"health_state_visible\": 0, \"criticality\": 1, \"fixing_count\": 0, \"scanning_count\": 0, \"revealed_to_red\": false, \"installing_count\": 0, \"max_sessions\": 100, \"tcp\": true, \"udp\": true, \"port\": 0, \"operating_state\": 2}, \"DNSClient\": {\"uuid\": \"6680efc0-e005-41e8-bb49-39a0d9c4b118\", \"health_state_actual\": 0, \"health_state_visible\": 0, \"criticality\": 1, \"fixing_count\": 0, \"scanning_count\": 0, \"revealed_to_red\": false, \"installing_count\": 0, \"max_sessions\": 100, \"tcp\": true, \"udp\": true, \"port\": 53, \"operating_state\": 2}, \"FTPClient\": {\"uuid\": \"21b05ac9-e9b4-4c5c-a812-f6748e14d8c3\", \"health_state_actual\": 0, \"health_state_visible\": 0, \"criticality\": 1, \"fixing_count\": 0, \"scanning_count\": 0, \"revealed_to_red\": false, \"installing_count\": 0, \"max_sessions\": 100, \"tcp\": true, \"udp\": true, \"port\": 21, \"operating_state\": 2}, \"NTPClient\": {\"uuid\": \"7ab7c911-5037-4e82-b00c-be4f72c13aa7\", \"health_state_actual\": 0, \"health_state_visible\": 0, \"criticality\": 1, \"fixing_count\": 0, \"scanning_count\": 0, \"revealed_to_red\": false, \"installing_count\": 0, \"max_sessions\": 100, \"tcp\": true, \"udp\": true, \"port\": 123, \"operating_state\": 2}}, \"process\": {}, \"revealed_to_red\": false}, \"google_server\": {\"uuid\": \"42d61d8d-2493-4b8a-944f-7962abc9d20b\", \"hostname\": \"google_server\", \"operating_state\": 2, \"NICs\": {\"1\": {\"uuid\": \"e384a4fc-754f-44a4-9158-c63f72f52f76\", \"mac_address\": \"ea:5d:4f:10:b2:27\", \"speed\": 100, \"mtu\": 1500, \"enabled\": false, \"nmne\": {}, \"ip_address\": \"192.168.1.11\", \"subnet_mask\": \"255.255.255.0\", \"wake_on_lan\": false}, \"2\": {\"uuid\": \"8a628493-83fb-44bf-a1b0-ef19e362ae5f\", \"mac_address\": \"44:89:a5:ce:7f:6f\", \"speed\": 100, \"mtu\": 1500, \"enabled\": false, \"nmne\": {}, \"ip_address\": \"130.1.1.2\", \"subnet_mask\": \"255.255.255.0\", \"wake_on_lan\": false}}, \"file_system\": {\"uuid\": \"f25cee1f-2ebe-4fd3-8d5c-649b0d342b61\", \"folders\": {\"root\": {\"uuid\": \"cbbd3631-a915-400d-bc02-f31f72447ce5\", \"name\": \"root\", \"health_status\": 1, \"visible_status\": 1, \"previous_hash\": null, \"revealed_to_red\": false, \"files\": {\"favicon.ico\": {\"uuid\": \"3ceeded4-77b9-4a86-949c-73188d5f4c34\", \"name\": \"favicon.ico\", \"health_status\": 1, \"visible_status\": 1, \"previous_hash\": null, \"revealed_to_red\": false, \"size\": 0, \"file_type\": \"UNKNOWN\", \"num_access\": 0}}, \"deleted_files\": {}}, \"static\": {\"uuid\": \"d8241ce0-f55e-43ec-bd68-741b79a9a565\", \"name\": \"static\", \"health_status\": 1, \"visible_status\": 1, \"previous_hash\": null, \"revealed_to_red\": false, \"files\": {}, \"deleted_files\": {}}}, \"deleted_folders\": {}, \"num_file_creations\": 1, \"num_file_deletions\": 0}, \"applications\": {\"WebBrowser\": {\"uuid\": \"957d0049-e703-4882-8e57-b2ab4c79d458\", \"health_state_actual\": 0, \"health_state_visible\": 0, \"criticality\": 1, \"fixing_count\": 0, \"scanning_count\": 0, \"revealed_to_red\": false, \"installing_count\": 0, \"max_sessions\": 100, \"tcp\": true, \"udp\": true, \"port\": 80, \"operating_state\": 2, \"execution_control_status\": \"manual\", \"num_executions\": 0, \"groups\": [], \"history\": []}}, \"services\": {\"ARP\": {\"uuid\": \"82ea1bcf-a0fe-418d-873e-5f075ebb4d3b\", \"health_state_actual\": 0, \"health_state_visible\": 0, \"criticality\": 1, \"fixing_count\": 0, \"scanning_count\": 0, \"revealed_to_red\": false, \"installing_count\": 0, \"max_sessions\": 100, \"tcp\": true, \"udp\": true, \"port\": 219, \"operating_state\": 2}, \"ICMP\": {\"uuid\": \"bc084dc4-0a7d-4954-9e6e-54bed797e837\", \"health_state_actual\": 0, \"health_state_visible\": 0, \"criticality\": 1, \"fixing_count\": 0, \"scanning_count\": 0, \"revealed_to_red\": false, \"installing_count\": 0, \"max_sessions\": 100, \"tcp\": true, \"udp\": true, \"port\": 0, \"operating_state\": 2}, \"DNSClient\": {\"uuid\": \"5a9ecc18-71c0-4728-a9c6-e31b33529581\", \"health_state_actual\": 0, \"health_state_visible\": 0, \"criticality\": 1, \"fixing_count\": 0, \"scanning_count\": 0, \"revealed_to_red\": false, \"installing_count\": 0, \"max_sessions\": 100, \"tcp\": true, \"udp\": true, \"port\": 53, \"operating_state\": 2}, \"FTPClient\": {\"uuid\": \"f0a411eb-5423-4c98-8689-d94af57deefc\", \"health_state_actual\": 0, \"health_state_visible\": 0, \"criticality\": 1, \"fixing_count\": 0, \"scanning_count\": 0, \"revealed_to_red\": false, \"installing_count\": 0, \"max_sessions\": 100, \"tcp\": true, \"udp\": true, \"port\": 21, \"operating_state\": 2}, \"NTPClient\": {\"uuid\": \"d36f2c4f-af30-4618-ae8e-fe68c98e1382\", \"health_state_actual\": 0, \"health_state_visible\": 0, \"criticality\": 1, \"fixing_count\": 0, \"scanning_count\": 0, \"revealed_to_red\": false, \"installing_count\": 0, \"max_sessions\": 100, \"tcp\": true, \"udp\": true, \"port\": 123, \"operating_state\": 2}}, \"process\": {}, \"revealed_to_red\": false}, \"switch1\": {\"uuid\": \"a9e08b28-d1f4-4c34-b410-71333cd6b42b\", \"hostname\": \"switch1\", \"operating_state\": 2, \"NICs\": {\"1\": {\"uuid\": \"3546e960-30f8-49ee-95b9-57570b228333\", \"mac_address\": \"8d:d9:3e:f3:a3:ce\", \"speed\": 100, \"mtu\": 1500, \"enabled\": false, \"nmne\": {}}, \"2\": {\"uuid\": \"a049bb8f-53d3-4575-b325-dfb55516edcd\", \"mac_address\": \"aa:45:88:e1:13:e5\", \"speed\": 100, \"mtu\": 1500, \"enabled\": false, \"nmne\": {}}, \"3\": {\"uuid\": \"179c030c-d8fe-474b-a9d1-6c6bd6e6ca63\", \"mac_address\": \"10:d7:bc:39:4d:9d\", \"speed\": 100, \"mtu\": 1500, \"enabled\": false, \"nmne\": {}}, \"4\": {\"uuid\": \"56f84a14-0a98-4bc5-983b-31900fc9a2c5\", \"mac_address\": \"61:62:18:cf:2a:ea\", \"speed\": 100, \"mtu\": 1500, \"enabled\": false, \"nmne\": {}}, \"5\": {\"uuid\": \"0ff4b64e-be4c-473e-8dcd-b7a0078ff890\", \"mac_address\": \"21:5e:6b:1b:d0:bf\", \"speed\": 100, \"mtu\": 1500, \"enabled\": false, \"nmne\": {}}, \"6\": {\"uuid\": \"0edf239b-bbb8-4076-ba85-cb07c65722d5\", \"mac_address\": \"40:58:ac:11:9c:1a\", \"speed\": 100, \"mtu\": 1500, \"enabled\": false, \"nmne\": {}}, \"7\": {\"uuid\": \"a7f578e5-a6f5-4cf8-abca-207e483637c2\", \"mac_address\": \"e0:ef:90:e2:ce:b4\", \"speed\": 100, \"mtu\": 1500, \"enabled\": false, \"nmne\": {}}, \"8\": {\"uuid\": \"dc2069dd-ef3c-4e0b-81cb-a73caba917a8\", \"mac_address\": \"2c:2a:27:d6:9a:a8\", \"speed\": 100, \"mtu\": 1500, \"enabled\": false, \"nmne\": {}}, \"9\": {\"uuid\": \"afbc1a01-efdb-424c-9a7d-b3c3165f6d78\", \"mac_address\": \"e0:f5:79:04:4f:2a\", \"speed\": 100, \"mtu\": 1500, \"enabled\": false, \"nmne\": {}}, \"10\": {\"uuid\": \"bdd805f4-a3dc-4a94-ba67-3a62b138f41c\", \"mac_address\": \"9a:20:3d:cb:a0:98\", \"speed\": 100, \"mtu\": 1500, \"enabled\": false, \"nmne\": {}}, \"11\": {\"uuid\": \"19f6f871-cba9-423a-a1a5-6a0e347e98cb\", \"mac_address\": \"69:d9:8c:1d:a9:75\", \"speed\": 100, \"mtu\": 1500, \"enabled\": false, \"nmne\": {}}, \"12\": {\"uuid\": \"5c2aa6f5-12ce-466b-b46b-95ec519a5f47\", \"mac_address\": \"db:7e:8c:91:1b:3f\", \"speed\": 100, \"mtu\": 1500, \"enabled\": false, \"nmne\": {}}}, \"file_system\": {\"uuid\": \"91dea1d3-3947-49b9-a691-750bc25bbb9c\", \"folders\": {\"root\": {\"uuid\": \"b7ebbf43-d86f-43d3-bbc7-f6b197af40b9\", \"name\": \"root\", \"health_status\": 1, \"visible_status\": 1, \"previous_hash\": null, \"revealed_to_red\": false, \"files\": {}, \"deleted_files\": {}}}, \"deleted_folders\": {}, \"num_file_creations\": 0, \"num_file_deletions\": 0}, \"applications\": {}, \"services\": {}, \"process\": {}, \"revealed_to_red\": false, \"ports\": {\"1\": {\"uuid\": \"3546e960-30f8-49ee-95b9-57570b228333\", \"mac_address\": \"8d:d9:3e:f3:a3:ce\", \"speed\": 100, \"mtu\": 1500, \"enabled\": false, \"nmne\": {}}, \"2\": {\"uuid\": \"a049bb8f-53d3-4575-b325-dfb55516edcd\", \"mac_address\": \"aa:45:88:e1:13:e5\", \"speed\": 100, \"mtu\": 1500, \"enabled\": false, \"nmne\": {}}, \"3\": {\"uuid\": \"179c030c-d8fe-474b-a9d1-6c6bd6e6ca63\", \"mac_address\": \"10:d7:bc:39:4d:9d\", \"speed\": 100, \"mtu\": 1500, \"enabled\": false, \"nmne\": {}}, \"4\": {\"uuid\": \"56f84a14-0a98-4bc5-983b-31900fc9a2c5\", \"mac_address\": \"61:62:18:cf:2a:ea\", \"speed\": 100, \"mtu\": 1500, \"enabled\": false, \"nmne\": {}}, \"5\": {\"uuid\": \"0ff4b64e-be4c-473e-8dcd-b7a0078ff890\", \"mac_address\": \"21:5e:6b:1b:d0:bf\", \"speed\": 100, \"mtu\": 1500, \"enabled\": false, \"nmne\": {}}, \"6\": {\"uuid\": \"0edf239b-bbb8-4076-ba85-cb07c65722d5\", \"mac_address\": \"40:58:ac:11:9c:1a\", \"speed\": 100, \"mtu\": 1500, \"enabled\": false, \"nmne\": {}}, \"7\": {\"uuid\": \"a7f578e5-a6f5-4cf8-abca-207e483637c2\", \"mac_address\": \"e0:ef:90:e2:ce:b4\", \"speed\": 100, \"mtu\": 1500, \"enabled\": false, \"nmne\": {}}, \"8\": {\"uuid\": \"dc2069dd-ef3c-4e0b-81cb-a73caba917a8\", \"mac_address\": \"2c:2a:27:d6:9a:a8\", \"speed\": 100, \"mtu\": 1500, \"enabled\": false, \"nmne\": {}}, \"9\": {\"uuid\": \"afbc1a01-efdb-424c-9a7d-b3c3165f6d78\", \"mac_address\": \"e0:f5:79:04:4f:2a\", \"speed\": 100, \"mtu\": 1500, \"enabled\": false, \"nmne\": {}}, \"10\": {\"uuid\": \"bdd805f4-a3dc-4a94-ba67-3a62b138f41c\", \"mac_address\": \"9a:20:3d:cb:a0:98\", \"speed\": 100, \"mtu\": 1500, \"enabled\": false, \"nmne\": {}}, \"11\": {\"uuid\": \"19f6f871-cba9-423a-a1a5-6a0e347e98cb\", \"mac_address\": \"69:d9:8c:1d:a9:75\", \"speed\": 100, \"mtu\": 1500, \"enabled\": false, \"nmne\": {}}, \"12\": {\"uuid\": \"5c2aa6f5-12ce-466b-b46b-95ec519a5f47\", \"mac_address\": \"db:7e:8c:91:1b:3f\", \"speed\": 100, \"mtu\": 1500, \"enabled\": false, \"nmne\": {}}}, \"num_ports\": 12, \"mac_address_table\": {}}}, \"links\": {\"primaite_pc:eth-2<->switch1:eth-1\": {\"uuid\": \"405f3032-6f5d-427f-b42e-5eee4cdc3a7c\", \"endpoint_a\": \"40c0db02-4d14-4826-b49b-e6a521941cec\", \"endpoint_b\": \"3546e960-30f8-49ee-95b9-57570b228333\", \"bandwidth\": 100.0, \"current_load\": 0.0, \"hostname_a\": \"primaite_pc\", \"hostname_b\": \"switch1\", \"port_a\": 2, \"port_b\": 1}, \"google_server:eth-2<->switch1:eth-2\": {\"uuid\": \"2bd19485-0a6b-4878-978b-b082a672d9b9\", \"endpoint_a\": \"8a628493-83fb-44bf-a1b0-ef19e362ae5f\", \"endpoint_b\": \"a049bb8f-53d3-4575-b325-dfb55516edcd\", \"bandwidth\": 100.0, \"current_load\": 0.0, \"hostname_a\": \"google_server\", \"hostname_b\": \"switch1\", \"port_a\": 2, \"port_b\": 2}}}, \"domain\": {\"uuid\": \"25fbe0e9-76e8-4fd7-ad22-da2d2b5a509d\", \"accounts\": {\"admin\": {\"uuid\": \"78783f13-6149-47b3-9b9d-f98d658bf54a\", \"num_logons\": 0, \"num_logoffs\": 0, \"num_group_changes\": 0, \"username\": \"admin\", \"password\": \"admin12\", \"account_type\": 2, \"enabled\": true}}}}'" ] }, - "execution_count": 134, + "execution_count": 16, "metadata": {}, "output_type": "execute_result" } diff --git a/src/primaite/simulator/_package_data/network_simulator_demo.ipynb b/src/primaite/simulator/_package_data/network_simulator_demo.ipynb index 47703c9c..7a095b53 100644 --- a/src/primaite/simulator/_package_data/network_simulator_demo.ipynb +++ b/src/primaite/simulator/_package_data/network_simulator_demo.ipynb @@ -141,16 +141,16 @@ "+------------+----------------------------------------+-------------------+------------------------------------------+-------+-------------------+--------------+\n", "| Endpoint A | A Port | Endpoint B | B Port | is Up | Bandwidth (MBits) | Current Load |\n", "+------------+----------------------------------------+-------------------+------------------------------------------+-------+-------------------+--------------+\n", - "| router_1 | Port 2: eb:31:e8:11:28:ac/192.168.10.1 | switch_2 | Port 8: d3:59:e2:73:4e:b8 | True | 100.0 | 0.00006% |\n", - "| router_1 | Port 1: 3f:c3:3d:00:74:c4/192.168.1.1 | switch_1 | Port 8: a9:ea:54:9f:35:f8 | True | 100.0 | 0.00018% |\n", - "| switch_1 | Port 7: 63:ea:45:e6:f4:22 | security_suite | Port 1: 18:9d:a1:f0:6f:0b/192.168.1.110 | True | 100.0 | 0.00003% |\n", - "| switch_1 | Port 4: 08:0e:a9:03:d7:3c | backup_server | Port 1: c3:e5:81:c9:8b:74/192.168.1.16 | True | 100.0 | 0.00003% |\n", - "| switch_1 | Port 2: 75:c5:30:0f:5d:92 | web_server | Port 1: 90:94:52:a6:1f:c5/192.168.1.12 | True | 100.0 | 0.00015% |\n", - "| switch_1 | Port 3: f1:62:75:5d:d9:59 | database_server | Port 1: 2e:e8:cb:a5:97:12/192.168.1.14 | True | 100.0 | 0.00017% |\n", - "| switch_1 | Port 1: 08:79:a7:3f:b5:96 | domain_controller | Port 1: 00:c3:ff:62:87:8f/192.168.1.10 | True | 100.0 | 0.00003% |\n", - "| switch_2 | Port 7: 88:9c:57:5c:53:5e | security_suite | Port 2: 9e:b2:c8:04:d8:97/192.168.10.110 | True | 100.0 | 0.00000% |\n", - "| switch_2 | Port 2: a8:1b:b2:78:12:34 | client_2 | Port 1: 6a:b1:ff:36:ef:40/192.168.10.22 | True | 100.0 | 0.00003% |\n", - "| switch_2 | Port 1: 42:08:3f:1e:ea:dd | client_1 | Port 1: f6:6d:35:8a:67:d8/192.168.10.21 | True | 100.0 | 0.00003% |\n", + "| router_1 | Port 2: 6e:3e:9f:58:c3:f8/192.168.10.1 | switch_2 | Port 8: 00:a7:49:9f:b7:40 | True | 100.0 | 0.00006% |\n", + "| router_1 | Port 1: 7c:0a:49:bd:2d:5f/192.168.1.1 | switch_1 | Port 8: e6:5e:9e:61:f6:71 | True | 100.0 | 0.00018% |\n", + "| switch_1 | Port 7: 8c:96:32:d5:ef:4b | security_suite | Port 1: 92:17:67:5f:09:f0/192.168.1.110 | True | 100.0 | 0.00003% |\n", + "| switch_1 | Port 4: ef:da:44:ee:68:1d | backup_server | Port 1: 82:23:ff:c5:03:45/192.168.1.16 | True | 100.0 | 0.00003% |\n", + "| switch_1 | Port 2: ab:84:4b:96:bc:b6 | web_server | Port 1: 30:3c:b4:54:b2:ef/192.168.1.12 | True | 100.0 | 0.00015% |\n", + "| switch_1 | Port 3: d8:07:d0:d6:27:52 | database_server | Port 1: 7c:cd:b5:ba:46:33/192.168.1.14 | True | 100.0 | 0.00017% |\n", + "| switch_1 | Port 1: e0:06:93:2c:45:cf | domain_controller | Port 1: 6d:3e:3e:b3:f6:6f/192.168.1.10 | True | 100.0 | 0.00003% |\n", + "| switch_2 | Port 7: 4f:55:6c:c3:ff:e9 | security_suite | Port 2: 64:6f:aa:ba:cb:d0/192.168.10.110 | True | 100.0 | 0.00000% |\n", + "| switch_2 | Port 2: f7:42:43:63:75:c9 | client_2 | Port 1: 21:bb:1b:75:02:fb/192.168.10.22 | True | 100.0 | 0.00003% |\n", + "| switch_2 | Port 1: 45:93:50:03:48:f5 | client_1 | Port 1: ca:f5:26:85:a7:54/192.168.10.21 | True | 100.0 | 0.00003% |\n", "+------------+----------------------------------------+-------------------+------------------------------------------+-------+-------------------+--------------+\n" ] } @@ -206,11 +206,11 @@ "+------+-------------------+-----------------+-------+----------+\n", "| Port | MAC Address | Address | Speed | Status |\n", "+------+-------------------+-----------------+-------+----------+\n", - "| 1 | 3f:c3:3d:00:74:c4 | 192.168.1.1/24 | 100 | Enabled |\n", - "| 2 | eb:31:e8:11:28:ac | 192.168.10.1/24 | 100 | Enabled |\n", - "| 3 | 7b:4f:23:8d:b5:18 | 127.0.0.1/8 | 100 | Disabled |\n", - "| 4 | cd:89:ba:42:ee:04 | 127.0.0.1/8 | 100 | Disabled |\n", - "| 5 | 8d:92:27:76:79:c5 | 127.0.0.1/8 | 100 | Disabled |\n", + "| 1 | 7c:0a:49:bd:2d:5f | 192.168.1.1/24 | 100 | Enabled |\n", + "| 2 | 6e:3e:9f:58:c3:f8 | 192.168.10.1/24 | 100 | Enabled |\n", + "| 3 | 44:c9:4c:25:4c:9b | 127.0.0.1/8 | 100 | Disabled |\n", + "| 4 | 4a:99:e4:a0:87:ba | 127.0.0.1/8 | 100 | Disabled |\n", + "| 5 | ca:5c:3b:6e:52:ef | 127.0.0.1/8 | 100 | Disabled |\n", "+------+-------------------+-----------------+-------+----------+\n" ] } @@ -244,13 +244,13 @@ "+---------------+-------------------+-------------------+\n", "| IP Address | MAC Address | Via |\n", "+---------------+-------------------+-------------------+\n", - "| 192.168.10.21 | f6:6d:35:8a:67:d8 | eb:31:e8:11:28:ac |\n", - "| 192.168.10.22 | 6a:b1:ff:36:ef:40 | eb:31:e8:11:28:ac |\n", - "| 192.168.1.10 | 00:c3:ff:62:87:8f | 3f:c3:3d:00:74:c4 |\n", - "| 192.168.1.14 | 2e:e8:cb:a5:97:12 | 3f:c3:3d:00:74:c4 |\n", - "| 192.168.1.12 | 90:94:52:a6:1f:c5 | 3f:c3:3d:00:74:c4 |\n", - "| 192.168.1.16 | c3:e5:81:c9:8b:74 | 3f:c3:3d:00:74:c4 |\n", - "| 192.168.1.110 | 18:9d:a1:f0:6f:0b | 3f:c3:3d:00:74:c4 |\n", + "| 192.168.10.21 | ca:f5:26:85:a7:54 | 6e:3e:9f:58:c3:f8 |\n", + "| 192.168.10.22 | 21:bb:1b:75:02:fb | 6e:3e:9f:58:c3:f8 |\n", + "| 192.168.1.10 | 6d:3e:3e:b3:f6:6f | 7c:0a:49:bd:2d:5f |\n", + "| 192.168.1.14 | 7c:cd:b5:ba:46:33 | 7c:0a:49:bd:2d:5f |\n", + "| 192.168.1.12 | 30:3c:b4:54:b2:ef | 7c:0a:49:bd:2d:5f |\n", + "| 192.168.1.16 | 82:23:ff:c5:03:45 | 7c:0a:49:bd:2d:5f |\n", + "| 192.168.1.110 | 92:17:67:5f:09:f0 | 7c:0a:49:bd:2d:5f |\n", "+---------------+-------------------+-------------------+\n" ] } @@ -385,7 +385,7 @@ }, { "cell_type": "code", - "execution_count": 30, + "execution_count": 9, "id": "e7fd439b-5442-4e9d-9e7d-86dacb77f458", "metadata": { "tags": [] @@ -400,28 +400,14 @@ "+------+-------------------+-------+----------+\n", "| Port | MAC Address | Speed | Status |\n", "+------+-------------------+-------+----------+\n", - "| 1 | 08:79:a7:3f:b5:96 | 100 | Enabled |\n", - "| 2 | 75:c5:30:0f:5d:92 | 100 | Enabled |\n", - "| 3 | f1:62:75:5d:d9:59 | 100 | Enabled |\n", - "| 4 | 08:0e:a9:03:d7:3c | 100 | Enabled |\n", - "| 5 | ae:40:29:58:c7:95 | 100 | Disabled |\n", - "| 6 | 7d:54:38:7f:79:e8 | 100 | Disabled |\n", - "| 7 | 63:ea:45:e6:f4:22 | 100 | Enabled |\n", - "| 8 | a9:ea:54:9f:35:f8 | 100 | Enabled |\n", - "+------+-------------------+-------+----------+\n", - "+---------------------------------------------+\n", - "| switch_2 Switch Ports |\n", - "+------+-------------------+-------+----------+\n", - "| Port | MAC Address | Speed | Status |\n", - "+------+-------------------+-------+----------+\n", - "| 1 | 42:08:3f:1e:ea:dd | 100 | Enabled |\n", - "| 2 | a8:1b:b2:78:12:34 | 100 | Enabled |\n", - "| 3 | 43:e4:54:fe:e7:1f | 100 | Disabled |\n", - "| 4 | 24:bf:74:7c:c4:11 | 100 | Disabled |\n", - "| 5 | 4b:57:f7:46:c9:4f | 100 | Disabled |\n", - "| 6 | 10:03:9d:39:0c:81 | 100 | Disabled |\n", - "| 7 | 88:9c:57:5c:53:5e | 100 | Enabled |\n", - "| 8 | d3:59:e2:73:4e:b8 | 100 | Enabled |\n", + "| 1 | e0:06:93:2c:45:cf | 100 | Enabled |\n", + "| 2 | ab:84:4b:96:bc:b6 | 100 | Enabled |\n", + "| 3 | d8:07:d0:d6:27:52 | 100 | Enabled |\n", + "| 4 | ef:da:44:ee:68:1d | 100 | Enabled |\n", + "| 5 | b6:76:3d:1d:7e:be | 100 | Disabled |\n", + "| 6 | 02:ce:fa:da:9a:a4 | 100 | Disabled |\n", + "| 7 | 8c:96:32:d5:ef:4b | 100 | Enabled |\n", + "| 8 | e6:5e:9e:61:f6:71 | 100 | Enabled |\n", "+------+-------------------+-------+----------+\n" ] } @@ -430,42 +416,6 @@ "network.get_node_by_hostname(\"switch_1\").show()" ] }, - { - "cell_type": "markdown", - "id": "beb8dbd6-7250-4ac9-9fa2-d2a9c0e5fd19", - "metadata": { - "tags": [] - }, - "source": [ - "Calling `switch.arp.show()` displays the Switch ARP Cache." - ] - }, - { - "cell_type": "code", - "execution_count": 10, - "id": "d06e1310-4a77-4315-a59f-cb1b49ca2352", - "metadata": { - "tags": [] - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "+--------------------------------+\n", - "| switch_1 ARP Cache |\n", - "+------------+-------------+-----+\n", - "| IP Address | MAC Address | Via |\n", - "+------------+-------------+-----+\n", - "+------------+-------------+-----+\n" - ] - } - ], - "source": [ - "network.get_node_by_hostname(\"switch_1\").arp.show()\n", - "#network.get_node_by_hostname(\"switch_1\").software_manager" - ] - }, { "cell_type": "markdown", "id": "fda75ac3-8123-4234-8f36-86547891d8df", @@ -476,7 +426,7 @@ }, { "cell_type": "code", - "execution_count": 11, + "execution_count": 10, "id": "a0d984b7-a7c1-4bbd-aa5a-9d3caecb08dc", "metadata": { "tags": [] @@ -521,7 +471,7 @@ }, { "cell_type": "code", - "execution_count": 12, + "execution_count": 11, "id": "656c37f6-b145-42af-9714-8d2886d0eff8", "metadata": { "tags": [] @@ -536,8 +486,8 @@ "+------+------+-------------------+-------------------+-------+---------+\n", "| Port | Type | MAC Address | Address | Speed | Status |\n", "+------+------+-------------------+-------------------+-------+---------+\n", - "| 1 | NIC | 18:9d:a1:f0:6f:0b | 192.168.1.110/24 | 100 | Enabled |\n", - "| 2 | NIC | 9e:b2:c8:04:d8:97 | 192.168.10.110/24 | 100 | Enabled |\n", + "| 1 | NIC | 92:17:67:5f:09:f0 | 192.168.1.110/24 | 100 | Enabled |\n", + "| 2 | NIC | 64:6f:aa:ba:cb:d0 | 192.168.10.110/24 | 100 | Enabled |\n", "+------+------+-------------------+-------------------+-------+---------+\n", "+---------------------------+\n", "| security_suite Open Ports |\n", @@ -567,7 +517,7 @@ }, { "cell_type": "code", - "execution_count": 13, + "execution_count": 12, "id": "66b267d6-2308-486a-b9aa-cb8d3bcf0753", "metadata": { "tags": [] @@ -582,7 +532,7 @@ "+-------------+-------------------+-------------------+\n", "| IP Address | MAC Address | Via |\n", "+-------------+-------------------+-------------------+\n", - "| 192.168.1.1 | 3f:c3:3d:00:74:c4 | 18:9d:a1:f0:6f:0b |\n", + "| 192.168.1.1 | 7c:0a:49:bd:2d:5f | 92:17:67:5f:09:f0 |\n", "+-------------+-------------------+-------------------+\n" ] } @@ -601,7 +551,7 @@ }, { "cell_type": "code", - "execution_count": 14, + "execution_count": 13, "id": "1b5debe8-ef1b-445d-8fa9-6a45568f21f3", "metadata": { "tags": [] @@ -636,7 +586,7 @@ }, { "cell_type": "code", - "execution_count": 15, + "execution_count": 14, "id": "495b7de4-b6ce-41a6-9114-f74752ab4491", "metadata": { "tags": [] @@ -682,7 +632,7 @@ }, { "cell_type": "code", - "execution_count": 16, + "execution_count": 15, "id": "a38abb71-994e-49e8-8f51-e9a550e95b99", "metadata": { "tags": [] @@ -706,7 +656,7 @@ "True" ] }, - "execution_count": 16, + "execution_count": 15, "metadata": {}, "output_type": "execute_result" } @@ -717,7 +667,7 @@ }, { "cell_type": "code", - "execution_count": 17, + "execution_count": 16, "id": "8388e1e9-30e3-4534-8e5a-c6e9144149d2", "metadata": { "tags": [] @@ -750,7 +700,7 @@ }, { "cell_type": "code", - "execution_count": 18, + "execution_count": 17, "id": "ff8e976a-c16b-470c-8923-325713a30d6c", "metadata": { "tags": [] @@ -774,7 +724,7 @@ "True" ] }, - "execution_count": 18, + "execution_count": 17, "metadata": {}, "output_type": "execute_result" } @@ -793,7 +743,7 @@ }, { "cell_type": "code", - "execution_count": 19, + "execution_count": 18, "id": "c4163f8d-6a72-410c-9f5c-4f881b7de45e", "metadata": { "tags": [] @@ -817,7 +767,7 @@ "True" ] }, - "execution_count": 19, + "execution_count": 18, "metadata": {}, "output_type": "execute_result" } @@ -836,7 +786,7 @@ }, { "cell_type": "code", - "execution_count": 20, + "execution_count": 19, "id": "e79a523a-5780-45b6-8798-c434e0e522bd", "metadata": { "tags": [] @@ -879,7 +829,7 @@ }, { "cell_type": "code", - "execution_count": 21, + "execution_count": 20, "id": "603cf913-e261-49da-a7dd-85e1bb6dec56", "metadata": { "tags": [] @@ -903,7 +853,7 @@ "True" ] }, - "execution_count": 21, + "execution_count": 20, "metadata": {}, "output_type": "execute_result" } @@ -922,7 +872,7 @@ }, { "cell_type": "code", - "execution_count": 22, + "execution_count": 21, "id": "e047de00-3de4-4823-b26a-2c8d64c7a663", "metadata": { "tags": [] @@ -955,7 +905,7 @@ }, { "cell_type": "code", - "execution_count": 23, + "execution_count": 22, "id": "6db355ae-b99a-441b-a2c4-4ffe78f46bff", "metadata": { "tags": [] @@ -967,7 +917,7 @@ "True" ] }, - "execution_count": 23, + "execution_count": 22, "metadata": {}, "output_type": "execute_result" } @@ -986,7 +936,7 @@ }, { "cell_type": "code", - "execution_count": 24, + "execution_count": 23, "id": "a345e000-8842-4827-af96-adc0fbe390fb", "metadata": { "tags": [] @@ -1026,7 +976,7 @@ }, { "cell_type": "code", - "execution_count": 25, + "execution_count": 24, "id": "a4f4ff31-590f-40fb-b13d-efaa8c2720b6", "metadata": { "tags": [] @@ -1046,7 +996,7 @@ "False" ] }, - "execution_count": 25, + "execution_count": 24, "metadata": {}, "output_type": "execute_result" } @@ -1065,7 +1015,7 @@ }, { "cell_type": "code", - "execution_count": 26, + "execution_count": 25, "id": "f62b8a4e-fd3b-4059-b108-3d4a0b18f2a0", "metadata": { "tags": [] @@ -1098,7 +1048,7 @@ }, { "cell_type": "code", - "execution_count": 27, + "execution_count": 26, "id": "7e53d776-99da-4d2c-a2a7-bd7ce27bff4c", "metadata": { "tags": [] @@ -1131,7 +1081,7 @@ }, { "cell_type": "code", - "execution_count": 28, + "execution_count": 27, "id": "d542734b-7582-4af7-8254-bda3de50d091", "metadata": { "tags": [] @@ -1155,7 +1105,7 @@ "True" ] }, - "execution_count": 28, + "execution_count": 27, "metadata": {}, "output_type": "execute_result" } @@ -1166,7 +1116,7 @@ }, { "cell_type": "code", - "execution_count": 29, + "execution_count": 28, "id": "d78e9fe3-02c6-4792-944f-5622e26e0412", "metadata": { "tags": [] diff --git a/src/primaite/simulator/network/hardware/nodes/host/host_node.py b/src/primaite/simulator/network/hardware/nodes/host/host_node.py index 9d08b9f4..e354d96a 100644 --- a/src/primaite/simulator/network/hardware/nodes/host/host_node.py +++ b/src/primaite/simulator/network/hardware/nodes/host/host_node.py @@ -318,6 +318,12 @@ class HostNode(Node): @property def arp(self) -> Optional[ARP]: + """ + Return the ARP Cache of the HostNode + + :return: ARP Cache for given HostNode + :rtype: Optional[ARP] + """ return self.software_manager.software.get("ARP") def _install_system_software(self): diff --git a/src/primaite/simulator/network/hardware/nodes/network/network_node.py b/src/primaite/simulator/network/hardware/nodes/network/network_node.py index a3dc3be3..d9304f4d 100644 --- a/src/primaite/simulator/network/hardware/nodes/network/network_node.py +++ b/src/primaite/simulator/network/hardware/nodes/network/network_node.py @@ -32,4 +32,10 @@ class NetworkNode(Node): @property def arp(self) -> Optional[ARP]: + """ + Return the ARP Cache of the NetworkNode + + :return: ARP Cache for given NetworkNode + :rtype: Optional[ARP] + """ return self.software_manager.software.get("ARP") From d02b12d1e56e4bff4c9d37b1cf937a0348262153 Mon Sep 17 00:00:00 2001 From: Charlie Crane Date: Tue, 9 Apr 2024 13:45:27 +0100 Subject: [PATCH 096/124] #2453 Addressing some flake8 corrections --- src/primaite/simulator/network/hardware/nodes/host/host_node.py | 2 +- .../simulator/network/hardware/nodes/network/network_node.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/primaite/simulator/network/hardware/nodes/host/host_node.py b/src/primaite/simulator/network/hardware/nodes/host/host_node.py index e354d96a..6eb88131 100644 --- a/src/primaite/simulator/network/hardware/nodes/host/host_node.py +++ b/src/primaite/simulator/network/hardware/nodes/host/host_node.py @@ -319,7 +319,7 @@ class HostNode(Node): @property def arp(self) -> Optional[ARP]: """ - Return the ARP Cache of the HostNode + Return the ARP Cache of the HostNode. :return: ARP Cache for given HostNode :rtype: Optional[ARP] diff --git a/src/primaite/simulator/network/hardware/nodes/network/network_node.py b/src/primaite/simulator/network/hardware/nodes/network/network_node.py index d9304f4d..89b3d80f 100644 --- a/src/primaite/simulator/network/hardware/nodes/network/network_node.py +++ b/src/primaite/simulator/network/hardware/nodes/network/network_node.py @@ -33,7 +33,7 @@ class NetworkNode(Node): @property def arp(self) -> Optional[ARP]: """ - Return the ARP Cache of the NetworkNode + Return the ARP Cache of the NetworkNode. :return: ARP Cache for given NetworkNode :rtype: Optional[ARP] From 8e6689d881333648668127dc21f69b9deba504dc Mon Sep 17 00:00:00 2001 From: Charlie Crane Date: Tue, 9 Apr 2024 13:56:21 +0100 Subject: [PATCH 097/124] #2453 - Corrected flake8 linting errors ahead of creating PR, after finally managing to get it to run locally. This should now be ready for review --- .../simulator/network/hardware/nodes/host/host_node.py | 2 +- .../simulator/network/hardware/nodes/network/network_node.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/primaite/simulator/network/hardware/nodes/host/host_node.py b/src/primaite/simulator/network/hardware/nodes/host/host_node.py index 6eb88131..8928e8ef 100644 --- a/src/primaite/simulator/network/hardware/nodes/host/host_node.py +++ b/src/primaite/simulator/network/hardware/nodes/host/host_node.py @@ -322,7 +322,7 @@ class HostNode(Node): Return the ARP Cache of the HostNode. :return: ARP Cache for given HostNode - :rtype: Optional[ARP] + :rtype: Optional[ARP] """ return self.software_manager.software.get("ARP") diff --git a/src/primaite/simulator/network/hardware/nodes/network/network_node.py b/src/primaite/simulator/network/hardware/nodes/network/network_node.py index 89b3d80f..0474ca08 100644 --- a/src/primaite/simulator/network/hardware/nodes/network/network_node.py +++ b/src/primaite/simulator/network/hardware/nodes/network/network_node.py @@ -5,6 +5,7 @@ from primaite.simulator.network.hardware.base import NetworkInterface, Node from primaite.simulator.network.transmission.data_link_layer import Frame from primaite.simulator.system.services.arp.arp import ARP + class NetworkNode(Node): """ Represents an abstract base class for a network node that can receive and process network frames. @@ -36,6 +37,6 @@ class NetworkNode(Node): Return the ARP Cache of the NetworkNode. :return: ARP Cache for given NetworkNode - :rtype: Optional[ARP] + :rtype: Optional[ARP] """ return self.software_manager.software.get("ARP") From 265f25b442b48be46cc306b88d6c20a6b1c4d1a7 Mon Sep 17 00:00:00 2001 From: Charlie Crane Date: Tue, 9 Apr 2024 14:15:51 +0100 Subject: [PATCH 098/124] #2453 - One final typo correction found in network_simulator_demo.ipynb. Correcting switch.sys_log.show() to computer.sys_log.show() in Computer/Server Nodes section --- .../network_simulator_demo.ipynb | 608 ++---------------- 1 file changed, 55 insertions(+), 553 deletions(-) diff --git a/src/primaite/simulator/_package_data/network_simulator_demo.ipynb b/src/primaite/simulator/_package_data/network_simulator_demo.ipynb index 7a095b53..98dcaaac 100644 --- a/src/primaite/simulator/_package_data/network_simulator_demo.ipynb +++ b/src/primaite/simulator/_package_data/network_simulator_demo.ipynb @@ -59,7 +59,7 @@ }, { "cell_type": "code", - "execution_count": 1, + "execution_count": null, "id": "de57ac8c-5b28-4847-a759-2ceaf5593329", "metadata": { "tags": [] @@ -71,7 +71,7 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": null, "id": "a1e2e4df-67c0-4584-ab27-47e2c7c7fcd2", "metadata": { "tags": [] @@ -91,70 +91,12 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": null, "id": "cc199741-ef2e-47f5-b2f0-e20049ccf40f", "metadata": { "tags": [] }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "+------------------------------------------------+\n", - "| Nodes |\n", - "+-------------------+----------+-----------------+\n", - "| Node | Type | Operating State |\n", - "+-------------------+----------+-----------------+\n", - "| router_1 | Router | ON |\n", - "| switch_1 | Switch | ON |\n", - "| switch_2 | Switch | ON |\n", - "| domain_controller | Server | ON |\n", - "| database_server | Server | ON |\n", - "| web_server | Server | ON |\n", - "| backup_server | Server | ON |\n", - "| security_suite | Server | ON |\n", - "| client_1 | Computer | ON |\n", - "| client_2 | Computer | ON |\n", - "+-------------------+----------+-----------------+\n", - "+-----------------------------------------------------------------------------+\n", - "| IP Addresses |\n", - "+-------------------+------+----------------+---------------+-----------------+\n", - "| Node | Port | IP Address | Subnet Mask | Default Gateway |\n", - "+-------------------+------+----------------+---------------+-----------------+\n", - "| router_1 | 1 | 192.168.1.1 | 255.255.255.0 | None |\n", - "| router_1 | 2 | 192.168.10.1 | 255.255.255.0 | None |\n", - "| router_1 | 3 | 127.0.0.1 | 255.0.0.0 | None |\n", - "| router_1 | 4 | 127.0.0.1 | 255.0.0.0 | None |\n", - "| router_1 | 5 | 127.0.0.1 | 255.0.0.0 | None |\n", - "| domain_controller | 1 | 192.168.1.10 | 255.255.255.0 | 192.168.1.1 |\n", - "| database_server | 1 | 192.168.1.14 | 255.255.255.0 | 192.168.1.1 |\n", - "| web_server | 1 | 192.168.1.12 | 255.255.255.0 | 192.168.1.1 |\n", - "| backup_server | 1 | 192.168.1.16 | 255.255.255.0 | 192.168.1.1 |\n", - "| security_suite | 1 | 192.168.1.110 | 255.255.255.0 | 192.168.1.1 |\n", - "| security_suite | 2 | 192.168.10.110 | 255.255.255.0 | 192.168.1.1 |\n", - "| client_1 | 1 | 192.168.10.21 | 255.255.255.0 | 192.168.10.1 |\n", - "| client_2 | 1 | 192.168.10.22 | 255.255.255.0 | 192.168.10.1 |\n", - "+-------------------+------+----------------+---------------+-----------------+\n", - "+---------------------------------------------------------------------------------------------------------------------------------------------------------------+\n", - "| Links |\n", - "+------------+----------------------------------------+-------------------+------------------------------------------+-------+-------------------+--------------+\n", - "| Endpoint A | A Port | Endpoint B | B Port | is Up | Bandwidth (MBits) | Current Load |\n", - "+------------+----------------------------------------+-------------------+------------------------------------------+-------+-------------------+--------------+\n", - "| router_1 | Port 2: 6e:3e:9f:58:c3:f8/192.168.10.1 | switch_2 | Port 8: 00:a7:49:9f:b7:40 | True | 100.0 | 0.00006% |\n", - "| router_1 | Port 1: 7c:0a:49:bd:2d:5f/192.168.1.1 | switch_1 | Port 8: e6:5e:9e:61:f6:71 | True | 100.0 | 0.00018% |\n", - "| switch_1 | Port 7: 8c:96:32:d5:ef:4b | security_suite | Port 1: 92:17:67:5f:09:f0/192.168.1.110 | True | 100.0 | 0.00003% |\n", - "| switch_1 | Port 4: ef:da:44:ee:68:1d | backup_server | Port 1: 82:23:ff:c5:03:45/192.168.1.16 | True | 100.0 | 0.00003% |\n", - "| switch_1 | Port 2: ab:84:4b:96:bc:b6 | web_server | Port 1: 30:3c:b4:54:b2:ef/192.168.1.12 | True | 100.0 | 0.00015% |\n", - "| switch_1 | Port 3: d8:07:d0:d6:27:52 | database_server | Port 1: 7c:cd:b5:ba:46:33/192.168.1.14 | True | 100.0 | 0.00017% |\n", - "| switch_1 | Port 1: e0:06:93:2c:45:cf | domain_controller | Port 1: 6d:3e:3e:b3:f6:6f/192.168.1.10 | True | 100.0 | 0.00003% |\n", - "| switch_2 | Port 7: 4f:55:6c:c3:ff:e9 | security_suite | Port 2: 64:6f:aa:ba:cb:d0/192.168.10.110 | True | 100.0 | 0.00000% |\n", - "| switch_2 | Port 2: f7:42:43:63:75:c9 | client_2 | Port 1: 21:bb:1b:75:02:fb/192.168.10.22 | True | 100.0 | 0.00003% |\n", - "| switch_2 | Port 1: 45:93:50:03:48:f5 | client_1 | Port 1: ca:f5:26:85:a7:54/192.168.10.21 | True | 100.0 | 0.00003% |\n", - "+------------+----------------------------------------+-------------------+------------------------------------------+-------+-------------------+--------------+\n" - ] - } - ], + "outputs": [], "source": [ "network.show()" ] @@ -191,30 +133,12 @@ }, { "cell_type": "code", - "execution_count": 4, + "execution_count": null, "id": "e76d1854-961e-438c-b40f-77fd9c3abe38", "metadata": { "tags": [] }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "+---------------------------------------------------------------+\n", - "| router_1 Network Interfaces |\n", - "+------+-------------------+-----------------+-------+----------+\n", - "| Port | MAC Address | Address | Speed | Status |\n", - "+------+-------------------+-----------------+-------+----------+\n", - "| 1 | 7c:0a:49:bd:2d:5f | 192.168.1.1/24 | 100 | Enabled |\n", - "| 2 | 6e:3e:9f:58:c3:f8 | 192.168.10.1/24 | 100 | Enabled |\n", - "| 3 | 44:c9:4c:25:4c:9b | 127.0.0.1/8 | 100 | Disabled |\n", - "| 4 | 4a:99:e4:a0:87:ba | 127.0.0.1/8 | 100 | Disabled |\n", - "| 5 | ca:5c:3b:6e:52:ef | 127.0.0.1/8 | 100 | Disabled |\n", - "+------+-------------------+-----------------+-------+----------+\n" - ] - } - ], + "outputs": [], "source": [ "network.get_node_by_hostname(\"router_1\").show()" ] @@ -229,32 +153,12 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": null, "id": "92de8b42-92d7-4934-9c12-50bf724c9eb2", "metadata": { "tags": [] }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "+-------------------------------------------------------+\n", - "| router_1 ARP Cache |\n", - "+---------------+-------------------+-------------------+\n", - "| IP Address | MAC Address | Via |\n", - "+---------------+-------------------+-------------------+\n", - "| 192.168.10.21 | ca:f5:26:85:a7:54 | 6e:3e:9f:58:c3:f8 |\n", - "| 192.168.10.22 | 21:bb:1b:75:02:fb | 6e:3e:9f:58:c3:f8 |\n", - "| 192.168.1.10 | 6d:3e:3e:b3:f6:6f | 7c:0a:49:bd:2d:5f |\n", - "| 192.168.1.14 | 7c:cd:b5:ba:46:33 | 7c:0a:49:bd:2d:5f |\n", - "| 192.168.1.12 | 30:3c:b4:54:b2:ef | 7c:0a:49:bd:2d:5f |\n", - "| 192.168.1.16 | 82:23:ff:c5:03:45 | 7c:0a:49:bd:2d:5f |\n", - "| 192.168.1.110 | 92:17:67:5f:09:f0 | 7c:0a:49:bd:2d:5f |\n", - "+---------------+-------------------+-------------------+\n" - ] - } - ], + "outputs": [], "source": [ "network.get_node_by_hostname(\"router_1\").arp.show()" ] @@ -269,32 +173,12 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": null, "id": "5922282a-d22b-4e55-9176-f3f3654c849f", "metadata": { "tags": [] }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "+---------------------------------------------------------------------------------------------------------------------------------------+\n", - "| router_1 Access Control List |\n", - "+-------+--------+----------+--------+--------------+------------------------+--------+--------------+------------------------+---------+\n", - "| Index | Action | Protocol | Src IP | Src Wildcard | Src Port | Dst IP | Dst Wildcard | Dst Port | Matched |\n", - "+-------+--------+----------+--------+--------------+------------------------+--------+--------------+------------------------+---------+\n", - "| 0 | PERMIT | ANY | ANY | ANY | 5432 (POSTGRES_SERVER) | ANY | ANY | 5432 (POSTGRES_SERVER) | 0 |\n", - "| 1 | PERMIT | ANY | ANY | ANY | 53 (DNS) | ANY | ANY | 53 (DNS) | 0 |\n", - "| 2 | PERMIT | ANY | ANY | ANY | 21 (FTP) | ANY | ANY | 21 (FTP) | 0 |\n", - "| 3 | PERMIT | ANY | ANY | ANY | 80 (HTTP) | ANY | ANY | 80 (HTTP) | 0 |\n", - "| 22 | PERMIT | ANY | ANY | ANY | 219 (ARP) | ANY | ANY | 219 (ARP) | 0 |\n", - "| 23 | PERMIT | ICMP | ANY | ANY | ANY | ANY | ANY | ANY | 0 |\n", - "| 24 | DENY | ANY | ANY | ANY | ANY | ANY | ANY | ANY | 0 |\n", - "+-------+--------+----------+--------+--------------+------------------------+--------+--------------+------------------------+---------+\n" - ] - } - ], + "outputs": [], "source": [ "network.get_node_by_hostname(\"router_1\").acl.show()" ] @@ -309,25 +193,12 @@ }, { "cell_type": "code", - "execution_count": 7, + "execution_count": null, "id": "327203be-f475-4727-82a1-e992d3b70ed8", "metadata": { "tags": [] }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "+-------------------------------------+\n", - "| router_1 Route Table |\n", - "+-------+---------+----------+--------+\n", - "| Index | Address | Next Hop | Metric |\n", - "+-------+---------+----------+--------+\n", - "+-------+---------+----------+--------+\n" - ] - } - ], + "outputs": [], "source": [ "network.get_node_by_hostname(\"router_1\").route_table.show()" ] @@ -342,25 +213,12 @@ }, { "cell_type": "code", - "execution_count": 8, + "execution_count": null, "id": "3d0aa004-b10c-445f-aaab-340e0e716c74", "metadata": { "tags": [] }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "+-----------------------------+\n", - "| router_1 Sys Log |\n", - "+-----------+-------+---------+\n", - "| Timestamp | Level | Message |\n", - "+-----------+-------+---------+\n", - "+-----------+-------+---------+\n" - ] - } - ], + "outputs": [], "source": [ "network.get_node_by_hostname(\"router_1\").sys_log.show(last_n=10)" ] @@ -385,33 +243,12 @@ }, { "cell_type": "code", - "execution_count": 9, + "execution_count": null, "id": "e7fd439b-5442-4e9d-9e7d-86dacb77f458", "metadata": { "tags": [] }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "+---------------------------------------------+\n", - "| switch_1 Switch Ports |\n", - "+------+-------------------+-------+----------+\n", - "| Port | MAC Address | Speed | Status |\n", - "+------+-------------------+-------+----------+\n", - "| 1 | e0:06:93:2c:45:cf | 100 | Enabled |\n", - "| 2 | ab:84:4b:96:bc:b6 | 100 | Enabled |\n", - "| 3 | d8:07:d0:d6:27:52 | 100 | Enabled |\n", - "| 4 | ef:da:44:ee:68:1d | 100 | Enabled |\n", - "| 5 | b6:76:3d:1d:7e:be | 100 | Disabled |\n", - "| 6 | 02:ce:fa:da:9a:a4 | 100 | Disabled |\n", - "| 7 | 8c:96:32:d5:ef:4b | 100 | Enabled |\n", - "| 8 | e6:5e:9e:61:f6:71 | 100 | Enabled |\n", - "+------+-------------------+-------+----------+\n" - ] - } - ], + "outputs": [], "source": [ "network.get_node_by_hostname(\"switch_1\").show()" ] @@ -426,25 +263,12 @@ }, { "cell_type": "code", - "execution_count": 10, + "execution_count": null, "id": "a0d984b7-a7c1-4bbd-aa5a-9d3caecb08dc", "metadata": { "tags": [] }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "+-----------------------------+\n", - "| switch_1 Sys Log |\n", - "+-----------+-------+---------+\n", - "| Timestamp | Level | Message |\n", - "+-----------+-------+---------+\n", - "+-----------+-------+---------+\n" - ] - } - ], + "outputs": [], "source": [ "network.get_node_by_hostname(\"switch_1\").sys_log.show()" ] @@ -471,38 +295,12 @@ }, { "cell_type": "code", - "execution_count": 11, + "execution_count": null, "id": "656c37f6-b145-42af-9714-8d2886d0eff8", "metadata": { "tags": [] }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "+-----------------------------------------------------------------------+\n", - "| security_suite Network Interface Cards |\n", - "+------+------+-------------------+-------------------+-------+---------+\n", - "| Port | Type | MAC Address | Address | Speed | Status |\n", - "+------+------+-------------------+-------------------+-------+---------+\n", - "| 1 | NIC | 92:17:67:5f:09:f0 | 192.168.1.110/24 | 100 | Enabled |\n", - "| 2 | NIC | 64:6f:aa:ba:cb:d0 | 192.168.10.110/24 | 100 | Enabled |\n", - "+------+------+-------------------+-------------------+-------+---------+\n", - "+---------------------------+\n", - "| security_suite Open Ports |\n", - "+-------------+-------------+\n", - "| Port | Name |\n", - "+-------------+-------------+\n", - "| 21 | FTP |\n", - "| 53 | DNS |\n", - "| 80 | HTTP |\n", - "| 123 | NTP |\n", - "| 219 | ARP |\n", - "+-------------+-------------+\n" - ] - } - ], + "outputs": [], "source": [ "network.get_node_by_hostname(\"security_suite\").show()" ] @@ -517,26 +315,12 @@ }, { "cell_type": "code", - "execution_count": 12, + "execution_count": null, "id": "66b267d6-2308-486a-b9aa-cb8d3bcf0753", "metadata": { "tags": [] }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "+-----------------------------------------------------+\n", - "| security_suite ARP Cache |\n", - "+-------------+-------------------+-------------------+\n", - "| IP Address | MAC Address | Via |\n", - "+-------------+-------------------+-------------------+\n", - "| 192.168.1.1 | 7c:0a:49:bd:2d:5f | 92:17:67:5f:09:f0 |\n", - "+-------------+-------------------+-------------------+\n" - ] - } - ], + "outputs": [], "source": [ "network.get_node_by_hostname(\"security_suite\").arp.show()" ] @@ -546,30 +330,17 @@ "id": "0d1fcad8-5b1a-4d8b-a49f-aa54a95fcaf0", "metadata": {}, "source": [ - "Calling `switch.sys_log.show()` displays the Computer/Server system log. By default, only the last 10 log entries are displayed, this can be changed by passing `last_n=`." + "Calling `computer.sys_log.show()` displays the Computer/Server system log. By default, only the last 10 log entries are displayed, this can be changed by passing `last_n=`." ] }, { "cell_type": "code", - "execution_count": 13, + "execution_count": null, "id": "1b5debe8-ef1b-445d-8fa9-6a45568f21f3", "metadata": { "tags": [] }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "+-----------------------------+\n", - "| security_suite Sys Log |\n", - "+-----------+-------+---------+\n", - "| Timestamp | Level | Message |\n", - "+-----------+-------+---------+\n", - "+-----------+-------+---------+\n" - ] - } - ], + "outputs": [], "source": [ "network.get_node_by_hostname(\"security_suite\").sys_log.show()" ] @@ -586,38 +357,12 @@ }, { "cell_type": "code", - "execution_count": 14, + "execution_count": null, "id": "495b7de4-b6ce-41a6-9114-f74752ab4491", "metadata": { "tags": [] }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "+-----------------------------------------------------------------------------+\n", - "| IP Addresses |\n", - "+-------------------+------+----------------+---------------+-----------------+\n", - "| Node | Port | IP Address | Subnet Mask | Default Gateway |\n", - "+-------------------+------+----------------+---------------+-----------------+\n", - "| router_1 | 1 | 192.168.1.1 | 255.255.255.0 | None |\n", - "| router_1 | 2 | 192.168.10.1 | 255.255.255.0 | None |\n", - "| router_1 | 3 | 127.0.0.1 | 255.0.0.0 | None |\n", - "| router_1 | 4 | 127.0.0.1 | 255.0.0.0 | None |\n", - "| router_1 | 5 | 127.0.0.1 | 255.0.0.0 | None |\n", - "| domain_controller | 1 | 192.168.1.10 | 255.255.255.0 | 192.168.1.1 |\n", - "| database_server | 1 | 192.168.1.14 | 255.255.255.0 | 192.168.1.1 |\n", - "| web_server | 1 | 192.168.1.12 | 255.255.255.0 | 192.168.1.1 |\n", - "| backup_server | 1 | 192.168.1.16 | 255.255.255.0 | 192.168.1.1 |\n", - "| security_suite | 1 | 192.168.1.110 | 255.255.255.0 | 192.168.1.1 |\n", - "| security_suite | 2 | 192.168.10.110 | 255.255.255.0 | 192.168.1.1 |\n", - "| client_1 | 1 | 192.168.10.21 | 255.255.255.0 | 192.168.10.1 |\n", - "| client_2 | 1 | 192.168.10.22 | 255.255.255.0 | 192.168.10.1 |\n", - "+-------------------+------+----------------+---------------+-----------------+\n" - ] - } - ], + "outputs": [], "source": [ "network.show(nodes=False, links=False)" ] @@ -632,60 +377,24 @@ }, { "cell_type": "code", - "execution_count": 15, + "execution_count": null, "id": "a38abb71-994e-49e8-8f51-e9a550e95b99", "metadata": { "tags": [] }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Pinging 192.168.10.1:\n", - "Reply from 192.168.10.1: bytes=32, time=<1ms, TTL=62\n", - "Reply from 192.168.10.1: bytes=32, time=<1ms, TTL=62\n", - "Reply from 192.168.10.1: bytes=32, time=<1ms, TTL=62\n", - "Reply from 192.168.10.1: bytes=32, time=<1ms, TTL=62\n", - "Ping statistics for 192.168.10.1: Packets: Sent = 4, Received = 4, Lost = 0 (0.0% loss)\n" - ] - }, - { - "data": { - "text/plain": [ - "True" - ] - }, - "execution_count": 15, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "network.get_node_by_hostname(\"client_1\").ping(\"192.168.10.1\")" ] }, { "cell_type": "code", - "execution_count": 16, + "execution_count": null, "id": "8388e1e9-30e3-4534-8e5a-c6e9144149d2", "metadata": { "tags": [] }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "+-----------------------------+\n", - "| client_1 Sys Log |\n", - "+-----------+-------+---------+\n", - "| Timestamp | Level | Message |\n", - "+-----------+-------+---------+\n", - "+-----------+-------+---------+\n" - ] - } - ], + "outputs": [], "source": [ "network.get_node_by_hostname(\"client_1\").sys_log.show(15)" ] @@ -700,35 +409,12 @@ }, { "cell_type": "code", - "execution_count": 17, + "execution_count": null, "id": "ff8e976a-c16b-470c-8923-325713a30d6c", "metadata": { "tags": [] }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Pinging 192.168.1.1:\n", - "Reply from 192.168.10.1: bytes=32, time=<1ms, TTL=62\n", - "Reply from 192.168.10.1: bytes=32, time=<1ms, TTL=62\n", - "Reply from 192.168.10.1: bytes=32, time=<1ms, TTL=62\n", - "Reply from 192.168.10.1: bytes=32, time=<1ms, TTL=62\n", - "Ping statistics for 192.168.1.1: Packets: Sent = 4, Received = 4, Lost = 0 (0.0% loss)\n" - ] - }, - { - "data": { - "text/plain": [ - "True" - ] - }, - "execution_count": 17, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "network.get_node_by_hostname(\"client_1\").ping(\"192.168.1.1\")" ] @@ -743,35 +429,12 @@ }, { "cell_type": "code", - "execution_count": 18, + "execution_count": null, "id": "c4163f8d-6a72-410c-9f5c-4f881b7de45e", "metadata": { "tags": [] }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Pinging 192.168.1.12:\n", - "Reply from 192.168.1.12: bytes=32, time=<1ms, TTL=59\n", - "Reply from 192.168.1.12: bytes=32, time=<1ms, TTL=59\n", - "Reply from 192.168.1.12: bytes=32, time=<1ms, TTL=59\n", - "Reply from 192.168.1.12: bytes=32, time=<1ms, TTL=59\n", - "Ping statistics for 192.168.1.12: Packets: Sent = 4, Received = 4, Lost = 0 (0.0% loss)\n" - ] - }, - { - "data": { - "text/plain": [ - "True" - ] - }, - "execution_count": 18, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "network.get_node_by_hostname(\"client_1\").ping(\"192.168.1.12\")" ] @@ -786,25 +449,12 @@ }, { "cell_type": "code", - "execution_count": 19, + "execution_count": null, "id": "e79a523a-5780-45b6-8798-c434e0e522bd", "metadata": { "tags": [] }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "+-----------------------------+\n", - "| web_server Sys Log |\n", - "+-----------+-------+---------+\n", - "| Timestamp | Level | Message |\n", - "+-----------+-------+---------+\n", - "+-----------+-------+---------+\n" - ] - } - ], + "outputs": [], "source": [ "network.get_node_by_hostname(\"web_server\").sys_log.show()" ] @@ -829,35 +479,12 @@ }, { "cell_type": "code", - "execution_count": 20, + "execution_count": null, "id": "603cf913-e261-49da-a7dd-85e1bb6dec56", "metadata": { "tags": [] }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Pinging 192.168.1.12:\n", - "Reply from 192.168.1.12: bytes=32, time=<1ms, TTL=59\n", - "Reply from 192.168.1.12: bytes=32, time=<1ms, TTL=59\n", - "Reply from 192.168.1.12: bytes=32, time=<1ms, TTL=59\n", - "Reply from 192.168.1.12: bytes=32, time=<1ms, TTL=59\n", - "Ping statistics for 192.168.1.12: Packets: Sent = 4, Received = 4, Lost = 0 (0.0% loss)\n" - ] - }, - { - "data": { - "text/plain": [ - "True" - ] - }, - "execution_count": 20, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "network.get_node_by_hostname(\"client_2\").ping(\"192.168.1.12\")" ] @@ -872,25 +499,12 @@ }, { "cell_type": "code", - "execution_count": 21, + "execution_count": null, "id": "e047de00-3de4-4823-b26a-2c8d64c7a663", "metadata": { "tags": [] }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "+-----------------------------+\n", - "| client_2 Sys Log |\n", - "+-----------+-------+---------+\n", - "| Timestamp | Level | Message |\n", - "+-----------+-------+---------+\n", - "+-----------+-------+---------+\n" - ] - } - ], + "outputs": [], "source": [ "network.get_node_by_hostname(\"client_2\").sys_log.show()" ] @@ -905,23 +519,12 @@ }, { "cell_type": "code", - "execution_count": 22, + "execution_count": null, "id": "6db355ae-b99a-441b-a2c4-4ffe78f46bff", "metadata": { "tags": [] }, - "outputs": [ - { - "data": { - "text/plain": [ - "True" - ] - }, - "execution_count": 22, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "from primaite.simulator.network.transmission.network_layer import IPProtocol\n", "from primaite.simulator.network.transmission.transport_layer import Port\n", @@ -936,32 +539,12 @@ }, { "cell_type": "code", - "execution_count": 23, + "execution_count": null, "id": "a345e000-8842-4827-af96-adc0fbe390fb", "metadata": { "tags": [] }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "+----------------------------------------------------------------------------------------------------------------------------------------------+\n", - "| router_1 Access Control List |\n", - "+-------+--------+----------+---------------+--------------+------------------------+--------+--------------+------------------------+---------+\n", - "| Index | Action | Protocol | Src IP | Src Wildcard | Src Port | Dst IP | Dst Wildcard | Dst Port | Matched |\n", - "+-------+--------+----------+---------------+--------------+------------------------+--------+--------------+------------------------+---------+\n", - "| 0 | PERMIT | ANY | ANY | ANY | 5432 (POSTGRES_SERVER) | ANY | ANY | 5432 (POSTGRES_SERVER) | 0 |\n", - "| 1 | DENY | ICMP | 192.168.10.22 | ANY | ANY | ANY | ANY | ANY | 0 |\n", - "| 2 | PERMIT | ANY | ANY | ANY | 21 (FTP) | ANY | ANY | 21 (FTP) | 0 |\n", - "| 3 | PERMIT | ANY | ANY | ANY | 80 (HTTP) | ANY | ANY | 80 (HTTP) | 0 |\n", - "| 22 | PERMIT | ANY | ANY | ANY | 219 (ARP) | ANY | ANY | 219 (ARP) | 0 |\n", - "| 23 | PERMIT | ICMP | ANY | ANY | ANY | ANY | ANY | ANY | 24 |\n", - "| 24 | DENY | ANY | ANY | ANY | ANY | ANY | ANY | ANY | 0 |\n", - "+-------+--------+----------+---------------+--------------+------------------------+--------+--------------+------------------------+---------+\n" - ] - } - ], + "outputs": [], "source": [ "network.get_node_by_hostname(\"router_1\").acl.show()" ] @@ -976,31 +559,12 @@ }, { "cell_type": "code", - "execution_count": 24, + "execution_count": null, "id": "a4f4ff31-590f-40fb-b13d-efaa8c2720b6", "metadata": { "tags": [] }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Pinging 192.168.1.12:\n", - "Ping statistics for 192.168.1.12: Packets: Sent = 4, Received = 0, Lost = 4 (100.0% loss)\n" - ] - }, - { - "data": { - "text/plain": [ - "False" - ] - }, - "execution_count": 24, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "network.get_node_by_hostname(\"client_2\").ping(\"192.168.1.12\")" ] @@ -1015,25 +579,12 @@ }, { "cell_type": "code", - "execution_count": 25, + "execution_count": null, "id": "f62b8a4e-fd3b-4059-b108-3d4a0b18f2a0", "metadata": { "tags": [] }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "+-----------------------------+\n", - "| client_2 Sys Log |\n", - "+-----------+-------+---------+\n", - "| Timestamp | Level | Message |\n", - "+-----------+-------+---------+\n", - "+-----------+-------+---------+\n" - ] - } - ], + "outputs": [], "source": [ "network.get_node_by_hostname(\"client_2\").sys_log.show()" ] @@ -1048,25 +599,12 @@ }, { "cell_type": "code", - "execution_count": 26, + "execution_count": null, "id": "7e53d776-99da-4d2c-a2a7-bd7ce27bff4c", "metadata": { "tags": [] }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "+-----------------------------+\n", - "| router_1 Sys Log |\n", - "+-----------+-------+---------+\n", - "| Timestamp | Level | Message |\n", - "+-----------+-------+---------+\n", - "+-----------+-------+---------+\n" - ] - } - ], + "outputs": [], "source": [ "network.get_node_by_hostname(\"router_1\").sys_log.show()" ] @@ -1081,60 +619,24 @@ }, { "cell_type": "code", - "execution_count": 27, + "execution_count": null, "id": "d542734b-7582-4af7-8254-bda3de50d091", "metadata": { "tags": [] }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Pinging 192.168.1.12:\n", - "Reply from 192.168.1.12: bytes=32, time=<1ms, TTL=59\n", - "Reply from 192.168.1.12: bytes=32, time=<1ms, TTL=59\n", - "Reply from 192.168.1.12: bytes=32, time=<1ms, TTL=59\n", - "Reply from 192.168.1.12: bytes=32, time=<1ms, TTL=59\n", - "Ping statistics for 192.168.1.12: Packets: Sent = 4, Received = 4, Lost = 0 (0.0% loss)\n" - ] - }, - { - "data": { - "text/plain": [ - "True" - ] - }, - "execution_count": 27, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "network.get_node_by_hostname(\"client_1\").ping(\"192.168.1.12\")" ] }, { "cell_type": "code", - "execution_count": 28, + "execution_count": null, "id": "d78e9fe3-02c6-4792-944f-5622e26e0412", "metadata": { "tags": [] }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "+-----------------------------+\n", - "| client_1 Sys Log |\n", - "+-----------+-------+---------+\n", - "| Timestamp | Level | Message |\n", - "+-----------+-------+---------+\n", - "+-----------+-------+---------+\n" - ] - } - ], + "outputs": [], "source": [ "network.get_node_by_hostname(\"client_1\").sys_log.show()" ] From 89de5a298d9e18798710837e7b7edd58331ef59c Mon Sep 17 00:00:00 2001 From: Nick Todd Date: Tue, 9 Apr 2024 14:47:31 +0100 Subject: [PATCH 099/124] #2455: Fix typo in config file and notebook --- src/primaite/config/_package_data/data_manipulation_marl.yaml | 2 +- .../notebooks/Data-Manipulation-Customising-Red-Agent.ipynb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/primaite/config/_package_data/data_manipulation_marl.yaml b/src/primaite/config/_package_data/data_manipulation_marl.yaml index 653ddfd3..deb43eea 100644 --- a/src/primaite/config/_package_data/data_manipulation_marl.yaml +++ b/src/primaite/config/_package_data/data_manipulation_marl.yaml @@ -1476,7 +1476,7 @@ simulation: options: db_server_ip: 192.168.1.14 services: - - ty DNSClient + - type: DNSClient diff --git a/src/primaite/notebooks/Data-Manipulation-Customising-Red-Agent.ipynb b/src/primaite/notebooks/Data-Manipulation-Customising-Red-Agent.ipynb index 56e9bf5a..74a1e0ef 100644 --- a/src/primaite/notebooks/Data-Manipulation-Customising-Red-Agent.ipynb +++ b/src/primaite/notebooks/Data-Manipulation-Customising-Red-Agent.ipynb @@ -362,7 +362,7 @@ " cfg = yaml.safe_load(f)\n", " cfg['simulation']['network']\n", " for node in cfg['simulation']['network']['nodes']:\n", - " if node['ref'] in ['client_1', 'client_2']:\n", + " if node['hostname'] in ['client_1', 'client_2']:\n", " node['applications'] = change['applications']\n", "\n", "env = PrimaiteGymEnv(game_config = cfg)\n", @@ -407,7 +407,7 @@ " cfg = yaml.safe_load(f)\n", " cfg['simulation']['network']\n", " for node in cfg['simulation']['network']['nodes']:\n", - " if node['ref'] in ['client_1', 'client_2']:\n", + " if node['hostname'] in ['client_1', 'client_2']:\n", " node['applications'] = change['applications']\n", "\n", "env = PrimaiteGymEnv(game_config = cfg)\n", From 3245c7e81eec7c41991a5f404f8efa441f0ad401 Mon Sep 17 00:00:00 2001 From: Charlie Crane Date: Tue, 9 Apr 2024 14:48:49 +0100 Subject: [PATCH 100/124] #2453 - Renaming Server hostname in create-simulation_demo and removing saved output --- .../create-simulation_demo.ipynb | 580 +----------------- 1 file changed, 23 insertions(+), 557 deletions(-) diff --git a/src/primaite/simulator/_package_data/create-simulation_demo.ipynb b/src/primaite/simulator/_package_data/create-simulation_demo.ipynb index 5ef31243..756a48fc 100644 --- a/src/primaite/simulator/_package_data/create-simulation_demo.ipynb +++ b/src/primaite/simulator/_package_data/create-simulation_demo.ipynb @@ -18,7 +18,7 @@ }, { "cell_type": "code", - "execution_count": 1, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -36,24 +36,9 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "{'uuid': '91c88b2a-caf1-47be-a394-d0c22e5110be',\n", - " 'network': {'uuid': 'a9121808-0401-460c-9833-23d4ba91e9bc',\n", - " 'nodes': {},\n", - " 'links': {}},\n", - " 'domain': {'uuid': '25fbe0e9-76e8-4fd7-ad22-da2d2b5a509d', 'accounts': {}}}" - ] - }, - "execution_count": 2, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "my_sim = Simulation()\n", "net = my_sim.network\n", @@ -69,7 +54,7 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -79,13 +64,13 @@ }, { "cell_type": "code", - "execution_count": 4, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ - "my_pc = Computer(hostname=\"primaite_pc\", ip_address=\"192.168.1.10\", subnet_mask=\"255.255.255.0\")\n", + "my_pc = Computer(hostname=\"Computer\", ip_address=\"192.168.1.10\", subnet_mask=\"255.255.255.0\")\n", "net.add_node(my_pc)\n", - "my_server = Server(hostname=\"google_server\", ip_address=\"192.168.1.11\", subnet_mask=\"255.255.255.0\")\n", + "my_server = Server(hostname=\"Server\", ip_address=\"192.168.1.11\", subnet_mask=\"255.255.255.0\")\n", "net.add_node(my_server)\n" ] }, @@ -98,7 +83,7 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -108,20 +93,9 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "Link(uuid='2bd19485-0a6b-4878-978b-b082a672d9b9', endpoint_a=NIC(ip_address=IPv4Address('130.1.1.2'), subnet_mask=IPv4Address('255.255.255.0'), uuid='8a628493-83fb-44bf-a1b0-ef19e362ae5f', mac_address='44:89:a5:ce:7f:6f', speed=100, mtu=1500, enabled=False, port_num=2, port_name=None, pcap=None, nmne={}, wake_on_lan=False, gateway='130.1.1.255'), endpoint_b=SwitchPort(uuid='a049bb8f-53d3-4575-b325-dfb55516edcd', mac_address='aa:45:88:e1:13:e5', speed=100, mtu=1500, enabled=False, port_num=2, port_name=None, pcap=None, nmne={}), bandwidth=100.0, current_load=0.0)" - ] - }, - "execution_count": 6, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "my_switch = Switch(hostname=\"switch1\", num_ports=12)\n", "net.add_node(my_switch)\n", @@ -145,7 +119,7 @@ }, { "cell_type": "code", - "execution_count": 7, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -156,7 +130,7 @@ }, { "cell_type": "code", - "execution_count": 8, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -166,20 +140,9 @@ }, { "cell_type": "code", - "execution_count": 9, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "File(uuid='3ceeded4-77b9-4a86-949c-73188d5f4c34', name='favicon.ico', health_status=, visible_health_status=, previous_hash=None, revealed_to_red=False, sys_log=, deleted=False, folder_id='cbbd3631-a915-400d-bc02-f31f72447ce5', folder_name='root', file_type=, sim_size=0, real=False, sim_path=None, sim_root=WindowsPath('C:/Projects/PrimAITE/simulation_output/2024-04-09_13-24-30/google_server/fs'), num_access=0, folder=Folder(uuid='cbbd3631-a915-400d-bc02-f31f72447ce5', name='root', health_status=, visible_health_status=, previous_hash=None, revealed_to_red=False, sys_log=, deleted=False, files={'3ceeded4-77b9-4a86-949c-73188d5f4c34': File(uuid='3ceeded4-77b9-4a86-949c-73188d5f4c34', name='favicon.ico', health_status=, visible_health_status=, previous_hash=None, revealed_to_red=False, sys_log=, deleted=False, folder_id='cbbd3631-a915-400d-bc02-f31f72447ce5', folder_name='root', file_type=, sim_size=0, real=False, sim_path=None, sim_root=WindowsPath('C:/Projects/PrimAITE/simulation_output/2024-04-09_13-24-30/google_server/fs'), num_access=0, folder=Folder(uuid='cbbd3631-a915-400d-bc02-f31f72447ce5', name='root', health_status=, visible_health_status=, previous_hash=None, revealed_to_red=False, sys_log=, deleted=False, files={...}, deleted_files={}, scan_duration=3, scan_countdown=0, red_scan_duration=3, red_scan_countdown=0, restore_duration=3, restore_countdown=0))}, deleted_files={}, scan_duration=3, scan_countdown=0, red_scan_duration=3, red_scan_countdown=0, restore_duration=3, restore_countdown=0))" - ] - }, - "execution_count": 9, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "my_server_folder = my_server.file_system.create_folder(\"static\")\n", "my_server.file_system.create_file(\"favicon.ico\", file_type=FileType.PNG)" @@ -194,7 +157,7 @@ }, { "cell_type": "code", - "execution_count": 10, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -213,7 +176,7 @@ }, { "cell_type": "code", - "execution_count": 11, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -222,7 +185,7 @@ }, { "cell_type": "code", - "execution_count": 12, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -238,7 +201,7 @@ }, { "cell_type": "code", - "execution_count": 13, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -247,7 +210,7 @@ }, { "cell_type": "code", - "execution_count": 14, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -264,515 +227,18 @@ }, { "cell_type": "code", - "execution_count": 15, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "{'uuid': '91c88b2a-caf1-47be-a394-d0c22e5110be',\n", - " 'network': {'uuid': 'a9121808-0401-460c-9833-23d4ba91e9bc',\n", - " 'nodes': {'primaite_pc': {'uuid': 'dd0e95be-2491-4d5b-8388-df3975a19e8a',\n", - " 'hostname': 'primaite_pc',\n", - " 'operating_state': 2,\n", - " 'NICs': {1: {'uuid': '279e2645-b680-4d2e-b13c-66d5cfacbd38',\n", - " 'mac_address': 'bd:76:20:24:cf:04',\n", - " 'speed': 100,\n", - " 'mtu': 1500,\n", - " 'enabled': False,\n", - " 'nmne': {},\n", - " 'ip_address': '192.168.1.10',\n", - " 'subnet_mask': '255.255.255.0',\n", - " 'wake_on_lan': False},\n", - " 2: {'uuid': '40c0db02-4d14-4826-b49b-e6a521941cec',\n", - " 'mac_address': 'd8:b2:0c:af:3f:83',\n", - " 'speed': 100,\n", - " 'mtu': 1500,\n", - " 'enabled': False,\n", - " 'nmne': {},\n", - " 'ip_address': '130.1.1.1',\n", - " 'subnet_mask': '255.255.255.0',\n", - " 'wake_on_lan': False}},\n", - " 'file_system': {'uuid': '91d3aed7-53c6-471f-b903-9889396be280',\n", - " 'folders': {'root': {'uuid': '81bdc04e-9a0d-4306-9a9c-ee926fff6df8',\n", - " 'name': 'root',\n", - " 'health_status': 1,\n", - " 'visible_status': 1,\n", - " 'previous_hash': None,\n", - " 'revealed_to_red': False,\n", - " 'files': {},\n", - " 'deleted_files': {}},\n", - " 'downloads': {'uuid': '56abdf27-b8d4-42f4-9b09-b7912db1c4f3',\n", - " 'name': 'downloads',\n", - " 'health_status': 1,\n", - " 'visible_status': 1,\n", - " 'previous_hash': None,\n", - " 'revealed_to_red': False,\n", - " 'files': {'firefox_installer.zip': {'uuid': '02236b61-14bb-46aa-9fd5-7174c0d7d730',\n", - " 'name': 'firefox_installer.zip',\n", - " 'health_status': 1,\n", - " 'visible_status': 1,\n", - " 'previous_hash': None,\n", - " 'revealed_to_red': False,\n", - " 'size': 1024000,\n", - " 'file_type': 'ZIP',\n", - " 'num_access': 0}},\n", - " 'deleted_files': {}}},\n", - " 'deleted_folders': {},\n", - " 'num_file_creations': 0,\n", - " 'num_file_deletions': 0},\n", - " 'applications': {'WebBrowser': {'uuid': 'a6a12776-e307-4d71-9e7a-d9ca97ecd6b0',\n", - " 'health_state_actual': 0,\n", - " 'health_state_visible': 0,\n", - " 'criticality': 1,\n", - " 'fixing_count': 0,\n", - " 'scanning_count': 0,\n", - " 'revealed_to_red': False,\n", - " 'installing_count': 0,\n", - " 'max_sessions': 100,\n", - " 'tcp': True,\n", - " 'udp': True,\n", - " 'port': 80,\n", - " 'operating_state': 2,\n", - " 'execution_control_status': 'manual',\n", - " 'num_executions': 0,\n", - " 'groups': [],\n", - " 'history': []},\n", - " 'mspaint': {'uuid': 'efd34549-cc92-4474-80ab-5fb6c3159ff6',\n", - " 'health_state_actual': 1,\n", - " 'health_state_visible': 1,\n", - " 'criticality': 3,\n", - " 'fixing_count': 0,\n", - " 'scanning_count': 0,\n", - " 'revealed_to_red': False,\n", - " 'installing_count': 0,\n", - " 'max_sessions': 100,\n", - " 'tcp': True,\n", - " 'udp': True,\n", - " 'port': 80,\n", - " 'operating_state': 1,\n", - " 'execution_control_status': 'manual',\n", - " 'num_executions': 0,\n", - " 'groups': []}},\n", - " 'services': {'ARP': {'uuid': 'e61c25ff-a6c2-4eec-b031-131eaf33490c',\n", - " 'health_state_actual': 0,\n", - " 'health_state_visible': 0,\n", - " 'criticality': 1,\n", - " 'fixing_count': 0,\n", - " 'scanning_count': 0,\n", - " 'revealed_to_red': False,\n", - " 'installing_count': 0,\n", - " 'max_sessions': 100,\n", - " 'tcp': True,\n", - " 'udp': True,\n", - " 'port': 219,\n", - " 'operating_state': 2},\n", - " 'ICMP': {'uuid': '74debeed-b758-41cb-bea2-51ac283e6ae2',\n", - " 'health_state_actual': 0,\n", - " 'health_state_visible': 0,\n", - " 'criticality': 1,\n", - " 'fixing_count': 0,\n", - " 'scanning_count': 0,\n", - " 'revealed_to_red': False,\n", - " 'installing_count': 0,\n", - " 'max_sessions': 100,\n", - " 'tcp': True,\n", - " 'udp': True,\n", - " 'port': 0,\n", - " 'operating_state': 2},\n", - " 'DNSClient': {'uuid': '6680efc0-e005-41e8-bb49-39a0d9c4b118',\n", - " 'health_state_actual': 0,\n", - " 'health_state_visible': 0,\n", - " 'criticality': 1,\n", - " 'fixing_count': 0,\n", - " 'scanning_count': 0,\n", - " 'revealed_to_red': False,\n", - " 'installing_count': 0,\n", - " 'max_sessions': 100,\n", - " 'tcp': True,\n", - " 'udp': True,\n", - " 'port': 53,\n", - " 'operating_state': 2},\n", - " 'FTPClient': {'uuid': '21b05ac9-e9b4-4c5c-a812-f6748e14d8c3',\n", - " 'health_state_actual': 0,\n", - " 'health_state_visible': 0,\n", - " 'criticality': 1,\n", - " 'fixing_count': 0,\n", - " 'scanning_count': 0,\n", - " 'revealed_to_red': False,\n", - " 'installing_count': 0,\n", - " 'max_sessions': 100,\n", - " 'tcp': True,\n", - " 'udp': True,\n", - " 'port': 21,\n", - " 'operating_state': 2},\n", - " 'NTPClient': {'uuid': '7ab7c911-5037-4e82-b00c-be4f72c13aa7',\n", - " 'health_state_actual': 0,\n", - " 'health_state_visible': 0,\n", - " 'criticality': 1,\n", - " 'fixing_count': 0,\n", - " 'scanning_count': 0,\n", - " 'revealed_to_red': False,\n", - " 'installing_count': 0,\n", - " 'max_sessions': 100,\n", - " 'tcp': True,\n", - " 'udp': True,\n", - " 'port': 123,\n", - " 'operating_state': 2}},\n", - " 'process': {},\n", - " 'revealed_to_red': False},\n", - " 'google_server': {'uuid': '42d61d8d-2493-4b8a-944f-7962abc9d20b',\n", - " 'hostname': 'google_server',\n", - " 'operating_state': 2,\n", - " 'NICs': {1: {'uuid': 'e384a4fc-754f-44a4-9158-c63f72f52f76',\n", - " 'mac_address': 'ea:5d:4f:10:b2:27',\n", - " 'speed': 100,\n", - " 'mtu': 1500,\n", - " 'enabled': False,\n", - " 'nmne': {},\n", - " 'ip_address': '192.168.1.11',\n", - " 'subnet_mask': '255.255.255.0',\n", - " 'wake_on_lan': False},\n", - " 2: {'uuid': '8a628493-83fb-44bf-a1b0-ef19e362ae5f',\n", - " 'mac_address': '44:89:a5:ce:7f:6f',\n", - " 'speed': 100,\n", - " 'mtu': 1500,\n", - " 'enabled': False,\n", - " 'nmne': {},\n", - " 'ip_address': '130.1.1.2',\n", - " 'subnet_mask': '255.255.255.0',\n", - " 'wake_on_lan': False}},\n", - " 'file_system': {'uuid': 'f25cee1f-2ebe-4fd3-8d5c-649b0d342b61',\n", - " 'folders': {'root': {'uuid': 'cbbd3631-a915-400d-bc02-f31f72447ce5',\n", - " 'name': 'root',\n", - " 'health_status': 1,\n", - " 'visible_status': 1,\n", - " 'previous_hash': None,\n", - " 'revealed_to_red': False,\n", - " 'files': {'favicon.ico': {'uuid': '3ceeded4-77b9-4a86-949c-73188d5f4c34',\n", - " 'name': 'favicon.ico',\n", - " 'health_status': 1,\n", - " 'visible_status': 1,\n", - " 'previous_hash': None,\n", - " 'revealed_to_red': False,\n", - " 'size': 0,\n", - " 'file_type': 'UNKNOWN',\n", - " 'num_access': 0}},\n", - " 'deleted_files': {}},\n", - " 'static': {'uuid': 'd8241ce0-f55e-43ec-bd68-741b79a9a565',\n", - " 'name': 'static',\n", - " 'health_status': 1,\n", - " 'visible_status': 1,\n", - " 'previous_hash': None,\n", - " 'revealed_to_red': False,\n", - " 'files': {},\n", - " 'deleted_files': {}}},\n", - " 'deleted_folders': {},\n", - " 'num_file_creations': 1,\n", - " 'num_file_deletions': 0},\n", - " 'applications': {'WebBrowser': {'uuid': '957d0049-e703-4882-8e57-b2ab4c79d458',\n", - " 'health_state_actual': 0,\n", - " 'health_state_visible': 0,\n", - " 'criticality': 1,\n", - " 'fixing_count': 0,\n", - " 'scanning_count': 0,\n", - " 'revealed_to_red': False,\n", - " 'installing_count': 0,\n", - " 'max_sessions': 100,\n", - " 'tcp': True,\n", - " 'udp': True,\n", - " 'port': 80,\n", - " 'operating_state': 2,\n", - " 'execution_control_status': 'manual',\n", - " 'num_executions': 0,\n", - " 'groups': [],\n", - " 'history': []}},\n", - " 'services': {'ARP': {'uuid': '82ea1bcf-a0fe-418d-873e-5f075ebb4d3b',\n", - " 'health_state_actual': 0,\n", - " 'health_state_visible': 0,\n", - " 'criticality': 1,\n", - " 'fixing_count': 0,\n", - " 'scanning_count': 0,\n", - " 'revealed_to_red': False,\n", - " 'installing_count': 0,\n", - " 'max_sessions': 100,\n", - " 'tcp': True,\n", - " 'udp': True,\n", - " 'port': 219,\n", - " 'operating_state': 2},\n", - " 'ICMP': {'uuid': 'bc084dc4-0a7d-4954-9e6e-54bed797e837',\n", - " 'health_state_actual': 0,\n", - " 'health_state_visible': 0,\n", - " 'criticality': 1,\n", - " 'fixing_count': 0,\n", - " 'scanning_count': 0,\n", - " 'revealed_to_red': False,\n", - " 'installing_count': 0,\n", - " 'max_sessions': 100,\n", - " 'tcp': True,\n", - " 'udp': True,\n", - " 'port': 0,\n", - " 'operating_state': 2},\n", - " 'DNSClient': {'uuid': '5a9ecc18-71c0-4728-a9c6-e31b33529581',\n", - " 'health_state_actual': 0,\n", - " 'health_state_visible': 0,\n", - " 'criticality': 1,\n", - " 'fixing_count': 0,\n", - " 'scanning_count': 0,\n", - " 'revealed_to_red': False,\n", - " 'installing_count': 0,\n", - " 'max_sessions': 100,\n", - " 'tcp': True,\n", - " 'udp': True,\n", - " 'port': 53,\n", - " 'operating_state': 2},\n", - " 'FTPClient': {'uuid': 'f0a411eb-5423-4c98-8689-d94af57deefc',\n", - " 'health_state_actual': 0,\n", - " 'health_state_visible': 0,\n", - " 'criticality': 1,\n", - " 'fixing_count': 0,\n", - " 'scanning_count': 0,\n", - " 'revealed_to_red': False,\n", - " 'installing_count': 0,\n", - " 'max_sessions': 100,\n", - " 'tcp': True,\n", - " 'udp': True,\n", - " 'port': 21,\n", - " 'operating_state': 2},\n", - " 'NTPClient': {'uuid': 'd36f2c4f-af30-4618-ae8e-fe68c98e1382',\n", - " 'health_state_actual': 0,\n", - " 'health_state_visible': 0,\n", - " 'criticality': 1,\n", - " 'fixing_count': 0,\n", - " 'scanning_count': 0,\n", - " 'revealed_to_red': False,\n", - " 'installing_count': 0,\n", - " 'max_sessions': 100,\n", - " 'tcp': True,\n", - " 'udp': True,\n", - " 'port': 123,\n", - " 'operating_state': 2}},\n", - " 'process': {},\n", - " 'revealed_to_red': False},\n", - " 'switch1': {'uuid': 'a9e08b28-d1f4-4c34-b410-71333cd6b42b',\n", - " 'hostname': 'switch1',\n", - " 'operating_state': 2,\n", - " 'NICs': {1: {'uuid': '3546e960-30f8-49ee-95b9-57570b228333',\n", - " 'mac_address': '8d:d9:3e:f3:a3:ce',\n", - " 'speed': 100,\n", - " 'mtu': 1500,\n", - " 'enabled': False,\n", - " 'nmne': {}},\n", - " 2: {'uuid': 'a049bb8f-53d3-4575-b325-dfb55516edcd',\n", - " 'mac_address': 'aa:45:88:e1:13:e5',\n", - " 'speed': 100,\n", - " 'mtu': 1500,\n", - " 'enabled': False,\n", - " 'nmne': {}},\n", - " 3: {'uuid': '179c030c-d8fe-474b-a9d1-6c6bd6e6ca63',\n", - " 'mac_address': '10:d7:bc:39:4d:9d',\n", - " 'speed': 100,\n", - " 'mtu': 1500,\n", - " 'enabled': False,\n", - " 'nmne': {}},\n", - " 4: {'uuid': '56f84a14-0a98-4bc5-983b-31900fc9a2c5',\n", - " 'mac_address': '61:62:18:cf:2a:ea',\n", - " 'speed': 100,\n", - " 'mtu': 1500,\n", - " 'enabled': False,\n", - " 'nmne': {}},\n", - " 5: {'uuid': '0ff4b64e-be4c-473e-8dcd-b7a0078ff890',\n", - " 'mac_address': '21:5e:6b:1b:d0:bf',\n", - " 'speed': 100,\n", - " 'mtu': 1500,\n", - " 'enabled': False,\n", - " 'nmne': {}},\n", - " 6: {'uuid': '0edf239b-bbb8-4076-ba85-cb07c65722d5',\n", - " 'mac_address': '40:58:ac:11:9c:1a',\n", - " 'speed': 100,\n", - " 'mtu': 1500,\n", - " 'enabled': False,\n", - " 'nmne': {}},\n", - " 7: {'uuid': 'a7f578e5-a6f5-4cf8-abca-207e483637c2',\n", - " 'mac_address': 'e0:ef:90:e2:ce:b4',\n", - " 'speed': 100,\n", - " 'mtu': 1500,\n", - " 'enabled': False,\n", - " 'nmne': {}},\n", - " 8: {'uuid': 'dc2069dd-ef3c-4e0b-81cb-a73caba917a8',\n", - " 'mac_address': '2c:2a:27:d6:9a:a8',\n", - " 'speed': 100,\n", - " 'mtu': 1500,\n", - " 'enabled': False,\n", - " 'nmne': {}},\n", - " 9: {'uuid': 'afbc1a01-efdb-424c-9a7d-b3c3165f6d78',\n", - " 'mac_address': 'e0:f5:79:04:4f:2a',\n", - " 'speed': 100,\n", - " 'mtu': 1500,\n", - " 'enabled': False,\n", - " 'nmne': {}},\n", - " 10: {'uuid': 'bdd805f4-a3dc-4a94-ba67-3a62b138f41c',\n", - " 'mac_address': '9a:20:3d:cb:a0:98',\n", - " 'speed': 100,\n", - " 'mtu': 1500,\n", - " 'enabled': False,\n", - " 'nmne': {}},\n", - " 11: {'uuid': '19f6f871-cba9-423a-a1a5-6a0e347e98cb',\n", - " 'mac_address': '69:d9:8c:1d:a9:75',\n", - " 'speed': 100,\n", - " 'mtu': 1500,\n", - " 'enabled': False,\n", - " 'nmne': {}},\n", - " 12: {'uuid': '5c2aa6f5-12ce-466b-b46b-95ec519a5f47',\n", - " 'mac_address': 'db:7e:8c:91:1b:3f',\n", - " 'speed': 100,\n", - " 'mtu': 1500,\n", - " 'enabled': False,\n", - " 'nmne': {}}},\n", - " 'file_system': {'uuid': '91dea1d3-3947-49b9-a691-750bc25bbb9c',\n", - " 'folders': {'root': {'uuid': 'b7ebbf43-d86f-43d3-bbc7-f6b197af40b9',\n", - " 'name': 'root',\n", - " 'health_status': 1,\n", - " 'visible_status': 1,\n", - " 'previous_hash': None,\n", - " 'revealed_to_red': False,\n", - " 'files': {},\n", - " 'deleted_files': {}}},\n", - " 'deleted_folders': {},\n", - " 'num_file_creations': 0,\n", - " 'num_file_deletions': 0},\n", - " 'applications': {},\n", - " 'services': {},\n", - " 'process': {},\n", - " 'revealed_to_red': False,\n", - " 'ports': {1: {'uuid': '3546e960-30f8-49ee-95b9-57570b228333',\n", - " 'mac_address': '8d:d9:3e:f3:a3:ce',\n", - " 'speed': 100,\n", - " 'mtu': 1500,\n", - " 'enabled': False,\n", - " 'nmne': {}},\n", - " 2: {'uuid': 'a049bb8f-53d3-4575-b325-dfb55516edcd',\n", - " 'mac_address': 'aa:45:88:e1:13:e5',\n", - " 'speed': 100,\n", - " 'mtu': 1500,\n", - " 'enabled': False,\n", - " 'nmne': {}},\n", - " 3: {'uuid': '179c030c-d8fe-474b-a9d1-6c6bd6e6ca63',\n", - " 'mac_address': '10:d7:bc:39:4d:9d',\n", - " 'speed': 100,\n", - " 'mtu': 1500,\n", - " 'enabled': False,\n", - " 'nmne': {}},\n", - " 4: {'uuid': '56f84a14-0a98-4bc5-983b-31900fc9a2c5',\n", - " 'mac_address': '61:62:18:cf:2a:ea',\n", - " 'speed': 100,\n", - " 'mtu': 1500,\n", - " 'enabled': False,\n", - " 'nmne': {}},\n", - " 5: {'uuid': '0ff4b64e-be4c-473e-8dcd-b7a0078ff890',\n", - " 'mac_address': '21:5e:6b:1b:d0:bf',\n", - " 'speed': 100,\n", - " 'mtu': 1500,\n", - " 'enabled': False,\n", - " 'nmne': {}},\n", - " 6: {'uuid': '0edf239b-bbb8-4076-ba85-cb07c65722d5',\n", - " 'mac_address': '40:58:ac:11:9c:1a',\n", - " 'speed': 100,\n", - " 'mtu': 1500,\n", - " 'enabled': False,\n", - " 'nmne': {}},\n", - " 7: {'uuid': 'a7f578e5-a6f5-4cf8-abca-207e483637c2',\n", - " 'mac_address': 'e0:ef:90:e2:ce:b4',\n", - " 'speed': 100,\n", - " 'mtu': 1500,\n", - " 'enabled': False,\n", - " 'nmne': {}},\n", - " 8: {'uuid': 'dc2069dd-ef3c-4e0b-81cb-a73caba917a8',\n", - " 'mac_address': '2c:2a:27:d6:9a:a8',\n", - " 'speed': 100,\n", - " 'mtu': 1500,\n", - " 'enabled': False,\n", - " 'nmne': {}},\n", - " 9: {'uuid': 'afbc1a01-efdb-424c-9a7d-b3c3165f6d78',\n", - " 'mac_address': 'e0:f5:79:04:4f:2a',\n", - " 'speed': 100,\n", - " 'mtu': 1500,\n", - " 'enabled': False,\n", - " 'nmne': {}},\n", - " 10: {'uuid': 'bdd805f4-a3dc-4a94-ba67-3a62b138f41c',\n", - " 'mac_address': '9a:20:3d:cb:a0:98',\n", - " 'speed': 100,\n", - " 'mtu': 1500,\n", - " 'enabled': False,\n", - " 'nmne': {}},\n", - " 11: {'uuid': '19f6f871-cba9-423a-a1a5-6a0e347e98cb',\n", - " 'mac_address': '69:d9:8c:1d:a9:75',\n", - " 'speed': 100,\n", - " 'mtu': 1500,\n", - " 'enabled': False,\n", - " 'nmne': {}},\n", - " 12: {'uuid': '5c2aa6f5-12ce-466b-b46b-95ec519a5f47',\n", - " 'mac_address': 'db:7e:8c:91:1b:3f',\n", - " 'speed': 100,\n", - " 'mtu': 1500,\n", - " 'enabled': False,\n", - " 'nmne': {}}},\n", - " 'num_ports': 12,\n", - " 'mac_address_table': {}}},\n", - " 'links': {'primaite_pc:eth-2<->switch1:eth-1': {'uuid': '405f3032-6f5d-427f-b42e-5eee4cdc3a7c',\n", - " 'endpoint_a': '40c0db02-4d14-4826-b49b-e6a521941cec',\n", - " 'endpoint_b': '3546e960-30f8-49ee-95b9-57570b228333',\n", - " 'bandwidth': 100.0,\n", - " 'current_load': 0.0,\n", - " 'hostname_a': 'primaite_pc',\n", - " 'hostname_b': 'switch1',\n", - " 'port_a': 2,\n", - " 'port_b': 1},\n", - " 'google_server:eth-2<->switch1:eth-2': {'uuid': '2bd19485-0a6b-4878-978b-b082a672d9b9',\n", - " 'endpoint_a': '8a628493-83fb-44bf-a1b0-ef19e362ae5f',\n", - " 'endpoint_b': 'a049bb8f-53d3-4575-b325-dfb55516edcd',\n", - " 'bandwidth': 100.0,\n", - " 'current_load': 0.0,\n", - " 'hostname_a': 'google_server',\n", - " 'hostname_b': 'switch1',\n", - " 'port_a': 2,\n", - " 'port_b': 2}}},\n", - " 'domain': {'uuid': '25fbe0e9-76e8-4fd7-ad22-da2d2b5a509d',\n", - " 'accounts': {'admin': {'uuid': '78783f13-6149-47b3-9b9d-f98d658bf54a',\n", - " 'num_logons': 0,\n", - " 'num_logoffs': 0,\n", - " 'num_group_changes': 0,\n", - " 'username': 'admin',\n", - " 'password': 'admin12',\n", - " 'account_type': 2,\n", - " 'enabled': True}}}}" - ] - }, - "execution_count": 15, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "my_sim.describe_state()" ] }, { "cell_type": "code", - "execution_count": 16, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "'{\"uuid\": \"91c88b2a-caf1-47be-a394-d0c22e5110be\", \"network\": {\"uuid\": \"a9121808-0401-460c-9833-23d4ba91e9bc\", \"nodes\": {\"primaite_pc\": {\"uuid\": \"dd0e95be-2491-4d5b-8388-df3975a19e8a\", \"hostname\": \"primaite_pc\", \"operating_state\": 2, \"NICs\": {\"1\": {\"uuid\": \"279e2645-b680-4d2e-b13c-66d5cfacbd38\", \"mac_address\": \"bd:76:20:24:cf:04\", \"speed\": 100, \"mtu\": 1500, \"enabled\": false, \"nmne\": {}, \"ip_address\": \"192.168.1.10\", \"subnet_mask\": \"255.255.255.0\", \"wake_on_lan\": false}, \"2\": {\"uuid\": \"40c0db02-4d14-4826-b49b-e6a521941cec\", \"mac_address\": \"d8:b2:0c:af:3f:83\", \"speed\": 100, \"mtu\": 1500, \"enabled\": false, \"nmne\": {}, \"ip_address\": \"130.1.1.1\", \"subnet_mask\": \"255.255.255.0\", \"wake_on_lan\": false}}, \"file_system\": {\"uuid\": \"91d3aed7-53c6-471f-b903-9889396be280\", \"folders\": {\"root\": {\"uuid\": \"81bdc04e-9a0d-4306-9a9c-ee926fff6df8\", \"name\": \"root\", \"health_status\": 1, \"visible_status\": 1, \"previous_hash\": null, \"revealed_to_red\": false, \"files\": {}, \"deleted_files\": {}}, \"downloads\": {\"uuid\": \"56abdf27-b8d4-42f4-9b09-b7912db1c4f3\", \"name\": \"downloads\", \"health_status\": 1, \"visible_status\": 1, \"previous_hash\": null, \"revealed_to_red\": false, \"files\": {\"firefox_installer.zip\": {\"uuid\": \"02236b61-14bb-46aa-9fd5-7174c0d7d730\", \"name\": \"firefox_installer.zip\", \"health_status\": 1, \"visible_status\": 1, \"previous_hash\": null, \"revealed_to_red\": false, \"size\": 1024000, \"file_type\": \"ZIP\", \"num_access\": 0}}, \"deleted_files\": {}}}, \"deleted_folders\": {}, \"num_file_creations\": 0, \"num_file_deletions\": 0}, \"applications\": {\"WebBrowser\": {\"uuid\": \"a6a12776-e307-4d71-9e7a-d9ca97ecd6b0\", \"health_state_actual\": 0, \"health_state_visible\": 0, \"criticality\": 1, \"fixing_count\": 0, \"scanning_count\": 0, \"revealed_to_red\": false, \"installing_count\": 0, \"max_sessions\": 100, \"tcp\": true, \"udp\": true, \"port\": 80, \"operating_state\": 2, \"execution_control_status\": \"manual\", \"num_executions\": 0, \"groups\": [], \"history\": []}, \"mspaint\": {\"uuid\": \"efd34549-cc92-4474-80ab-5fb6c3159ff6\", \"health_state_actual\": 1, \"health_state_visible\": 1, \"criticality\": 3, \"fixing_count\": 0, \"scanning_count\": 0, \"revealed_to_red\": false, \"installing_count\": 0, \"max_sessions\": 100, \"tcp\": true, \"udp\": true, \"port\": 80, \"operating_state\": 1, \"execution_control_status\": \"manual\", \"num_executions\": 0, \"groups\": []}}, \"services\": {\"ARP\": {\"uuid\": \"e61c25ff-a6c2-4eec-b031-131eaf33490c\", \"health_state_actual\": 0, \"health_state_visible\": 0, \"criticality\": 1, \"fixing_count\": 0, \"scanning_count\": 0, \"revealed_to_red\": false, \"installing_count\": 0, \"max_sessions\": 100, \"tcp\": true, \"udp\": true, \"port\": 219, \"operating_state\": 2}, \"ICMP\": {\"uuid\": \"74debeed-b758-41cb-bea2-51ac283e6ae2\", \"health_state_actual\": 0, \"health_state_visible\": 0, \"criticality\": 1, \"fixing_count\": 0, \"scanning_count\": 0, \"revealed_to_red\": false, \"installing_count\": 0, \"max_sessions\": 100, \"tcp\": true, \"udp\": true, \"port\": 0, \"operating_state\": 2}, \"DNSClient\": {\"uuid\": \"6680efc0-e005-41e8-bb49-39a0d9c4b118\", \"health_state_actual\": 0, \"health_state_visible\": 0, \"criticality\": 1, \"fixing_count\": 0, \"scanning_count\": 0, \"revealed_to_red\": false, \"installing_count\": 0, \"max_sessions\": 100, \"tcp\": true, \"udp\": true, \"port\": 53, \"operating_state\": 2}, \"FTPClient\": {\"uuid\": \"21b05ac9-e9b4-4c5c-a812-f6748e14d8c3\", \"health_state_actual\": 0, \"health_state_visible\": 0, \"criticality\": 1, \"fixing_count\": 0, \"scanning_count\": 0, \"revealed_to_red\": false, \"installing_count\": 0, \"max_sessions\": 100, \"tcp\": true, \"udp\": true, \"port\": 21, \"operating_state\": 2}, \"NTPClient\": {\"uuid\": \"7ab7c911-5037-4e82-b00c-be4f72c13aa7\", \"health_state_actual\": 0, \"health_state_visible\": 0, \"criticality\": 1, \"fixing_count\": 0, \"scanning_count\": 0, \"revealed_to_red\": false, \"installing_count\": 0, \"max_sessions\": 100, \"tcp\": true, \"udp\": true, \"port\": 123, \"operating_state\": 2}}, \"process\": {}, \"revealed_to_red\": false}, \"google_server\": {\"uuid\": \"42d61d8d-2493-4b8a-944f-7962abc9d20b\", \"hostname\": \"google_server\", \"operating_state\": 2, \"NICs\": {\"1\": {\"uuid\": \"e384a4fc-754f-44a4-9158-c63f72f52f76\", \"mac_address\": \"ea:5d:4f:10:b2:27\", \"speed\": 100, \"mtu\": 1500, \"enabled\": false, \"nmne\": {}, \"ip_address\": \"192.168.1.11\", \"subnet_mask\": \"255.255.255.0\", \"wake_on_lan\": false}, \"2\": {\"uuid\": \"8a628493-83fb-44bf-a1b0-ef19e362ae5f\", \"mac_address\": \"44:89:a5:ce:7f:6f\", \"speed\": 100, \"mtu\": 1500, \"enabled\": false, \"nmne\": {}, \"ip_address\": \"130.1.1.2\", \"subnet_mask\": \"255.255.255.0\", \"wake_on_lan\": false}}, \"file_system\": {\"uuid\": \"f25cee1f-2ebe-4fd3-8d5c-649b0d342b61\", \"folders\": {\"root\": {\"uuid\": \"cbbd3631-a915-400d-bc02-f31f72447ce5\", \"name\": \"root\", \"health_status\": 1, \"visible_status\": 1, \"previous_hash\": null, \"revealed_to_red\": false, \"files\": {\"favicon.ico\": {\"uuid\": \"3ceeded4-77b9-4a86-949c-73188d5f4c34\", \"name\": \"favicon.ico\", \"health_status\": 1, \"visible_status\": 1, \"previous_hash\": null, \"revealed_to_red\": false, \"size\": 0, \"file_type\": \"UNKNOWN\", \"num_access\": 0}}, \"deleted_files\": {}}, \"static\": {\"uuid\": \"d8241ce0-f55e-43ec-bd68-741b79a9a565\", \"name\": \"static\", \"health_status\": 1, \"visible_status\": 1, \"previous_hash\": null, \"revealed_to_red\": false, \"files\": {}, \"deleted_files\": {}}}, \"deleted_folders\": {}, \"num_file_creations\": 1, \"num_file_deletions\": 0}, \"applications\": {\"WebBrowser\": {\"uuid\": \"957d0049-e703-4882-8e57-b2ab4c79d458\", \"health_state_actual\": 0, \"health_state_visible\": 0, \"criticality\": 1, \"fixing_count\": 0, \"scanning_count\": 0, \"revealed_to_red\": false, \"installing_count\": 0, \"max_sessions\": 100, \"tcp\": true, \"udp\": true, \"port\": 80, \"operating_state\": 2, \"execution_control_status\": \"manual\", \"num_executions\": 0, \"groups\": [], \"history\": []}}, \"services\": {\"ARP\": {\"uuid\": \"82ea1bcf-a0fe-418d-873e-5f075ebb4d3b\", \"health_state_actual\": 0, \"health_state_visible\": 0, \"criticality\": 1, \"fixing_count\": 0, \"scanning_count\": 0, \"revealed_to_red\": false, \"installing_count\": 0, \"max_sessions\": 100, \"tcp\": true, \"udp\": true, \"port\": 219, \"operating_state\": 2}, \"ICMP\": {\"uuid\": \"bc084dc4-0a7d-4954-9e6e-54bed797e837\", \"health_state_actual\": 0, \"health_state_visible\": 0, \"criticality\": 1, \"fixing_count\": 0, \"scanning_count\": 0, \"revealed_to_red\": false, \"installing_count\": 0, \"max_sessions\": 100, \"tcp\": true, \"udp\": true, \"port\": 0, \"operating_state\": 2}, \"DNSClient\": {\"uuid\": \"5a9ecc18-71c0-4728-a9c6-e31b33529581\", \"health_state_actual\": 0, \"health_state_visible\": 0, \"criticality\": 1, \"fixing_count\": 0, \"scanning_count\": 0, \"revealed_to_red\": false, \"installing_count\": 0, \"max_sessions\": 100, \"tcp\": true, \"udp\": true, \"port\": 53, \"operating_state\": 2}, \"FTPClient\": {\"uuid\": \"f0a411eb-5423-4c98-8689-d94af57deefc\", \"health_state_actual\": 0, \"health_state_visible\": 0, \"criticality\": 1, \"fixing_count\": 0, \"scanning_count\": 0, \"revealed_to_red\": false, \"installing_count\": 0, \"max_sessions\": 100, \"tcp\": true, \"udp\": true, \"port\": 21, \"operating_state\": 2}, \"NTPClient\": {\"uuid\": \"d36f2c4f-af30-4618-ae8e-fe68c98e1382\", \"health_state_actual\": 0, \"health_state_visible\": 0, \"criticality\": 1, \"fixing_count\": 0, \"scanning_count\": 0, \"revealed_to_red\": false, \"installing_count\": 0, \"max_sessions\": 100, \"tcp\": true, \"udp\": true, \"port\": 123, \"operating_state\": 2}}, \"process\": {}, \"revealed_to_red\": false}, \"switch1\": {\"uuid\": \"a9e08b28-d1f4-4c34-b410-71333cd6b42b\", \"hostname\": \"switch1\", \"operating_state\": 2, \"NICs\": {\"1\": {\"uuid\": \"3546e960-30f8-49ee-95b9-57570b228333\", \"mac_address\": \"8d:d9:3e:f3:a3:ce\", \"speed\": 100, \"mtu\": 1500, \"enabled\": false, \"nmne\": {}}, \"2\": {\"uuid\": \"a049bb8f-53d3-4575-b325-dfb55516edcd\", \"mac_address\": \"aa:45:88:e1:13:e5\", \"speed\": 100, \"mtu\": 1500, \"enabled\": false, \"nmne\": {}}, \"3\": {\"uuid\": \"179c030c-d8fe-474b-a9d1-6c6bd6e6ca63\", \"mac_address\": \"10:d7:bc:39:4d:9d\", \"speed\": 100, \"mtu\": 1500, \"enabled\": false, \"nmne\": {}}, \"4\": {\"uuid\": \"56f84a14-0a98-4bc5-983b-31900fc9a2c5\", \"mac_address\": \"61:62:18:cf:2a:ea\", \"speed\": 100, \"mtu\": 1500, \"enabled\": false, \"nmne\": {}}, \"5\": {\"uuid\": \"0ff4b64e-be4c-473e-8dcd-b7a0078ff890\", \"mac_address\": \"21:5e:6b:1b:d0:bf\", \"speed\": 100, \"mtu\": 1500, \"enabled\": false, \"nmne\": {}}, \"6\": {\"uuid\": \"0edf239b-bbb8-4076-ba85-cb07c65722d5\", \"mac_address\": \"40:58:ac:11:9c:1a\", \"speed\": 100, \"mtu\": 1500, \"enabled\": false, \"nmne\": {}}, \"7\": {\"uuid\": \"a7f578e5-a6f5-4cf8-abca-207e483637c2\", \"mac_address\": \"e0:ef:90:e2:ce:b4\", \"speed\": 100, \"mtu\": 1500, \"enabled\": false, \"nmne\": {}}, \"8\": {\"uuid\": \"dc2069dd-ef3c-4e0b-81cb-a73caba917a8\", \"mac_address\": \"2c:2a:27:d6:9a:a8\", \"speed\": 100, \"mtu\": 1500, \"enabled\": false, \"nmne\": {}}, \"9\": {\"uuid\": \"afbc1a01-efdb-424c-9a7d-b3c3165f6d78\", \"mac_address\": \"e0:f5:79:04:4f:2a\", \"speed\": 100, \"mtu\": 1500, \"enabled\": false, \"nmne\": {}}, \"10\": {\"uuid\": \"bdd805f4-a3dc-4a94-ba67-3a62b138f41c\", \"mac_address\": \"9a:20:3d:cb:a0:98\", \"speed\": 100, \"mtu\": 1500, \"enabled\": false, \"nmne\": {}}, \"11\": {\"uuid\": \"19f6f871-cba9-423a-a1a5-6a0e347e98cb\", \"mac_address\": \"69:d9:8c:1d:a9:75\", \"speed\": 100, \"mtu\": 1500, \"enabled\": false, \"nmne\": {}}, \"12\": {\"uuid\": \"5c2aa6f5-12ce-466b-b46b-95ec519a5f47\", \"mac_address\": \"db:7e:8c:91:1b:3f\", \"speed\": 100, \"mtu\": 1500, \"enabled\": false, \"nmne\": {}}}, \"file_system\": {\"uuid\": \"91dea1d3-3947-49b9-a691-750bc25bbb9c\", \"folders\": {\"root\": {\"uuid\": \"b7ebbf43-d86f-43d3-bbc7-f6b197af40b9\", \"name\": \"root\", \"health_status\": 1, \"visible_status\": 1, \"previous_hash\": null, \"revealed_to_red\": false, \"files\": {}, \"deleted_files\": {}}}, \"deleted_folders\": {}, \"num_file_creations\": 0, \"num_file_deletions\": 0}, \"applications\": {}, \"services\": {}, \"process\": {}, \"revealed_to_red\": false, \"ports\": {\"1\": {\"uuid\": \"3546e960-30f8-49ee-95b9-57570b228333\", \"mac_address\": \"8d:d9:3e:f3:a3:ce\", \"speed\": 100, \"mtu\": 1500, \"enabled\": false, \"nmne\": {}}, \"2\": {\"uuid\": \"a049bb8f-53d3-4575-b325-dfb55516edcd\", \"mac_address\": \"aa:45:88:e1:13:e5\", \"speed\": 100, \"mtu\": 1500, \"enabled\": false, \"nmne\": {}}, \"3\": {\"uuid\": \"179c030c-d8fe-474b-a9d1-6c6bd6e6ca63\", \"mac_address\": \"10:d7:bc:39:4d:9d\", \"speed\": 100, \"mtu\": 1500, \"enabled\": false, \"nmne\": {}}, \"4\": {\"uuid\": \"56f84a14-0a98-4bc5-983b-31900fc9a2c5\", \"mac_address\": \"61:62:18:cf:2a:ea\", \"speed\": 100, \"mtu\": 1500, \"enabled\": false, \"nmne\": {}}, \"5\": {\"uuid\": \"0ff4b64e-be4c-473e-8dcd-b7a0078ff890\", \"mac_address\": \"21:5e:6b:1b:d0:bf\", \"speed\": 100, \"mtu\": 1500, \"enabled\": false, \"nmne\": {}}, \"6\": {\"uuid\": \"0edf239b-bbb8-4076-ba85-cb07c65722d5\", \"mac_address\": \"40:58:ac:11:9c:1a\", \"speed\": 100, \"mtu\": 1500, \"enabled\": false, \"nmne\": {}}, \"7\": {\"uuid\": \"a7f578e5-a6f5-4cf8-abca-207e483637c2\", \"mac_address\": \"e0:ef:90:e2:ce:b4\", \"speed\": 100, \"mtu\": 1500, \"enabled\": false, \"nmne\": {}}, \"8\": {\"uuid\": \"dc2069dd-ef3c-4e0b-81cb-a73caba917a8\", \"mac_address\": \"2c:2a:27:d6:9a:a8\", \"speed\": 100, \"mtu\": 1500, \"enabled\": false, \"nmne\": {}}, \"9\": {\"uuid\": \"afbc1a01-efdb-424c-9a7d-b3c3165f6d78\", \"mac_address\": \"e0:f5:79:04:4f:2a\", \"speed\": 100, \"mtu\": 1500, \"enabled\": false, \"nmne\": {}}, \"10\": {\"uuid\": \"bdd805f4-a3dc-4a94-ba67-3a62b138f41c\", \"mac_address\": \"9a:20:3d:cb:a0:98\", \"speed\": 100, \"mtu\": 1500, \"enabled\": false, \"nmne\": {}}, \"11\": {\"uuid\": \"19f6f871-cba9-423a-a1a5-6a0e347e98cb\", \"mac_address\": \"69:d9:8c:1d:a9:75\", \"speed\": 100, \"mtu\": 1500, \"enabled\": false, \"nmne\": {}}, \"12\": {\"uuid\": \"5c2aa6f5-12ce-466b-b46b-95ec519a5f47\", \"mac_address\": \"db:7e:8c:91:1b:3f\", \"speed\": 100, \"mtu\": 1500, \"enabled\": false, \"nmne\": {}}}, \"num_ports\": 12, \"mac_address_table\": {}}}, \"links\": {\"primaite_pc:eth-2<->switch1:eth-1\": {\"uuid\": \"405f3032-6f5d-427f-b42e-5eee4cdc3a7c\", \"endpoint_a\": \"40c0db02-4d14-4826-b49b-e6a521941cec\", \"endpoint_b\": \"3546e960-30f8-49ee-95b9-57570b228333\", \"bandwidth\": 100.0, \"current_load\": 0.0, \"hostname_a\": \"primaite_pc\", \"hostname_b\": \"switch1\", \"port_a\": 2, \"port_b\": 1}, \"google_server:eth-2<->switch1:eth-2\": {\"uuid\": \"2bd19485-0a6b-4878-978b-b082a672d9b9\", \"endpoint_a\": \"8a628493-83fb-44bf-a1b0-ef19e362ae5f\", \"endpoint_b\": \"a049bb8f-53d3-4575-b325-dfb55516edcd\", \"bandwidth\": 100.0, \"current_load\": 0.0, \"hostname_a\": \"google_server\", \"hostname_b\": \"switch1\", \"port_a\": 2, \"port_b\": 2}}}, \"domain\": {\"uuid\": \"25fbe0e9-76e8-4fd7-ad22-da2d2b5a509d\", \"accounts\": {\"admin\": {\"uuid\": \"78783f13-6149-47b3-9b9d-f98d658bf54a\", \"num_logons\": 0, \"num_logoffs\": 0, \"num_group_changes\": 0, \"username\": \"admin\", \"password\": \"admin12\", \"account_type\": 2, \"enabled\": true}}}}'" - ] - }, - "execution_count": 16, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "import json\n", "json.dumps(my_sim.describe_state())" From 9496441169052fb6925ea655de9503b6c0705c58 Mon Sep 17 00:00:00 2001 From: Charlie Crane Date: Tue, 9 Apr 2024 15:19:45 +0100 Subject: [PATCH 101/124] #2453 - Ignore this commit. Removing saved output in Training-an-SB3-Agent Notebook --- .../notebooks/Training-an-SB3-Agent.ipynb | 7337 +---------------- 1 file changed, 13 insertions(+), 7324 deletions(-) diff --git a/src/primaite/notebooks/Training-an-SB3-Agent.ipynb b/src/primaite/notebooks/Training-an-SB3-Agent.ipynb index 67d9748e..8d6789ee 100644 --- a/src/primaite/notebooks/Training-an-SB3-Agent.ipynb +++ b/src/primaite/notebooks/Training-an-SB3-Agent.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "code", - "execution_count": 2, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -13,7 +13,7 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -22,7 +22,7 @@ }, { "cell_type": "code", - "execution_count": 4, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -32,24 +32,16 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - } - ], + "outputs": [], "source": [ "gym = PrimaiteGymEnv(game_config=cfg)" ] }, { "cell_type": "code", - "execution_count": 6, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -64,7 +56,7 @@ }, { "cell_type": "code", - "execution_count": 7, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -73,7141 +65,16 @@ }, { "cell_type": "code", - "execution_count": 8, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:49:28,065: Resetting environment, episode 0, avg. reward: 0.0\n", - "2024-04-08 14:49:28,068: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_0.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:49:29,639: Resetting environment, episode 1, avg. reward: -17.149999999999974\n", - "2024-04-08 14:49:29,643: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_1.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:49:31,337: Resetting environment, episode 2, avg. reward: -12.099999999999989\n", - "2024-04-08 14:49:31,339: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_2.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:49:32,540: Resetting environment, episode 3, avg. reward: -44.500000000000064\n", - "2024-04-08 14:49:32,543: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_3.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:49:33,721: Resetting environment, episode 4, avg. reward: -22.949999999999953\n", - "2024-04-08 14:49:33,724: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_4.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:49:35,248: Resetting environment, episode 5, avg. reward: -17.64999999999998\n", - "2024-04-08 14:49:35,253: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_5.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:49:36,676: Resetting environment, episode 6, avg. reward: -21.949999999999953\n", - "2024-04-08 14:49:36,679: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_6.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:49:38,158: Resetting environment, episode 7, avg. reward: -88.5999999999998\n", - "2024-04-08 14:49:38,161: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_7.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:49:39,570: Resetting environment, episode 8, avg. reward: -42.750000000000156\n", - "2024-04-08 14:49:39,572: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_8.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:49:40,917: Resetting environment, episode 9, avg. reward: -13.999999999999982\n", - "2024-04-08 14:49:40,920: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_9.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:49:42,112: Resetting environment, episode 10, avg. reward: -34.55000000000001\n", - "2024-04-08 14:49:42,116: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_10.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:49:43,768: Resetting environment, episode 11, avg. reward: -19.399999999999963\n", - "2024-04-08 14:49:43,771: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_11.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:49:45,216: Resetting environment, episode 12, avg. reward: -11.049999999999988\n", - "2024-04-08 14:49:45,219: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_12.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:49:46,830: Resetting environment, episode 13, avg. reward: -33.1\n", - "2024-04-08 14:49:46,833: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_13.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:49:48,302: Resetting environment, episode 14, avg. reward: -17.499999999999968\n", - "2024-04-08 14:49:48,306: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_14.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:49:50,142: Resetting environment, episode 15, avg. reward: -22.299999999999955\n", - "2024-04-08 14:49:50,146: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_15.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:49:51,603: Resetting environment, episode 16, avg. reward: -64.8500000000001\n", - "2024-04-08 14:49:51,606: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_16.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:49:53,295: Resetting environment, episode 17, avg. reward: -67.24999999999999\n", - "2024-04-08 14:49:53,298: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_17.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:49:54,630: Resetting environment, episode 18, avg. reward: -20.799999999999958\n", - "2024-04-08 14:49:54,633: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_18.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:49:56,091: Resetting environment, episode 19, avg. reward: -62.55000000000001\n", - "2024-04-08 14:49:56,093: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_19.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:49:57,486: Resetting environment, episode 20, avg. reward: -24.649999999999984\n", - "2024-04-08 14:49:57,489: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_20.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:49:59,243: Resetting environment, episode 21, avg. reward: -9.649999999999997\n", - "2024-04-08 14:49:59,246: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_21.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:50:00,812: Resetting environment, episode 22, avg. reward: -21.749999999999957\n", - "2024-04-08 14:50:00,815: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_22.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:50:02,403: Resetting environment, episode 23, avg. reward: -15.949999999999978\n", - "2024-04-08 14:50:02,405: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_23.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:50:04,363: Resetting environment, episode 24, avg. reward: -83.15000000000002\n", - "2024-04-08 14:50:04,366: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_24.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:50:06,083: Resetting environment, episode 25, avg. reward: -36.15000000000003\n", - "2024-04-08 14:50:06,085: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_25.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:50:07,813: Resetting environment, episode 26, avg. reward: -67.25000000000007\n", - "2024-04-08 14:50:07,816: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_26.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:50:09,419: Resetting environment, episode 27, avg. reward: -44.200000000000074\n", - "2024-04-08 14:50:09,422: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_27.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:50:10,969: Resetting environment, episode 28, avg. reward: -64.1500000000001\n", - "2024-04-08 14:50:10,973: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_28.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:50:12,518: Resetting environment, episode 29, avg. reward: -18.34999999999997\n", - "2024-04-08 14:50:12,519: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_29.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:50:14,004: Resetting environment, episode 30, avg. reward: -17.69999999999997\n", - "2024-04-08 14:50:14,007: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_30.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:50:16,007: Resetting environment, episode 31, avg. reward: -28.700000000000017\n", - "2024-04-08 14:50:16,010: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_31.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:50:17,755: Resetting environment, episode 32, avg. reward: -53.65000000000015\n", - "2024-04-08 14:50:17,758: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_32.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:50:19,232: Resetting environment, episode 33, avg. reward: -43.65000000000005\n", - "2024-04-08 14:50:19,235: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_33.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:50:20,708: Resetting environment, episode 34, avg. reward: -2.499999999999969\n", - "2024-04-08 14:50:20,711: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_34.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:50:22,081: Resetting environment, episode 35, avg. reward: -51.45000000000008\n", - "2024-04-08 14:50:22,084: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_35.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:50:23,461: Resetting environment, episode 36, avg. reward: -24.749999999999986\n", - "2024-04-08 14:50:23,465: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_36.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:50:24,909: Resetting environment, episode 37, avg. reward: -72.70000000000002\n", - "2024-04-08 14:50:24,912: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_37.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:50:27,049: Resetting environment, episode 38, avg. reward: -16.049999999999976\n", - "2024-04-08 14:50:27,052: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_38.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:50:28,362: Resetting environment, episode 39, avg. reward: -27.79999999999996\n", - "2024-04-08 14:50:28,364: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_39.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:50:29,821: Resetting environment, episode 40, avg. reward: -61.9500000000001\n", - "2024-04-08 14:50:29,824: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_40.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:50:31,787: Resetting environment, episode 41, avg. reward: -36.00000000000004\n", - "2024-04-08 14:50:31,790: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_41.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:50:33,074: Resetting environment, episode 42, avg. reward: -44.35000000000007\n", - "2024-04-08 14:50:33,077: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_42.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:50:34,739: Resetting environment, episode 43, avg. reward: -51.100000000000065\n", - "2024-04-08 14:50:34,742: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_43.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:50:36,357: Resetting environment, episode 44, avg. reward: -65.95000000000002\n", - "2024-04-08 14:50:36,359: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_44.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:50:37,834: Resetting environment, episode 45, avg. reward: -45.750000000000064\n", - "2024-04-08 14:50:37,838: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_45.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:50:39,768: Resetting environment, episode 46, avg. reward: -22.39999999999994\n", - "2024-04-08 14:50:39,774: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_46.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:50:41,672: Resetting environment, episode 47, avg. reward: -18.749999999999993\n", - "2024-04-08 14:50:41,677: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_47.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:50:43,816: Resetting environment, episode 48, avg. reward: -65.4\n", - "2024-04-08 14:50:43,818: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_48.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:50:45,262: Resetting environment, episode 49, avg. reward: -20.09999999999996\n", - "2024-04-08 14:50:45,266: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_49.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:50:46,955: Resetting environment, episode 50, avg. reward: -21.899999999999967\n", - "2024-04-08 14:50:46,958: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_50.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:50:49,698: Resetting environment, episode 51, avg. reward: -20.399999999999963\n", - "2024-04-08 14:50:49,701: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_51.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:50:51,463: Resetting environment, episode 52, avg. reward: -21.399999999999956\n", - "2024-04-08 14:50:51,467: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_52.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:50:53,214: Resetting environment, episode 53, avg. reward: -19.249999999999982\n", - "2024-04-08 14:50:53,218: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_53.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:50:55,080: Resetting environment, episode 54, avg. reward: -57.90000000000009\n", - "2024-04-08 14:50:55,084: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_54.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:50:56,690: Resetting environment, episode 55, avg. reward: -14.099999999999982\n", - "2024-04-08 14:50:56,694: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_55.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:50:58,423: Resetting environment, episode 56, avg. reward: -22.79999999999995\n", - "2024-04-08 14:50:58,427: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_56.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:50:59,941: Resetting environment, episode 57, avg. reward: -18.39999999999997\n", - "2024-04-08 14:50:59,944: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_57.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:51:01,528: Resetting environment, episode 58, avg. reward: -49.25000000000011\n", - "2024-04-08 14:51:01,532: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_58.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:51:03,202: Resetting environment, episode 59, avg. reward: -14.449999999999964\n", - "2024-04-08 14:51:03,204: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_59.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:51:04,611: Resetting environment, episode 60, avg. reward: -11.649999999999991\n", - "2024-04-08 14:51:04,614: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_60.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:51:06,388: Resetting environment, episode 61, avg. reward: -17.59999999999997\n", - "2024-04-08 14:51:06,391: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_61.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:51:07,952: Resetting environment, episode 62, avg. reward: -68.39999999999998\n", - "2024-04-08 14:51:07,956: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_62.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:51:09,416: Resetting environment, episode 63, avg. reward: -19.999999999999957\n", - "2024-04-08 14:51:09,420: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_63.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:51:10,728: Resetting environment, episode 64, avg. reward: -49.25000000000008\n", - "2024-04-08 14:51:10,731: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_64.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:51:12,298: Resetting environment, episode 65, avg. reward: -21.29999999999999\n", - "2024-04-08 14:51:12,302: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_65.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:51:14,232: Resetting environment, episode 66, avg. reward: -46.55000000000018\n", - "2024-04-08 14:51:14,235: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_66.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:51:15,645: Resetting environment, episode 67, avg. reward: -30.050000000000008\n", - "2024-04-08 14:51:15,648: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_67.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:51:17,264: Resetting environment, episode 68, avg. reward: -72.80000000000003\n", - "2024-04-08 14:51:17,268: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_68.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:51:18,742: Resetting environment, episode 69, avg. reward: -100.84999999999998\n", - "2024-04-08 14:51:18,745: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_69.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:51:20,149: Resetting environment, episode 70, avg. reward: -33.85000000000002\n", - "2024-04-08 14:51:20,153: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_70.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:51:21,992: Resetting environment, episode 71, avg. reward: -93.30000000000003\n", - "2024-04-08 14:51:21,995: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_71.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:51:23,375: Resetting environment, episode 72, avg. reward: -18.049999999999965\n", - "2024-04-08 14:51:23,378: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_72.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:51:24,808: Resetting environment, episode 73, avg. reward: -52.80000000000021\n", - "2024-04-08 14:51:24,811: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_73.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:51:26,230: Resetting environment, episode 74, avg. reward: -16.449999999999974\n", - "2024-04-08 14:51:26,234: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_74.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:51:27,721: Resetting environment, episode 75, avg. reward: -56.400000000000006\n", - "2024-04-08 14:51:27,724: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_75.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:51:29,150: Resetting environment, episode 76, avg. reward: -13.799999999999976\n", - "2024-04-08 14:51:29,152: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_76.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:51:30,654: Resetting environment, episode 77, avg. reward: -22.749999999999996\n", - "2024-04-08 14:51:30,658: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_77.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:51:32,221: Resetting environment, episode 78, avg. reward: -8.949999999999998\n", - "2024-04-08 14:51:32,224: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_78.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:51:33,561: Resetting environment, episode 79, avg. reward: -35.84999999999997\n", - "2024-04-08 14:51:33,565: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_79.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:51:35,158: Resetting environment, episode 80, avg. reward: -7.049999999999989\n", - "2024-04-08 14:51:35,160: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_80.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:51:37,129: Resetting environment, episode 81, avg. reward: -27.349999999999984\n", - "2024-04-08 14:51:37,131: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_81.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:51:38,672: Resetting environment, episode 82, avg. reward: -40.65000000000012\n", - "2024-04-08 14:51:38,675: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_82.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:51:41,263: Resetting environment, episode 83, avg. reward: -52.10000000000015\n", - "2024-04-08 14:51:41,267: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_83.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:51:42,701: Resetting environment, episode 84, avg. reward: -21.649999999999956\n", - "2024-04-08 14:51:42,705: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_84.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:51:44,319: Resetting environment, episode 85, avg. reward: -31.600000000000016\n", - "2024-04-08 14:51:44,322: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_85.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:51:45,992: Resetting environment, episode 86, avg. reward: -24.300000000000004\n", - "2024-04-08 14:51:45,992: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_86.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:51:47,709: Resetting environment, episode 87, avg. reward: -11.849999999999982\n", - "2024-04-08 14:51:47,711: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_87.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:51:49,249: Resetting environment, episode 88, avg. reward: -11.799999999999992\n", - "2024-04-08 14:51:49,252: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_88.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:51:50,852: Resetting environment, episode 89, avg. reward: -10.099999999999964\n", - "2024-04-08 14:51:50,854: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_89.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:51:52,578: Resetting environment, episode 90, avg. reward: -27.799999999999972\n", - "2024-04-08 14:51:52,581: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_90.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:51:54,406: Resetting environment, episode 91, avg. reward: -23.04999999999995\n", - "2024-04-08 14:51:54,410: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_91.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:51:56,371: Resetting environment, episode 92, avg. reward: -18.449999999999967\n", - "2024-04-08 14:51:56,375: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_92.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:51:58,036: Resetting environment, episode 93, avg. reward: -12.04999999999997\n", - "2024-04-08 14:51:58,040: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_93.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:51:59,859: Resetting environment, episode 94, avg. reward: -10.749999999999984\n", - "2024-04-08 14:51:59,862: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_94.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:52:01,324: Resetting environment, episode 95, avg. reward: -16.999999999999975\n", - "2024-04-08 14:52:01,327: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_95.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:52:03,061: Resetting environment, episode 96, avg. reward: -64.80000000000003\n", - "2024-04-08 14:52:03,064: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_96.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:52:04,843: Resetting environment, episode 97, avg. reward: -93.19999999999995\n", - "2024-04-08 14:52:04,846: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_97.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:52:06,197: Resetting environment, episode 98, avg. reward: -23.44999999999995\n", - "2024-04-08 14:52:06,200: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_98.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:52:07,802: Resetting environment, episode 99, avg. reward: 1.7500000000000147\n", - "2024-04-08 14:52:07,810: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_99.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:52:09,595: Resetting environment, episode 100, avg. reward: -31.450000000000003\n", - "2024-04-08 14:52:09,598: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_100.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:52:11,206: Resetting environment, episode 101, avg. reward: -9.499999999999988\n", - "2024-04-08 14:52:11,209: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_101.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:52:13,334: Resetting environment, episode 102, avg. reward: -15.149999999999983\n", - "2024-04-08 14:52:13,337: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_102.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:52:15,208: Resetting environment, episode 103, avg. reward: 0.2500000000000171\n", - "2024-04-08 14:52:15,212: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_103.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:52:17,126: Resetting environment, episode 104, avg. reward: 14.55\n", - "2024-04-08 14:52:17,130: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_104.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:52:18,662: Resetting environment, episode 105, avg. reward: -16.04999999999997\n", - "2024-04-08 14:52:18,666: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_105.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:52:20,144: Resetting environment, episode 106, avg. reward: -80.69999999999997\n", - "2024-04-08 14:52:20,147: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_106.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:52:21,595: Resetting environment, episode 107, avg. reward: -16.099999999999977\n", - "2024-04-08 14:52:21,599: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_107.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:52:23,331: Resetting environment, episode 108, avg. reward: -46.80000000000007\n", - "2024-04-08 14:52:23,335: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_108.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:52:25,083: Resetting environment, episode 109, avg. reward: -22.84999999999995\n", - "2024-04-08 14:52:25,086: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_109.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:52:26,589: Resetting environment, episode 110, avg. reward: -10.199999999999996\n", - "2024-04-08 14:52:26,592: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_110.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:52:28,410: Resetting environment, episode 111, avg. reward: -95.99999999999997\n", - "2024-04-08 14:52:28,413: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_111.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:52:29,966: Resetting environment, episode 112, avg. reward: -17.59999999999997\n", - "2024-04-08 14:52:29,969: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_112.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:52:31,317: Resetting environment, episode 113, avg. reward: -20.099999999999962\n", - "2024-04-08 14:52:31,321: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_113.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:52:32,840: Resetting environment, episode 114, avg. reward: -42.850000000000165\n", - "2024-04-08 14:52:32,843: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_114.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:52:34,336: Resetting environment, episode 115, avg. reward: -22.249999999999954\n", - "2024-04-08 14:52:34,339: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_115.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:52:35,794: Resetting environment, episode 116, avg. reward: -90.9\n", - "2024-04-08 14:52:35,797: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_116.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:52:37,489: Resetting environment, episode 117, avg. reward: 5.90000000000003\n", - "2024-04-08 14:52:37,492: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_117.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:52:39,009: Resetting environment, episode 118, avg. reward: -66.1\n", - "2024-04-08 14:52:39,012: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_118.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:52:40,602: Resetting environment, episode 119, avg. reward: -36.749999999999964\n", - "2024-04-08 14:52:40,605: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_119.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:52:42,128: Resetting environment, episode 120, avg. reward: -13.79999999999999\n", - "2024-04-08 14:52:42,131: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_120.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:52:43,990: Resetting environment, episode 121, avg. reward: -30.750000000000007\n", - "2024-04-08 14:52:43,993: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_121.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:52:45,565: Resetting environment, episode 122, avg. reward: -99.95\n", - "2024-04-08 14:52:45,568: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_122.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:52:48,013: Resetting environment, episode 123, avg. reward: 0.3500000000000256\n", - "2024-04-08 14:52:48,016: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_123.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:52:50,029: Resetting environment, episode 124, avg. reward: -15.299999999999981\n", - "2024-04-08 14:52:50,032: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_124.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:52:51,501: Resetting environment, episode 125, avg. reward: -15.149999999999975\n", - "2024-04-08 14:52:51,502: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_125.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:52:53,184: Resetting environment, episode 126, avg. reward: -90.35\n", - "2024-04-08 14:52:53,186: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_126.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:52:54,836: Resetting environment, episode 127, avg. reward: -19.9\n", - "2024-04-08 14:52:54,839: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_127.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:52:56,110: Resetting environment, episode 128, avg. reward: -17.299999999999976\n", - "2024-04-08 14:52:56,113: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_128.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:52:57,610: Resetting environment, episode 129, avg. reward: -12.499999999999996\n", - "2024-04-08 14:52:57,613: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_129.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:52:59,237: Resetting environment, episode 130, avg. reward: -17.24999999999996\n", - "2024-04-08 14:52:59,240: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_130.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:53:00,835: Resetting environment, episode 131, avg. reward: -11.64999999999998\n", - "2024-04-08 14:53:00,838: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_131.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:53:02,203: Resetting environment, episode 132, avg. reward: -27.799999999999986\n", - "2024-04-08 14:53:02,206: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_132.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:53:03,544: Resetting environment, episode 133, avg. reward: -10.399999999999997\n", - "2024-04-08 14:53:03,547: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_133.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:53:04,974: Resetting environment, episode 134, avg. reward: -18.0\n", - "2024-04-08 14:53:04,977: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_134.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:53:06,363: Resetting environment, episode 135, avg. reward: -84.0\n", - "2024-04-08 14:53:06,367: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_135.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:53:07,884: Resetting environment, episode 136, avg. reward: -20.949999999999964\n", - "2024-04-08 14:53:07,886: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_136.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:53:09,146: Resetting environment, episode 137, avg. reward: -13.749999999999984\n", - "2024-04-08 14:53:09,149: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_137.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:53:10,482: Resetting environment, episode 138, avg. reward: -15.299999999999976\n", - "2024-04-08 14:53:10,484: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_138.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:53:11,761: Resetting environment, episode 139, avg. reward: -87.34999999999994\n", - "2024-04-08 14:53:11,764: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_139.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:53:13,069: Resetting environment, episode 140, avg. reward: -13.249999999999986\n", - "2024-04-08 14:53:13,072: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_140.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:53:14,623: Resetting environment, episode 141, avg. reward: -22.499999999999968\n", - "2024-04-08 14:53:14,626: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_141.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:53:16,023: Resetting environment, episode 142, avg. reward: -42.25\n", - "2024-04-08 14:53:16,026: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_142.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:53:17,572: Resetting environment, episode 143, avg. reward: -16.35000000000001\n", - "2024-04-08 14:53:17,575: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_143.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:53:18,887: Resetting environment, episode 144, avg. reward: -80.9\n", - "2024-04-08 14:53:18,891: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_144.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:53:20,236: Resetting environment, episode 145, avg. reward: -15.299999999999974\n", - "2024-04-08 14:53:20,239: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_145.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:53:21,625: Resetting environment, episode 146, avg. reward: -21.799999999999955\n", - "2024-04-08 14:53:21,628: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_146.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:53:23,799: Resetting environment, episode 147, avg. reward: -13.599999999999998\n", - "2024-04-08 14:53:23,802: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_147.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:53:25,308: Resetting environment, episode 148, avg. reward: -99.1\n", - "2024-04-08 14:53:25,310: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_148.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:53:27,254: Resetting environment, episode 149, avg. reward: -16.74999999999997\n", - "2024-04-08 14:53:27,259: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_149.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:53:29,053: Resetting environment, episode 150, avg. reward: -10.749999999999979\n", - "2024-04-08 14:53:29,057: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_150.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:53:30,939: Resetting environment, episode 151, avg. reward: -74.05\n", - "2024-04-08 14:53:30,942: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_151.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:53:32,476: Resetting environment, episode 152, avg. reward: -71.6\n", - "2024-04-08 14:53:32,476: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_152.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:53:34,490: Resetting environment, episode 153, avg. reward: -11.749999999999961\n", - "2024-04-08 14:53:34,493: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_153.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:53:36,594: Resetting environment, episode 154, avg. reward: -8.700000000000005\n", - "2024-04-08 14:53:36,598: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_154.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:53:38,245: Resetting environment, episode 155, avg. reward: -21.649999999999956\n", - "2024-04-08 14:53:38,249: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_155.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:53:39,875: Resetting environment, episode 156, avg. reward: -7.649999999999994\n", - "2024-04-08 14:53:39,879: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_156.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:53:41,685: Resetting environment, episode 157, avg. reward: -80.54999999999998\n", - "2024-04-08 14:53:41,690: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_157.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:53:43,273: Resetting environment, episode 158, avg. reward: -14.799999999999978\n", - "2024-04-08 14:53:43,279: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_158.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:53:44,718: Resetting environment, episode 159, avg. reward: -8.299999999999976\n", - "2024-04-08 14:53:44,720: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_159.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:53:46,211: Resetting environment, episode 160, avg. reward: -45.05000000000009\n", - "2024-04-08 14:53:46,215: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_160.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:53:48,427: Resetting environment, episode 161, avg. reward: -0.29999999999997673\n", - "2024-04-08 14:53:48,431: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_161.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:53:50,514: Resetting environment, episode 162, avg. reward: -24.199999999999946\n", - "2024-04-08 14:53:50,517: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_162.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:53:52,023: Resetting environment, episode 163, avg. reward: -22.249999999999954\n", - "2024-04-08 14:53:52,027: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_163.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:53:53,865: Resetting environment, episode 164, avg. reward: -16.44999999999996\n", - "2024-04-08 14:53:53,868: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_164.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:53:55,434: Resetting environment, episode 165, avg. reward: -75.8\n", - "2024-04-08 14:53:55,437: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_165.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:53:57,361: Resetting environment, episode 166, avg. reward: -15.74999999999998\n", - "2024-04-08 14:53:57,364: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_166.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:53:59,167: Resetting environment, episode 167, avg. reward: -97.04999999999997\n", - "2024-04-08 14:53:59,171: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_167.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:54:00,965: Resetting environment, episode 168, avg. reward: -26.450000000000006\n", - "2024-04-08 14:54:00,970: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_168.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:54:02,555: Resetting environment, episode 169, avg. reward: -1.7999999999999803\n", - "2024-04-08 14:54:02,556: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_169.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:54:04,283: Resetting environment, episode 170, avg. reward: -16.499999999999964\n", - "2024-04-08 14:54:04,292: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_170.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:54:06,710: Resetting environment, episode 171, avg. reward: -56.99999999999997\n", - "2024-04-08 14:54:06,714: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_171.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:54:08,495: Resetting environment, episode 172, avg. reward: -5.550000000000001\n", - "2024-04-08 14:54:08,502: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_172.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:54:10,090: Resetting environment, episode 173, avg. reward: -16.249999999999968\n", - "2024-04-08 14:54:10,094: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_173.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:54:13,065: Resetting environment, episode 174, avg. reward: -6.6499999999999915\n", - "2024-04-08 14:54:13,071: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_174.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:54:15,757: Resetting environment, episode 175, avg. reward: -3.7499999999999707\n", - "2024-04-08 14:54:15,761: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_175.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:54:18,490: Resetting environment, episode 176, avg. reward: 34.24999999999989\n", - "2024-04-08 14:54:18,493: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_176.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:54:20,751: Resetting environment, episode 177, avg. reward: -15.999999999999977\n", - "2024-04-08 14:54:20,755: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_177.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:54:23,269: Resetting environment, episode 178, avg. reward: -80.50000000000001\n", - "2024-04-08 14:54:23,273: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_178.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:54:25,507: Resetting environment, episode 179, avg. reward: -12.849999999999989\n", - "2024-04-08 14:54:25,510: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_179.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:54:27,454: Resetting environment, episode 180, avg. reward: -16.949999999999996\n", - "2024-04-08 14:54:27,458: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_180.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:54:29,884: Resetting environment, episode 181, avg. reward: 1.9000000000000221\n", - "2024-04-08 14:54:29,887: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_181.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:54:32,113: Resetting environment, episode 182, avg. reward: 9.500000000000046\n", - "2024-04-08 14:54:32,117: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_182.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:54:34,283: Resetting environment, episode 183, avg. reward: -91.0500000000001\n", - "2024-04-08 14:54:34,286: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_183.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:54:36,330: Resetting environment, episode 184, avg. reward: -43.15000000000006\n", - "2024-04-08 14:54:36,332: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_184.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:54:38,270: Resetting environment, episode 185, avg. reward: -99.0\n", - "2024-04-08 14:54:38,274: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_185.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:54:40,645: Resetting environment, episode 186, avg. reward: -19.849999999999962\n", - "2024-04-08 14:54:40,648: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_186.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:54:42,998: Resetting environment, episode 187, avg. reward: -24.299999999999983\n", - "2024-04-08 14:54:43,002: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_187.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:54:45,260: Resetting environment, episode 188, avg. reward: -15.449999999999973\n", - "2024-04-08 14:54:45,263: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_188.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:54:47,356: Resetting environment, episode 189, avg. reward: -46.15000000000005\n", - "2024-04-08 14:54:47,362: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_189.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:54:49,422: Resetting environment, episode 190, avg. reward: -15.849999999999996\n", - "2024-04-08 14:54:49,425: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_190.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:54:51,753: Resetting environment, episode 191, avg. reward: 2.200000000000034\n", - "2024-04-08 14:54:51,757: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_191.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:54:54,077: Resetting environment, episode 192, avg. reward: 8.950000000000049\n", - "2024-04-08 14:54:54,081: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_192.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:54:56,257: Resetting environment, episode 193, avg. reward: -10.949999999999985\n", - "2024-04-08 14:54:56,261: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_193.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:54:59,376: Resetting environment, episode 194, avg. reward: -23.449999999999957\n", - "2024-04-08 14:54:59,379: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_194.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:55:02,626: Resetting environment, episode 195, avg. reward: -98.24999999999996\n", - "2024-04-08 14:55:02,630: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_195.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:55:05,232: Resetting environment, episode 196, avg. reward: -20.299999999999976\n", - "2024-04-08 14:55:05,236: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_196.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:55:08,026: Resetting environment, episode 197, avg. reward: -6.399999999999993\n", - "2024-04-08 14:55:08,029: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_197.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:55:09,878: Resetting environment, episode 198, avg. reward: -20.099999999999962\n", - "2024-04-08 14:55:09,882: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_198.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:55:12,337: Resetting environment, episode 199, avg. reward: -20.59999999999996\n", - "2024-04-08 14:55:12,340: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_199.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:55:14,794: Resetting environment, episode 200, avg. reward: -80.65000000000002\n", - "2024-04-08 14:55:14,798: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_200.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:55:17,788: Resetting environment, episode 201, avg. reward: 11.249999999999932\n", - "2024-04-08 14:55:17,792: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_201.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:55:20,227: Resetting environment, episode 202, avg. reward: -85.35\n", - "2024-04-08 14:55:20,230: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_202.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:55:22,623: Resetting environment, episode 203, avg. reward: -67.9\n", - "2024-04-08 14:55:22,626: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_203.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:55:27,001: Resetting environment, episode 204, avg. reward: -94.30000000000017\n", - "2024-04-08 14:55:27,004: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_204.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:55:28,803: Resetting environment, episode 205, avg. reward: -30.39999999999997\n", - "2024-04-08 14:55:28,808: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_205.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:55:30,621: Resetting environment, episode 206, avg. reward: -25.14999999999995\n", - "2024-04-08 14:55:30,623: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_206.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:55:32,191: Resetting environment, episode 207, avg. reward: -98.14999999999998\n", - "2024-04-08 14:55:32,194: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_207.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:55:33,920: Resetting environment, episode 208, avg. reward: -17.64999999999998\n", - "2024-04-08 14:55:33,923: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_208.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:55:36,333: Resetting environment, episode 209, avg. reward: -88.25\n", - "2024-04-08 14:55:36,336: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_209.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:55:38,489: Resetting environment, episode 210, avg. reward: -85.35\n", - "2024-04-08 14:55:38,494: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_210.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:55:40,664: Resetting environment, episode 211, avg. reward: -15.649999999999979\n", - "2024-04-08 14:55:40,668: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_211.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:55:42,341: Resetting environment, episode 212, avg. reward: -15.24999999999998\n", - "2024-04-08 14:55:42,344: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_212.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:55:43,931: Resetting environment, episode 213, avg. reward: -100.25000000000009\n", - "2024-04-08 14:55:43,935: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_213.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:55:45,687: Resetting environment, episode 214, avg. reward: -50.59999999999998\n", - "2024-04-08 14:55:45,690: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_214.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:55:47,397: Resetting environment, episode 215, avg. reward: -14.94999999999998\n", - "2024-04-08 14:55:47,400: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_215.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:55:49,303: Resetting environment, episode 216, avg. reward: -91.64999999999995\n", - "2024-04-08 14:55:49,306: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_216.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:55:50,916: Resetting environment, episode 217, avg. reward: -75.89999999999999\n", - "2024-04-08 14:55:50,918: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_217.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:55:53,007: Resetting environment, episode 218, avg. reward: -91.50000000000007\n", - "2024-04-08 14:55:53,011: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_218.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:55:55,088: Resetting environment, episode 219, avg. reward: -8.300000000000004\n", - "2024-04-08 14:55:55,092: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_219.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:55:57,164: Resetting environment, episode 220, avg. reward: -29.449999999999996\n", - "2024-04-08 14:55:57,167: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_220.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:55:58,938: Resetting environment, episode 221, avg. reward: -38.20000000000004\n", - "2024-04-08 14:55:58,942: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_221.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:56:00,655: Resetting environment, episode 222, avg. reward: -38.60000000000001\n", - "2024-04-08 14:56:00,658: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_222.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:56:02,297: Resetting environment, episode 223, avg. reward: -37.79999999999999\n", - "2024-04-08 14:56:02,300: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_223.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:56:03,931: Resetting environment, episode 224, avg. reward: -53.24999999999996\n", - "2024-04-08 14:56:03,935: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_224.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:56:05,761: Resetting environment, episode 225, avg. reward: -77.99999999999997\n", - "2024-04-08 14:56:05,764: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_225.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:56:07,294: Resetting environment, episode 226, avg. reward: -26.799999999999972\n", - "2024-04-08 14:56:07,298: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_226.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:56:09,002: Resetting environment, episode 227, avg. reward: -94.5500000000001\n", - "2024-04-08 14:56:09,006: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_227.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:56:10,831: Resetting environment, episode 228, avg. reward: -76.05000000000001\n", - "2024-04-08 14:56:10,834: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_228.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:56:12,658: Resetting environment, episode 229, avg. reward: 3.350000000000028\n", - "2024-04-08 14:56:12,661: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_229.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:56:14,404: Resetting environment, episode 230, avg. reward: -51.25000000000004\n", - "2024-04-08 14:56:14,409: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_230.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:56:16,439: Resetting environment, episode 231, avg. reward: -86.5\n", - "2024-04-08 14:56:16,442: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_231.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:56:18,025: Resetting environment, episode 232, avg. reward: -9.550000000000002\n", - "2024-04-08 14:56:18,029: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_232.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:56:19,978: Resetting environment, episode 233, avg. reward: -46.75\n", - "2024-04-08 14:56:19,982: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_233.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:56:21,638: Resetting environment, episode 234, avg. reward: -87.14999999999999\n", - "2024-04-08 14:56:21,642: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_234.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:56:23,262: Resetting environment, episode 235, avg. reward: -60.94999999999995\n", - "2024-04-08 14:56:23,265: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_235.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:56:24,866: Resetting environment, episode 236, avg. reward: -5.299999999999963\n", - "2024-04-08 14:56:24,870: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_236.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:56:26,594: Resetting environment, episode 237, avg. reward: -7.49999999999999\n", - "2024-04-08 14:56:26,597: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_237.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:56:29,812: Resetting environment, episode 238, avg. reward: -4.749999999999977\n", - "2024-04-08 14:56:29,815: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_238.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:56:31,530: Resetting environment, episode 239, avg. reward: -13.349999999999982\n", - "2024-04-08 14:56:31,533: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_239.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:56:33,444: Resetting environment, episode 240, avg. reward: -0.599999999999985\n", - "2024-04-08 14:56:33,447: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_240.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:56:35,290: Resetting environment, episode 241, avg. reward: -95.3\n", - "2024-04-08 14:56:35,292: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_241.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:56:36,923: Resetting environment, episode 242, avg. reward: -94.94999999999996\n", - "2024-04-08 14:56:36,927: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_242.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:56:38,916: Resetting environment, episode 243, avg. reward: -72.49999999999993\n", - "2024-04-08 14:56:38,919: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_243.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:56:40,743: Resetting environment, episode 244, avg. reward: -0.7499999999999888\n", - "2024-04-08 14:56:40,746: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_244.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:56:42,525: Resetting environment, episode 245, avg. reward: -2.5999999999999943\n", - "2024-04-08 14:56:42,528: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_245.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:56:44,452: Resetting environment, episode 246, avg. reward: -79.40000000000002\n", - "2024-04-08 14:56:44,455: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_246.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:56:46,246: Resetting environment, episode 247, avg. reward: -72.7\n", - "2024-04-08 14:56:46,249: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_247.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:56:48,054: Resetting environment, episode 248, avg. reward: -26.04999999999994\n", - "2024-04-08 14:56:48,058: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_248.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:56:50,022: Resetting environment, episode 249, avg. reward: -51.100000000000016\n", - "2024-04-08 14:56:50,025: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_249.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:56:51,853: Resetting environment, episode 250, avg. reward: -9.89999999999996\n", - "2024-04-08 14:56:51,857: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_250.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:56:53,997: Resetting environment, episode 251, avg. reward: -64.64999999999995\n", - "2024-04-08 14:56:54,001: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_251.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:56:56,347: Resetting environment, episode 252, avg. reward: -44.999999999999964\n", - "2024-04-08 14:56:56,350: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_252.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:56:58,286: Resetting environment, episode 253, avg. reward: -91.30000000000001\n", - "2024-04-08 14:56:58,288: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_253.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:57:00,634: Resetting environment, episode 254, avg. reward: -95.24999999999997\n", - "2024-04-08 14:57:00,638: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_254.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:57:02,345: Resetting environment, episode 255, avg. reward: -15.099999999999978\n", - "2024-04-08 14:57:02,350: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_255.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:57:04,152: Resetting environment, episode 256, avg. reward: -84.75000000000011\n", - "2024-04-08 14:57:04,155: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_256.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:57:05,658: Resetting environment, episode 257, avg. reward: -17.399999999999974\n", - "2024-04-08 14:57:05,661: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_257.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:57:07,257: Resetting environment, episode 258, avg. reward: -17.74999999999997\n", - "2024-04-08 14:57:07,267: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_258.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:57:09,280: Resetting environment, episode 259, avg. reward: -95.50000000000001\n", - "2024-04-08 14:57:09,283: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_259.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:57:11,050: Resetting environment, episode 260, avg. reward: -1.4499999999999633\n", - "2024-04-08 14:57:11,054: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_260.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:57:13,023: Resetting environment, episode 261, avg. reward: -92.59999999999997\n", - "2024-04-08 14:57:13,026: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_261.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:57:14,723: Resetting environment, episode 262, avg. reward: -2.5999999999999814\n", - "2024-04-08 14:57:14,726: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_262.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:57:17,321: Resetting environment, episode 263, avg. reward: -60.95000000000002\n", - "2024-04-08 14:57:17,324: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_263.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:57:19,220: Resetting environment, episode 264, avg. reward: -19.449999999999964\n", - "2024-04-08 14:57:19,223: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_264.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:57:21,072: Resetting environment, episode 265, avg. reward: -86.4\n", - "2024-04-08 14:57:21,076: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_265.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:57:22,895: Resetting environment, episode 266, avg. reward: -91.89999999999996\n", - "2024-04-08 14:57:22,899: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_266.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:57:24,815: Resetting environment, episode 267, avg. reward: -44.5\n", - "2024-04-08 14:57:24,819: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_267.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:57:26,841: Resetting environment, episode 268, avg. reward: -3.3999999999999875\n", - "2024-04-08 14:57:26,845: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_268.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:57:28,525: Resetting environment, episode 269, avg. reward: -61.79999999999996\n", - "2024-04-08 14:57:28,528: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_269.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:57:30,709: Resetting environment, episode 270, avg. reward: -72.09999999999991\n", - "2024-04-08 14:57:30,712: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_270.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:57:33,009: Resetting environment, episode 271, avg. reward: -10.749999999999986\n", - "2024-04-08 14:57:33,012: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_271.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:57:34,883: Resetting environment, episode 272, avg. reward: -9.799999999999994\n", - "2024-04-08 14:57:34,886: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_272.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:57:36,728: Resetting environment, episode 273, avg. reward: -59.85000000000001\n", - "2024-04-08 14:57:36,730: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_273.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:57:38,769: Resetting environment, episode 274, avg. reward: -33.500000000000014\n", - "2024-04-08 14:57:38,772: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_274.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:57:40,947: Resetting environment, episode 275, avg. reward: -50.44999999999995\n", - "2024-04-08 14:57:40,950: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_275.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:57:44,475: Resetting environment, episode 276, avg. reward: -5.800000000000008\n", - "2024-04-08 14:57:44,479: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_276.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:57:47,898: Resetting environment, episode 277, avg. reward: -13.899999999999979\n", - "2024-04-08 14:57:47,901: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_277.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:57:50,377: Resetting environment, episode 278, avg. reward: -101.4\n", - "2024-04-08 14:57:50,380: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_278.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:57:52,619: Resetting environment, episode 279, avg. reward: 0.9500000000000095\n", - "2024-04-08 14:57:52,621: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_279.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:57:54,559: Resetting environment, episode 280, avg. reward: -86.94999999999999\n", - "2024-04-08 14:57:54,562: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_280.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:57:56,801: Resetting environment, episode 281, avg. reward: -6.999999999999982\n", - "2024-04-08 14:57:56,803: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_281.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:57:58,672: Resetting environment, episode 282, avg. reward: 11.200000000000063\n", - "2024-04-08 14:57:58,675: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_282.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:58:00,781: Resetting environment, episode 283, avg. reward: -78.80000000000007\n", - "2024-04-08 14:58:00,785: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_283.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:58:02,893: Resetting environment, episode 284, avg. reward: -68.24999999999996\n", - "2024-04-08 14:58:02,896: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_284.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:58:04,854: Resetting environment, episode 285, avg. reward: -43.44999999999995\n", - "2024-04-08 14:58:04,858: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_285.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:58:07,133: Resetting environment, episode 286, avg. reward: -4.199999999999984\n", - "2024-04-08 14:58:07,136: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_286.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:58:09,427: Resetting environment, episode 287, avg. reward: 25.550000000000022\n", - "2024-04-08 14:58:09,430: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_287.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:58:11,576: Resetting environment, episode 288, avg. reward: -11.599999999999985\n", - "2024-04-08 14:58:11,580: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_288.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:58:13,448: Resetting environment, episode 289, avg. reward: -37.44999999999999\n", - "2024-04-08 14:58:13,451: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_289.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:58:15,328: Resetting environment, episode 290, avg. reward: -78.99999999999999\n", - "2024-04-08 14:58:15,331: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_290.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:58:18,155: Resetting environment, episode 291, avg. reward: -56.800000000000026\n", - "2024-04-08 14:58:18,159: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_291.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:58:20,609: Resetting environment, episode 292, avg. reward: -91.19999999999995\n", - "2024-04-08 14:58:20,614: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_292.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:58:22,444: Resetting environment, episode 293, avg. reward: 5.200000000000042\n", - "2024-04-08 14:58:22,447: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_293.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:58:24,809: Resetting environment, episode 294, avg. reward: -20.550000000000047\n", - "2024-04-08 14:58:24,814: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_294.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:58:26,613: Resetting environment, episode 295, avg. reward: -90.79999999999998\n", - "2024-04-08 14:58:26,616: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_295.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:58:28,191: Resetting environment, episode 296, avg. reward: -81.50000000000001\n", - "2024-04-08 14:58:28,191: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_296.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:58:30,080: Resetting environment, episode 297, avg. reward: 18.799999999999965\n", - "2024-04-08 14:58:30,083: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_297.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:58:32,060: Resetting environment, episode 298, avg. reward: -16.649999999999995\n", - "2024-04-08 14:58:32,062: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_298.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:58:34,037: Resetting environment, episode 299, avg. reward: 10.250000000000062\n", - "2024-04-08 14:58:34,040: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_299.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:58:36,089: Resetting environment, episode 300, avg. reward: -41.89999999999998\n", - "2024-04-08 14:58:36,092: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_300.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:58:38,616: Resetting environment, episode 301, avg. reward: 7.69999999999999\n", - "2024-04-08 14:58:38,616: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_301.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:58:40,914: Resetting environment, episode 302, avg. reward: 39.7999999999998\n", - "2024-04-08 14:58:40,918: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_302.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:58:42,618: Resetting environment, episode 303, avg. reward: 6.25000000000006\n", - "2024-04-08 14:58:42,622: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_303.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:58:44,477: Resetting environment, episode 304, avg. reward: -31.200000000000017\n", - "2024-04-08 14:58:44,477: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_304.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:58:46,336: Resetting environment, episode 305, avg. reward: -93.50000000000017\n", - "2024-04-08 14:58:46,340: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_305.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:58:48,689: Resetting environment, episode 306, avg. reward: -33.549999999999955\n", - "2024-04-08 14:58:48,693: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_306.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:58:51,197: Resetting environment, episode 307, avg. reward: -11.599999999999987\n", - "2024-04-08 14:58:51,200: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_307.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:58:53,602: Resetting environment, episode 308, avg. reward: -23.900000000000034\n", - "2024-04-08 14:58:53,605: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_308.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:58:56,033: Resetting environment, episode 309, avg. reward: 3.500000000000001\n", - "2024-04-08 14:58:56,037: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_309.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:58:58,038: Resetting environment, episode 310, avg. reward: 16.04999999999999\n", - "2024-04-08 14:58:58,046: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_310.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:59:00,171: Resetting environment, episode 311, avg. reward: -13.449999999999982\n", - "2024-04-08 14:59:00,174: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_311.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:59:02,046: Resetting environment, episode 312, avg. reward: -82.39999999999998\n", - "2024-04-08 14:59:02,057: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_312.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:59:03,942: Resetting environment, episode 313, avg. reward: 0.3000000000000045\n", - "2024-04-08 14:59:03,944: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_313.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:59:05,578: Resetting environment, episode 314, avg. reward: -90.35000000000015\n", - "2024-04-08 14:59:05,582: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_314.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:59:07,340: Resetting environment, episode 315, avg. reward: 3.3000000000000043\n", - "2024-04-08 14:59:07,343: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_315.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:59:09,117: Resetting environment, episode 316, avg. reward: -44.74999999999995\n", - "2024-04-08 14:59:09,128: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_316.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:59:11,162: Resetting environment, episode 317, avg. reward: 8.450000000000045\n", - "2024-04-08 14:59:11,165: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_317.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:59:13,123: Resetting environment, episode 318, avg. reward: -10.049999999999985\n", - "2024-04-08 14:59:13,127: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_318.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:59:18,061: Resetting environment, episode 319, avg. reward: -17.04999999999999\n", - "2024-04-08 14:59:18,067: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_319.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:59:19,985: Resetting environment, episode 320, avg. reward: -81.19999999999999\n", - "2024-04-08 14:59:19,989: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_320.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:59:22,591: Resetting environment, episode 321, avg. reward: 25.900000000000055\n", - "2024-04-08 14:59:22,593: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_321.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:59:25,075: Resetting environment, episode 322, avg. reward: -6.0500000000000025\n", - "2024-04-08 14:59:25,079: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_322.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:59:27,224: Resetting environment, episode 323, avg. reward: -0.349999999999965\n", - "2024-04-08 14:59:27,227: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_323.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:59:29,419: Resetting environment, episode 324, avg. reward: -42.45\n", - "2024-04-08 14:59:29,423: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_324.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:59:31,350: Resetting environment, episode 325, avg. reward: -36.199999999999974\n", - "2024-04-08 14:59:31,353: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_325.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:59:33,118: Resetting environment, episode 326, avg. reward: -27.699999999999996\n", - "2024-04-08 14:59:33,120: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_326.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:59:35,352: Resetting environment, episode 327, avg. reward: 32.74999999999989\n", - "2024-04-08 14:59:35,356: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_327.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:59:37,251: Resetting environment, episode 328, avg. reward: -16.34999999999998\n", - "2024-04-08 14:59:37,254: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_328.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:59:39,253: Resetting environment, episode 329, avg. reward: -8.000000000000007\n", - "2024-04-08 14:59:39,259: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_329.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:59:41,104: Resetting environment, episode 330, avg. reward: -78.60000000000001\n", - "2024-04-08 14:59:41,107: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_330.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:59:43,172: Resetting environment, episode 331, avg. reward: 12.800000000000024\n", - "2024-04-08 14:59:43,176: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_331.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:59:45,374: Resetting environment, episode 332, avg. reward: 13.349999999999932\n", - "2024-04-08 14:59:45,378: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_332.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:59:47,299: Resetting environment, episode 333, avg. reward: -69.95000000000005\n", - "2024-04-08 14:59:47,302: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_333.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:59:49,565: Resetting environment, episode 334, avg. reward: -88.9000000000001\n", - "2024-04-08 14:59:49,568: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_334.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:59:51,919: Resetting environment, episode 335, avg. reward: -53.49999999999996\n", - "2024-04-08 14:59:51,919: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_335.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:59:54,398: Resetting environment, episode 336, avg. reward: -76.90000000000008\n", - "2024-04-08 14:59:54,401: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_336.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:59:56,196: Resetting environment, episode 337, avg. reward: -43.799999999999955\n", - "2024-04-08 14:59:56,199: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_337.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:59:57,848: Resetting environment, episode 338, avg. reward: -12.200000000000006\n", - "2024-04-08 14:59:57,852: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_338.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 14:59:59,546: Resetting environment, episode 339, avg. reward: -12.549999999999985\n", - "2024-04-08 14:59:59,550: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_339.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 15:00:01,249: Resetting environment, episode 340, avg. reward: -72.65\n", - "2024-04-08 15:00:01,252: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_340.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 15:00:03,211: Resetting environment, episode 341, avg. reward: -84.65000000000006\n", - "2024-04-08 15:00:03,214: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_341.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 15:00:04,902: Resetting environment, episode 342, avg. reward: -88.64999999999998\n", - "2024-04-08 15:00:04,905: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_342.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 15:00:06,894: Resetting environment, episode 343, avg. reward: 37.34999999999988\n", - "2024-04-08 15:00:06,898: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_343.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 15:00:08,548: Resetting environment, episode 344, avg. reward: -95.5\n", - "2024-04-08 15:00:08,551: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_344.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 15:00:10,369: Resetting environment, episode 345, avg. reward: -98.44999999999996\n", - "2024-04-08 15:00:10,372: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_345.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 15:00:12,514: Resetting environment, episode 346, avg. reward: -4.499999999999958\n", - "2024-04-08 15:00:12,517: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_346.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 15:00:14,791: Resetting environment, episode 347, avg. reward: -35.90000000000002\n", - "2024-04-08 15:00:14,795: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_347.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 15:00:17,226: Resetting environment, episode 348, avg. reward: 12.30000000000003\n", - "2024-04-08 15:00:17,230: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_348.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 15:00:18,972: Resetting environment, episode 349, avg. reward: -11.299999999999983\n", - "2024-04-08 15:00:18,972: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_349.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 15:00:20,959: Resetting environment, episode 350, avg. reward: -70.59999999999997\n", - "2024-04-08 15:00:20,962: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_350.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 15:00:22,880: Resetting environment, episode 351, avg. reward: -20.44999999999996\n", - "2024-04-08 15:00:22,883: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_351.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 15:00:24,645: Resetting environment, episode 352, avg. reward: 27.44999999999996\n", - "2024-04-08 15:00:24,649: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_352.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 15:00:26,468: Resetting environment, episode 353, avg. reward: 9.349999999999948\n", - "2024-04-08 15:00:26,470: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_353.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 15:00:28,268: Resetting environment, episode 354, avg. reward: -71.55\n", - "2024-04-08 15:00:28,271: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_354.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 15:00:29,968: Resetting environment, episode 355, avg. reward: -7.849999999999993\n", - "2024-04-08 15:00:29,972: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_355.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 15:00:31,672: Resetting environment, episode 356, avg. reward: -58.14999999999992\n", - "2024-04-08 15:00:31,676: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_356.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 15:00:33,599: Resetting environment, episode 357, avg. reward: 21.54999999999989\n", - "2024-04-08 15:00:33,602: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_357.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 15:00:35,524: Resetting environment, episode 358, avg. reward: 10.350000000000037\n", - "2024-04-08 15:00:35,533: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_358.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 15:00:37,442: Resetting environment, episode 359, avg. reward: 12.749999999999961\n", - "2024-04-08 15:00:37,446: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_359.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 15:00:39,754: Resetting environment, episode 360, avg. reward: 26.849999999999863\n", - "2024-04-08 15:00:39,758: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_360.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 15:00:42,148: Resetting environment, episode 361, avg. reward: 1.9500000000000377\n", - "2024-04-08 15:00:42,152: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_361.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 15:00:44,863: Resetting environment, episode 362, avg. reward: -84.79999999999984\n", - "2024-04-08 15:00:44,867: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_362.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 15:00:47,398: Resetting environment, episode 363, avg. reward: -37.899999999999956\n", - "2024-04-08 15:00:47,402: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_363.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 15:00:50,122: Resetting environment, episode 364, avg. reward: -11.250000000000085\n", - "2024-04-08 15:00:50,126: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_364.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 15:00:52,560: Resetting environment, episode 365, avg. reward: -84.9\n", - "2024-04-08 15:00:52,562: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_365.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 15:00:54,688: Resetting environment, episode 366, avg. reward: -66.45000000000002\n", - "2024-04-08 15:00:54,692: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_366.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 15:00:59,582: Resetting environment, episode 367, avg. reward: 26.95\n", - "2024-04-08 15:00:59,585: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_367.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 15:01:01,883: Resetting environment, episode 368, avg. reward: -36.3\n", - "2024-04-08 15:01:01,886: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_368.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 15:01:04,194: Resetting environment, episode 369, avg. reward: -42.04999999999998\n", - "2024-04-08 15:01:04,197: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_369.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 15:01:06,476: Resetting environment, episode 370, avg. reward: -79.85000000000004\n", - "2024-04-08 15:01:06,480: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_370.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 15:01:08,804: Resetting environment, episode 371, avg. reward: 42.4499999999998\n", - "2024-04-08 15:01:08,809: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_371.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 15:01:11,021: Resetting environment, episode 372, avg. reward: -21.04999999999998\n", - "2024-04-08 15:01:11,025: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_372.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 15:01:13,427: Resetting environment, episode 373, avg. reward: 60.24999999999987\n", - "2024-04-08 15:01:13,430: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_373.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 15:01:15,228: Resetting environment, episode 374, avg. reward: -71.3\n", - "2024-04-08 15:01:15,231: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_374.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 15:01:17,086: Resetting environment, episode 375, avg. reward: 27.249999999999872\n", - "2024-04-08 15:01:17,089: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_375.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 15:01:18,949: Resetting environment, episode 376, avg. reward: 24.149999999999984\n", - "2024-04-08 15:01:18,952: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_376.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 15:01:20,875: Resetting environment, episode 377, avg. reward: -53.54999999999999\n", - "2024-04-08 15:01:20,879: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_377.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 15:01:22,686: Resetting environment, episode 378, avg. reward: 31.84999999999999\n", - "2024-04-08 15:01:22,690: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_378.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 15:01:24,470: Resetting environment, episode 379, avg. reward: -65.4\n", - "2024-04-08 15:01:24,473: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_379.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 15:01:26,345: Resetting environment, episode 380, avg. reward: 52.84999999999978\n", - "2024-04-08 15:01:26,348: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_380.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 15:01:28,494: Resetting environment, episode 381, avg. reward: -50.450000000000024\n", - "2024-04-08 15:01:28,497: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_381.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 15:01:30,231: Resetting environment, episode 382, avg. reward: -71.99999999999991\n", - "2024-04-08 15:01:30,235: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_382.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 15:01:32,232: Resetting environment, episode 383, avg. reward: 20.400000000000073\n", - "2024-04-08 15:01:32,236: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_383.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 15:01:33,887: Resetting environment, episode 384, avg. reward: 14.799999999999994\n", - "2024-04-08 15:01:33,890: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_384.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 15:01:35,491: Resetting environment, episode 385, avg. reward: -46.900000000000055\n", - "2024-04-08 15:01:35,494: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_385.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 15:01:37,246: Resetting environment, episode 386, avg. reward: 0.8999999999999937\n", - "2024-04-08 15:01:37,249: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_386.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 15:01:38,777: Resetting environment, episode 387, avg. reward: -13.35\n", - "2024-04-08 15:01:38,780: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_387.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 15:01:40,765: Resetting environment, episode 388, avg. reward: -66.39999999999996\n", - "2024-04-08 15:01:40,765: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_388.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 15:01:43,096: Resetting environment, episode 389, avg. reward: -60.40000000000004\n", - "2024-04-08 15:01:43,098: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_389.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 15:01:45,309: Resetting environment, episode 390, avg. reward: -40.299999999999976\n", - "2024-04-08 15:01:45,312: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_390.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 15:01:47,533: Resetting environment, episode 391, avg. reward: -9.300000000000024\n", - "2024-04-08 15:01:47,536: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_391.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 15:01:49,645: Resetting environment, episode 392, avg. reward: -68.20000000000002\n", - "2024-04-08 15:01:49,650: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_392.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 15:01:51,698: Resetting environment, episode 393, avg. reward: -12.050000000000015\n", - "2024-04-08 15:01:51,698: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_393.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 15:01:53,431: Resetting environment, episode 394, avg. reward: -45.90000000000007\n", - "2024-04-08 15:01:53,434: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_394.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 15:01:55,444: Resetting environment, episode 395, avg. reward: -7.850000000000001\n", - "2024-04-08 15:01:55,444: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_395.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 15:01:57,778: Resetting environment, episode 396, avg. reward: -81.24999999999994\n", - "2024-04-08 15:01:57,783: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_396.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 15:02:00,035: Resetting environment, episode 397, avg. reward: 35.40000000000004\n", - "2024-04-08 15:02:00,039: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_397.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 15:02:02,146: Resetting environment, episode 398, avg. reward: -9.550000000000082\n", - "2024-04-08 15:02:02,148: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_398.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 15:02:04,122: Resetting environment, episode 399, avg. reward: 10.550000000000026\n", - "2024-04-08 15:02:04,126: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_399.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 15:02:06,128: Resetting environment, episode 400, avg. reward: -2.7499999999999734\n", - "2024-04-08 15:02:06,132: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_400.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 15:02:08,277: Resetting environment, episode 401, avg. reward: 11.199999999999974\n", - "2024-04-08 15:02:08,281: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_401.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 15:02:10,123: Resetting environment, episode 402, avg. reward: 38.94999999999992\n", - "2024-04-08 15:02:10,126: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_402.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 15:02:12,770: Resetting environment, episode 403, avg. reward: 40.150000000000006\n", - "2024-04-08 15:02:12,774: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_403.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 15:02:14,630: Resetting environment, episode 404, avg. reward: -28.65000000000003\n", - "2024-04-08 15:02:14,633: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_404.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 15:02:16,440: Resetting environment, episode 405, avg. reward: 32.25000000000001\n", - "2024-04-08 15:02:16,443: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_405.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 15:02:18,127: Resetting environment, episode 406, avg. reward: -11.699999999999982\n", - "2024-04-08 15:02:18,130: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_406.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 15:02:20,294: Resetting environment, episode 407, avg. reward: 51.299999999999976\n", - "2024-04-08 15:02:20,297: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_407.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 15:02:22,154: Resetting environment, episode 408, avg. reward: 10.399999999999963\n", - "2024-04-08 15:02:22,157: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_408.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 15:02:24,369: Resetting environment, episode 409, avg. reward: -12.599999999999984\n", - "2024-04-08 15:02:24,373: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_409.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 15:02:26,758: Resetting environment, episode 410, avg. reward: 13.600000000000026\n", - "2024-04-08 15:02:26,761: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_410.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 15:02:30,043: Resetting environment, episode 411, avg. reward: 31.89999999999995\n", - "2024-04-08 15:02:30,047: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_411.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 15:02:32,018: Resetting environment, episode 412, avg. reward: 22.050000000000054\n", - "2024-04-08 15:02:32,021: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_412.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 15:02:33,671: Resetting environment, episode 413, avg. reward: 38.74999999999982\n", - "2024-04-08 15:02:33,674: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_413.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 15:02:35,754: Resetting environment, episode 414, avg. reward: 21.250000000000092\n", - "2024-04-08 15:02:35,757: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_414.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 15:02:37,697: Resetting environment, episode 415, avg. reward: 52.64999999999991\n", - "2024-04-08 15:02:37,704: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_415.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 15:02:39,371: Resetting environment, episode 416, avg. reward: 15.300000000000079\n", - "2024-04-08 15:02:39,374: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_416.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 15:02:40,894: Resetting environment, episode 417, avg. reward: -0.24999999999995826\n", - "2024-04-08 15:02:40,896: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_417.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 15:02:42,813: Resetting environment, episode 418, avg. reward: -22.05000000000004\n", - "2024-04-08 15:02:42,817: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_418.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 15:02:44,725: Resetting environment, episode 419, avg. reward: -54.89999999999997\n", - "2024-04-08 15:02:44,727: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_419.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 15:02:48,515: Resetting environment, episode 420, avg. reward: -15.04999999999997\n", - "2024-04-08 15:02:48,518: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_420.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 15:02:50,655: Resetting environment, episode 421, avg. reward: -56.94999999999997\n", - "2024-04-08 15:02:50,659: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_421.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 15:02:52,515: Resetting environment, episode 422, avg. reward: -68.70000000000003\n", - "2024-04-08 15:02:52,517: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_422.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 15:02:54,132: Resetting environment, episode 423, avg. reward: -72.89999999999996\n", - "2024-04-08 15:02:54,134: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_423.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 15:02:55,908: Resetting environment, episode 424, avg. reward: 17.449999999999946\n", - "2024-04-08 15:02:55,911: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_424.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 15:02:57,497: Resetting environment, episode 425, avg. reward: -27.14999999999995\n", - "2024-04-08 15:02:57,501: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_425.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 15:02:59,501: Resetting environment, episode 426, avg. reward: -67.6\n", - "2024-04-08 15:02:59,504: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_426.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 15:03:01,163: Resetting environment, episode 427, avg. reward: 27.7999999999999\n", - "2024-04-08 15:03:01,166: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_427.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 15:03:02,845: Resetting environment, episode 428, avg. reward: 43.599999999999895\n", - "2024-04-08 15:03:02,849: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_428.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 15:03:04,688: Resetting environment, episode 429, avg. reward: 10.649999999999995\n", - "2024-04-08 15:03:04,691: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_429.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 15:03:06,537: Resetting environment, episode 430, avg. reward: 6.549999999999988\n", - "2024-04-08 15:03:06,540: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_430.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 15:03:08,508: Resetting environment, episode 431, avg. reward: -53.84999999999999\n", - "2024-04-08 15:03:08,510: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_431.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 15:03:10,547: Resetting environment, episode 432, avg. reward: -16.399999999999995\n", - "2024-04-08 15:03:10,550: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_432.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 15:03:12,415: Resetting environment, episode 433, avg. reward: 26.500000000000014\n", - "2024-04-08 15:03:12,418: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_433.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 15:03:13,905: Resetting environment, episode 434, avg. reward: -9.04999999999999\n", - "2024-04-08 15:03:13,909: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_434.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 15:03:15,659: Resetting environment, episode 435, avg. reward: -70.59999999999998\n", - "2024-04-08 15:03:15,662: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_435.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 15:03:17,377: Resetting environment, episode 436, avg. reward: 8.600000000000009\n", - "2024-04-08 15:03:17,381: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_436.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 15:03:19,455: Resetting environment, episode 437, avg. reward: 84.10000000000014\n", - "2024-04-08 15:03:19,458: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_437.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 15:03:21,741: Resetting environment, episode 438, avg. reward: -52.299999999999976\n", - "2024-04-08 15:03:21,744: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_438.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 15:03:23,696: Resetting environment, episode 439, avg. reward: 20.199999999999957\n", - "2024-04-08 15:03:23,700: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_439.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 15:03:25,663: Resetting environment, episode 440, avg. reward: -79.10000000000002\n", - "2024-04-08 15:03:25,667: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_440.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 15:03:27,924: Resetting environment, episode 441, avg. reward: 58.799999999999876\n", - "2024-04-08 15:03:27,928: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_441.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 15:03:29,603: Resetting environment, episode 442, avg. reward: -35.64999999999998\n", - "2024-04-08 15:03:29,606: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_442.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 15:03:31,271: Resetting environment, episode 443, avg. reward: -0.7500000000000195\n", - "2024-04-08 15:03:31,274: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_443.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 15:03:33,199: Resetting environment, episode 444, avg. reward: -83.49999999999989\n", - "2024-04-08 15:03:33,203: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_444.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 15:03:35,706: Resetting environment, episode 445, avg. reward: 58.54999999999981\n", - "2024-04-08 15:03:35,710: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_445.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 15:03:37,671: Resetting environment, episode 446, avg. reward: -39.45000000000003\n", - "2024-04-08 15:03:37,673: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_446.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 15:03:40,320: Resetting environment, episode 447, avg. reward: -63.049999999999955\n", - "2024-04-08 15:03:40,324: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_447.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 15:03:42,333: Resetting environment, episode 448, avg. reward: -48.29999999999998\n", - "2024-04-08 15:03:42,336: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_448.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 15:03:44,621: Resetting environment, episode 449, avg. reward: 87.55000000000031\n", - "2024-04-08 15:03:44,625: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_449.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 15:03:46,958: Resetting environment, episode 450, avg. reward: 59.89999999999991\n", - "2024-04-08 15:03:46,962: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_450.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 15:03:49,779: Resetting environment, episode 451, avg. reward: -35.349999999999994\n", - "2024-04-08 15:03:49,783: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_451.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 15:03:51,834: Resetting environment, episode 452, avg. reward: -61.19999999999991\n", - "2024-04-08 15:03:51,837: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_452.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 15:03:53,774: Resetting environment, episode 453, avg. reward: 1.6000000000000005\n", - "2024-04-08 15:03:53,777: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_453.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 15:03:56,025: Resetting environment, episode 454, avg. reward: 13.14999999999995\n", - "2024-04-08 15:03:56,028: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_454.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 15:03:58,535: Resetting environment, episode 455, avg. reward: 19.950000000000003\n", - "2024-04-08 15:03:58,538: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_455.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 15:04:00,845: Resetting environment, episode 456, avg. reward: -33.04999999999999\n", - "2024-04-08 15:04:00,848: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_456.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 15:04:02,904: Resetting environment, episode 457, avg. reward: 39.59999999999999\n", - "2024-04-08 15:04:02,909: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_457.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 15:04:05,202: Resetting environment, episode 458, avg. reward: -8.300000000000002\n", - "2024-04-08 15:04:05,206: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_458.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 15:04:07,216: Resetting environment, episode 459, avg. reward: -85.5\n", - "2024-04-08 15:04:07,219: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_459.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 15:04:09,300: Resetting environment, episode 460, avg. reward: 42.149999999999935\n", - "2024-04-08 15:04:09,304: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_460.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 15:04:11,700: Resetting environment, episode 461, avg. reward: -7.00000000000005\n", - "2024-04-08 15:04:11,703: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_461.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 15:04:13,865: Resetting environment, episode 462, avg. reward: 44.99999999999982\n", - "2024-04-08 15:04:13,868: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_462.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 15:04:15,915: Resetting environment, episode 463, avg. reward: -14.150000000000015\n", - "2024-04-08 15:04:15,919: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_463.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 15:04:18,129: Resetting environment, episode 464, avg. reward: -62.3\n", - "2024-04-08 15:04:18,133: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_464.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 15:04:20,618: Resetting environment, episode 465, avg. reward: -21.85\n", - "2024-04-08 15:04:20,623: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_465.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 15:04:22,808: Resetting environment, episode 466, avg. reward: -21.59999999999995\n", - "2024-04-08 15:04:22,811: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_466.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 15:04:24,768: Resetting environment, episode 467, avg. reward: -14.950000000000008\n", - "2024-04-08 15:04:24,772: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_467.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 15:04:26,660: Resetting environment, episode 468, avg. reward: 18.64999999999998\n", - "2024-04-08 15:04:26,663: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_468.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 15:04:28,354: Resetting environment, episode 469, avg. reward: -10.699999999999989\n", - "2024-04-08 15:04:28,357: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_469.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 15:04:30,242: Resetting environment, episode 470, avg. reward: -53.79999999999998\n", - "2024-04-08 15:04:30,245: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_470.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 15:04:33,035: Resetting environment, episode 471, avg. reward: 84.70000000000006\n", - "2024-04-08 15:04:33,038: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_471.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 15:04:35,091: Resetting environment, episode 472, avg. reward: -7.000000000000062\n", - "2024-04-08 15:04:35,093: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_472.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "ename": "KeyboardInterrupt", - "evalue": "", - "output_type": "error", - "traceback": [ - "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m", - "\u001b[1;31mKeyboardInterrupt\u001b[0m Traceback (most recent call last)", - "Cell \u001b[1;32mIn[8], line 1\u001b[0m\n\u001b[1;32m----> 1\u001b[0m \u001b[43mmodel\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mlearn\u001b[49m\u001b[43m(\u001b[49m\u001b[43mtotal_timesteps\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mTOTAL_TIMESTEPS\u001b[49m\u001b[43m)\u001b[49m\n", - "File \u001b[1;32mc:\\Projects\\PrimAITE\\.venv\\lib\\site-packages\\stable_baselines3\\ppo\\ppo.py:308\u001b[0m, in \u001b[0;36mPPO.learn\u001b[1;34m(self, total_timesteps, callback, log_interval, tb_log_name, reset_num_timesteps, progress_bar)\u001b[0m\n\u001b[0;32m 299\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21mlearn\u001b[39m(\n\u001b[0;32m 300\u001b[0m \u001b[38;5;28mself\u001b[39m: SelfPPO,\n\u001b[0;32m 301\u001b[0m total_timesteps: \u001b[38;5;28mint\u001b[39m,\n\u001b[1;32m (...)\u001b[0m\n\u001b[0;32m 306\u001b[0m progress_bar: \u001b[38;5;28mbool\u001b[39m \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;01mFalse\u001b[39;00m,\n\u001b[0;32m 307\u001b[0m ) \u001b[38;5;241m-\u001b[39m\u001b[38;5;241m>\u001b[39m SelfPPO:\n\u001b[1;32m--> 308\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28;43msuper\u001b[39;49m\u001b[43m(\u001b[49m\u001b[43m)\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mlearn\u001b[49m\u001b[43m(\u001b[49m\n\u001b[0;32m 309\u001b[0m \u001b[43m \u001b[49m\u001b[43mtotal_timesteps\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mtotal_timesteps\u001b[49m\u001b[43m,\u001b[49m\n\u001b[0;32m 310\u001b[0m \u001b[43m \u001b[49m\u001b[43mcallback\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mcallback\u001b[49m\u001b[43m,\u001b[49m\n\u001b[0;32m 311\u001b[0m \u001b[43m \u001b[49m\u001b[43mlog_interval\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mlog_interval\u001b[49m\u001b[43m,\u001b[49m\n\u001b[0;32m 312\u001b[0m \u001b[43m \u001b[49m\u001b[43mtb_log_name\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mtb_log_name\u001b[49m\u001b[43m,\u001b[49m\n\u001b[0;32m 313\u001b[0m \u001b[43m \u001b[49m\u001b[43mreset_num_timesteps\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mreset_num_timesteps\u001b[49m\u001b[43m,\u001b[49m\n\u001b[0;32m 314\u001b[0m \u001b[43m \u001b[49m\u001b[43mprogress_bar\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mprogress_bar\u001b[49m\u001b[43m,\u001b[49m\n\u001b[0;32m 315\u001b[0m \u001b[43m \u001b[49m\u001b[43m)\u001b[49m\n", - "File \u001b[1;32mc:\\Projects\\PrimAITE\\.venv\\lib\\site-packages\\stable_baselines3\\common\\on_policy_algorithm.py:259\u001b[0m, in \u001b[0;36mOnPolicyAlgorithm.learn\u001b[1;34m(self, total_timesteps, callback, log_interval, tb_log_name, reset_num_timesteps, progress_bar)\u001b[0m\n\u001b[0;32m 256\u001b[0m \u001b[38;5;28;01massert\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39menv \u001b[38;5;129;01mis\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m \u001b[38;5;28;01mNone\u001b[39;00m\n\u001b[0;32m 258\u001b[0m \u001b[38;5;28;01mwhile\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mnum_timesteps \u001b[38;5;241m<\u001b[39m total_timesteps:\n\u001b[1;32m--> 259\u001b[0m continue_training \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mcollect_rollouts\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43menv\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mcallback\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mrollout_buffer\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mn_rollout_steps\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mn_steps\u001b[49m\u001b[43m)\u001b[49m\n\u001b[0;32m 261\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m continue_training \u001b[38;5;129;01mis\u001b[39;00m \u001b[38;5;28;01mFalse\u001b[39;00m:\n\u001b[0;32m 262\u001b[0m \u001b[38;5;28;01mbreak\u001b[39;00m\n", - "File \u001b[1;32mc:\\Projects\\PrimAITE\\.venv\\lib\\site-packages\\stable_baselines3\\common\\on_policy_algorithm.py:178\u001b[0m, in \u001b[0;36mOnPolicyAlgorithm.collect_rollouts\u001b[1;34m(self, env, callback, rollout_buffer, n_rollout_steps)\u001b[0m\n\u001b[0;32m 175\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;28misinstance\u001b[39m(\u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39maction_space, spaces\u001b[38;5;241m.\u001b[39mBox):\n\u001b[0;32m 176\u001b[0m clipped_actions \u001b[38;5;241m=\u001b[39m np\u001b[38;5;241m.\u001b[39mclip(actions, \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39maction_space\u001b[38;5;241m.\u001b[39mlow, \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39maction_space\u001b[38;5;241m.\u001b[39mhigh)\n\u001b[1;32m--> 178\u001b[0m new_obs, rewards, dones, infos \u001b[38;5;241m=\u001b[39m \u001b[43menv\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mstep\u001b[49m\u001b[43m(\u001b[49m\u001b[43mclipped_actions\u001b[49m\u001b[43m)\u001b[49m\n\u001b[0;32m 180\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mnum_timesteps \u001b[38;5;241m+\u001b[39m\u001b[38;5;241m=\u001b[39m env\u001b[38;5;241m.\u001b[39mnum_envs\n\u001b[0;32m 182\u001b[0m \u001b[38;5;66;03m# Give access to local variables\u001b[39;00m\n", - "File \u001b[1;32mc:\\Projects\\PrimAITE\\.venv\\lib\\site-packages\\stable_baselines3\\common\\vec_env\\base_vec_env.py:197\u001b[0m, in \u001b[0;36mVecEnv.step\u001b[1;34m(self, actions)\u001b[0m\n\u001b[0;32m 190\u001b[0m \u001b[38;5;250m\u001b[39m\u001b[38;5;124;03m\"\"\"\u001b[39;00m\n\u001b[0;32m 191\u001b[0m \u001b[38;5;124;03mStep the environments with the given action\u001b[39;00m\n\u001b[0;32m 192\u001b[0m \n\u001b[0;32m 193\u001b[0m \u001b[38;5;124;03m:param actions: the action\u001b[39;00m\n\u001b[0;32m 194\u001b[0m \u001b[38;5;124;03m:return: observation, reward, done, information\u001b[39;00m\n\u001b[0;32m 195\u001b[0m \u001b[38;5;124;03m\"\"\"\u001b[39;00m\n\u001b[0;32m 196\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mstep_async(actions)\n\u001b[1;32m--> 197\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mstep_wait\u001b[49m\u001b[43m(\u001b[49m\u001b[43m)\u001b[49m\n", - "File \u001b[1;32mc:\\Projects\\PrimAITE\\.venv\\lib\\site-packages\\stable_baselines3\\common\\vec_env\\dummy_vec_env.py:58\u001b[0m, in \u001b[0;36mDummyVecEnv.step_wait\u001b[1;34m(self)\u001b[0m\n\u001b[0;32m 55\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21mstep_wait\u001b[39m(\u001b[38;5;28mself\u001b[39m) \u001b[38;5;241m-\u001b[39m\u001b[38;5;241m>\u001b[39m VecEnvStepReturn:\n\u001b[0;32m 56\u001b[0m \u001b[38;5;66;03m# Avoid circular imports\u001b[39;00m\n\u001b[0;32m 57\u001b[0m \u001b[38;5;28;01mfor\u001b[39;00m env_idx \u001b[38;5;129;01min\u001b[39;00m \u001b[38;5;28mrange\u001b[39m(\u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mnum_envs):\n\u001b[1;32m---> 58\u001b[0m obs, \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mbuf_rews[env_idx], terminated, truncated, \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mbuf_infos[env_idx] \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43menvs\u001b[49m\u001b[43m[\u001b[49m\u001b[43menv_idx\u001b[49m\u001b[43m]\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mstep\u001b[49m\u001b[43m(\u001b[49m\n\u001b[0;32m 59\u001b[0m \u001b[43m \u001b[49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mactions\u001b[49m\u001b[43m[\u001b[49m\u001b[43menv_idx\u001b[49m\u001b[43m]\u001b[49m\n\u001b[0;32m 60\u001b[0m \u001b[43m \u001b[49m\u001b[43m)\u001b[49m\n\u001b[0;32m 61\u001b[0m \u001b[38;5;66;03m# convert to SB3 VecEnv api\u001b[39;00m\n\u001b[0;32m 62\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mbuf_dones[env_idx] \u001b[38;5;241m=\u001b[39m terminated \u001b[38;5;129;01mor\u001b[39;00m truncated\n", - "File \u001b[1;32mc:\\Projects\\PrimAITE\\.venv\\lib\\site-packages\\stable_baselines3\\common\\monitor.py:94\u001b[0m, in \u001b[0;36mMonitor.step\u001b[1;34m(self, action)\u001b[0m\n\u001b[0;32m 92\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mneeds_reset:\n\u001b[0;32m 93\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m \u001b[38;5;167;01mRuntimeError\u001b[39;00m(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mTried to step environment that needs reset\u001b[39m\u001b[38;5;124m\"\u001b[39m)\n\u001b[1;32m---> 94\u001b[0m observation, reward, terminated, truncated, info \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43menv\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mstep\u001b[49m\u001b[43m(\u001b[49m\u001b[43maction\u001b[49m\u001b[43m)\u001b[49m\n\u001b[0;32m 95\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mrewards\u001b[38;5;241m.\u001b[39mappend(\u001b[38;5;28mfloat\u001b[39m(reward))\n\u001b[0;32m 96\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m terminated \u001b[38;5;129;01mor\u001b[39;00m truncated:\n", - "File \u001b[1;32mC:\\Projects\\PrimAITE\\src\\primaite\\session\\environment.py:54\u001b[0m, in \u001b[0;36mPrimaiteGymEnv.step\u001b[1;34m(self, action)\u001b[0m\n\u001b[0;32m 52\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mgame\u001b[38;5;241m.\u001b[39mapply_agent_actions()\n\u001b[0;32m 53\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mgame\u001b[38;5;241m.\u001b[39madvance_timestep()\n\u001b[1;32m---> 54\u001b[0m state \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mgame\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mget_sim_state\u001b[49m\u001b[43m(\u001b[49m\u001b[43m)\u001b[49m\n\u001b[0;32m 55\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mgame\u001b[38;5;241m.\u001b[39mupdate_agents(state)\n\u001b[0;32m 57\u001b[0m next_obs \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_get_obs() \u001b[38;5;66;03m# this doesn't update observation, just gets the current observation\u001b[39;00m\n", - "File \u001b[1;32mC:\\Projects\\PrimAITE\\src\\primaite\\game\\game.py:149\u001b[0m, in \u001b[0;36mPrimaiteGame.get_sim_state\u001b[1;34m(self)\u001b[0m\n\u001b[0;32m 147\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21mget_sim_state\u001b[39m(\u001b[38;5;28mself\u001b[39m) \u001b[38;5;241m-\u001b[39m\u001b[38;5;241m>\u001b[39m Dict:\n\u001b[0;32m 148\u001b[0m \u001b[38;5;250m \u001b[39m\u001b[38;5;124;03m\"\"\"Get the current state of the simulation.\"\"\"\u001b[39;00m\n\u001b[1;32m--> 149\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43msimulation\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mdescribe_state\u001b[49m\u001b[43m(\u001b[49m\u001b[43m)\u001b[49m\n", - "File \u001b[1;32mC:\\Projects\\PrimAITE\\src\\primaite\\simulator\\sim_container.py:56\u001b[0m, in \u001b[0;36mSimulation.describe_state\u001b[1;34m(self)\u001b[0m\n\u001b[0;32m 45\u001b[0m \u001b[38;5;250m\u001b[39m\u001b[38;5;124;03m\"\"\"\u001b[39;00m\n\u001b[0;32m 46\u001b[0m \u001b[38;5;124;03mProduce a dictionary describing the current state of this object.\u001b[39;00m\n\u001b[0;32m 47\u001b[0m \n\u001b[1;32m (...)\u001b[0m\n\u001b[0;32m 51\u001b[0m \u001b[38;5;124;03m:rtype: Dict\u001b[39;00m\n\u001b[0;32m 52\u001b[0m \u001b[38;5;124;03m\"\"\"\u001b[39;00m\n\u001b[0;32m 53\u001b[0m state \u001b[38;5;241m=\u001b[39m \u001b[38;5;28msuper\u001b[39m()\u001b[38;5;241m.\u001b[39mdescribe_state()\n\u001b[0;32m 54\u001b[0m state\u001b[38;5;241m.\u001b[39mupdate(\n\u001b[0;32m 55\u001b[0m {\n\u001b[1;32m---> 56\u001b[0m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mnetwork\u001b[39m\u001b[38;5;124m\"\u001b[39m: \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mnetwork\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mdescribe_state\u001b[49m\u001b[43m(\u001b[49m\u001b[43m)\u001b[49m,\n\u001b[0;32m 57\u001b[0m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mdomain\u001b[39m\u001b[38;5;124m\"\u001b[39m: \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mdomain\u001b[38;5;241m.\u001b[39mdescribe_state(),\n\u001b[0;32m 58\u001b[0m }\n\u001b[0;32m 59\u001b[0m )\n\u001b[0;32m 60\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m state\n", - "File \u001b[1;32mC:\\Projects\\PrimAITE\\src\\primaite\\simulator\\network\\container.py:223\u001b[0m, in \u001b[0;36mNetwork.describe_state\u001b[1;34m(self)\u001b[0m\n\u001b[0;32m 215\u001b[0m \u001b[38;5;250m\u001b[39m\u001b[38;5;124;03m\"\"\"\u001b[39;00m\n\u001b[0;32m 216\u001b[0m \u001b[38;5;124;03mProduce a dictionary describing the current state of the Network.\u001b[39;00m\n\u001b[0;32m 217\u001b[0m \n\u001b[0;32m 218\u001b[0m \u001b[38;5;124;03m:return: A dictionary capturing the current state of the Network and its child objects.\u001b[39;00m\n\u001b[0;32m 219\u001b[0m \u001b[38;5;124;03m\"\"\"\u001b[39;00m\n\u001b[0;32m 220\u001b[0m state \u001b[38;5;241m=\u001b[39m \u001b[38;5;28msuper\u001b[39m()\u001b[38;5;241m.\u001b[39mdescribe_state()\n\u001b[0;32m 221\u001b[0m state\u001b[38;5;241m.\u001b[39mupdate(\n\u001b[0;32m 222\u001b[0m {\n\u001b[1;32m--> 223\u001b[0m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mnodes\u001b[39m\u001b[38;5;124m\"\u001b[39m: {node\u001b[38;5;241m.\u001b[39mhostname: node\u001b[38;5;241m.\u001b[39mdescribe_state() \u001b[38;5;28;01mfor\u001b[39;00m node \u001b[38;5;129;01min\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mnodes\u001b[38;5;241m.\u001b[39mvalues()},\n\u001b[0;32m 224\u001b[0m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mlinks\u001b[39m\u001b[38;5;124m\"\u001b[39m: {},\n\u001b[0;32m 225\u001b[0m }\n\u001b[0;32m 226\u001b[0m )\n\u001b[0;32m 227\u001b[0m \u001b[38;5;66;03m# Update the links one-by-one. The key is a 4-tuple of `hostname_a, port_a, hostname_b, port_b`\u001b[39;00m\n\u001b[0;32m 228\u001b[0m \u001b[38;5;28;01mfor\u001b[39;00m _, link \u001b[38;5;129;01min\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mlinks\u001b[38;5;241m.\u001b[39mitems():\n", - "File \u001b[1;32mC:\\Projects\\PrimAITE\\src\\primaite\\simulator\\network\\container.py:223\u001b[0m, in \u001b[0;36m\u001b[1;34m(.0)\u001b[0m\n\u001b[0;32m 215\u001b[0m \u001b[38;5;250m\u001b[39m\u001b[38;5;124;03m\"\"\"\u001b[39;00m\n\u001b[0;32m 216\u001b[0m \u001b[38;5;124;03mProduce a dictionary describing the current state of the Network.\u001b[39;00m\n\u001b[0;32m 217\u001b[0m \n\u001b[0;32m 218\u001b[0m \u001b[38;5;124;03m:return: A dictionary capturing the current state of the Network and its child objects.\u001b[39;00m\n\u001b[0;32m 219\u001b[0m \u001b[38;5;124;03m\"\"\"\u001b[39;00m\n\u001b[0;32m 220\u001b[0m state \u001b[38;5;241m=\u001b[39m \u001b[38;5;28msuper\u001b[39m()\u001b[38;5;241m.\u001b[39mdescribe_state()\n\u001b[0;32m 221\u001b[0m state\u001b[38;5;241m.\u001b[39mupdate(\n\u001b[0;32m 222\u001b[0m {\n\u001b[1;32m--> 223\u001b[0m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mnodes\u001b[39m\u001b[38;5;124m\"\u001b[39m: {node\u001b[38;5;241m.\u001b[39mhostname: \u001b[43mnode\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mdescribe_state\u001b[49m\u001b[43m(\u001b[49m\u001b[43m)\u001b[49m \u001b[38;5;28;01mfor\u001b[39;00m node \u001b[38;5;129;01min\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mnodes\u001b[38;5;241m.\u001b[39mvalues()},\n\u001b[0;32m 224\u001b[0m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mlinks\u001b[39m\u001b[38;5;124m\"\u001b[39m: {},\n\u001b[0;32m 225\u001b[0m }\n\u001b[0;32m 226\u001b[0m )\n\u001b[0;32m 227\u001b[0m \u001b[38;5;66;03m# Update the links one-by-one. The key is a 4-tuple of `hostname_a, port_a, hostname_b, port_b`\u001b[39;00m\n\u001b[0;32m 228\u001b[0m \u001b[38;5;28;01mfor\u001b[39;00m _, link \u001b[38;5;129;01min\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mlinks\u001b[38;5;241m.\u001b[39mitems():\n", - "File \u001b[1;32mC:\\Projects\\PrimAITE\\src\\primaite\\simulator\\network\\hardware\\base.py:920\u001b[0m, in \u001b[0;36mNode.describe_state\u001b[1;34m(self)\u001b[0m\n\u001b[0;32m 902\u001b[0m \u001b[38;5;250m\u001b[39m\u001b[38;5;124;03m\"\"\"\u001b[39;00m\n\u001b[0;32m 903\u001b[0m \u001b[38;5;124;03mProduce a dictionary describing the current state of this object.\u001b[39;00m\n\u001b[0;32m 904\u001b[0m \n\u001b[1;32m (...)\u001b[0m\n\u001b[0;32m 908\u001b[0m \u001b[38;5;124;03m:rtype: Dict\u001b[39;00m\n\u001b[0;32m 909\u001b[0m \u001b[38;5;124;03m\"\"\"\u001b[39;00m\n\u001b[0;32m 910\u001b[0m state \u001b[38;5;241m=\u001b[39m \u001b[38;5;28msuper\u001b[39m()\u001b[38;5;241m.\u001b[39mdescribe_state()\n\u001b[0;32m 911\u001b[0m state\u001b[38;5;241m.\u001b[39mupdate(\n\u001b[0;32m 912\u001b[0m {\n\u001b[0;32m 913\u001b[0m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mhostname\u001b[39m\u001b[38;5;124m\"\u001b[39m: \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mhostname,\n\u001b[0;32m 914\u001b[0m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124moperating_state\u001b[39m\u001b[38;5;124m\"\u001b[39m: \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39moperating_state\u001b[38;5;241m.\u001b[39mvalue,\n\u001b[0;32m 915\u001b[0m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mNICs\u001b[39m\u001b[38;5;124m\"\u001b[39m: {\n\u001b[0;32m 916\u001b[0m eth_num: network_interface\u001b[38;5;241m.\u001b[39mdescribe_state()\n\u001b[0;32m 917\u001b[0m \u001b[38;5;28;01mfor\u001b[39;00m eth_num, network_interface \u001b[38;5;129;01min\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mnetwork_interface\u001b[38;5;241m.\u001b[39mitems()\n\u001b[0;32m 918\u001b[0m },\n\u001b[0;32m 919\u001b[0m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mfile_system\u001b[39m\u001b[38;5;124m\"\u001b[39m: \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mfile_system\u001b[38;5;241m.\u001b[39mdescribe_state(),\n\u001b[1;32m--> 920\u001b[0m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mapplications\u001b[39m\u001b[38;5;124m\"\u001b[39m: {app\u001b[38;5;241m.\u001b[39mname: app\u001b[38;5;241m.\u001b[39mdescribe_state() \u001b[38;5;28;01mfor\u001b[39;00m app \u001b[38;5;129;01min\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mapplications\u001b[38;5;241m.\u001b[39mvalues()},\n\u001b[0;32m 921\u001b[0m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mservices\u001b[39m\u001b[38;5;124m\"\u001b[39m: {svc\u001b[38;5;241m.\u001b[39mname: svc\u001b[38;5;241m.\u001b[39mdescribe_state() \u001b[38;5;28;01mfor\u001b[39;00m svc \u001b[38;5;129;01min\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mservices\u001b[38;5;241m.\u001b[39mvalues()},\n\u001b[0;32m 922\u001b[0m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mprocess\u001b[39m\u001b[38;5;124m\"\u001b[39m: {proc\u001b[38;5;241m.\u001b[39mname: proc\u001b[38;5;241m.\u001b[39mdescribe_state() \u001b[38;5;28;01mfor\u001b[39;00m proc \u001b[38;5;129;01min\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mprocesses\u001b[38;5;241m.\u001b[39mvalues()},\n\u001b[0;32m 923\u001b[0m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mrevealed_to_red\u001b[39m\u001b[38;5;124m\"\u001b[39m: \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mrevealed_to_red,\n\u001b[0;32m 924\u001b[0m }\n\u001b[0;32m 925\u001b[0m )\n\u001b[0;32m 926\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m state\n", - "File \u001b[1;32mC:\\Projects\\PrimAITE\\src\\primaite\\simulator\\network\\hardware\\base.py:920\u001b[0m, in \u001b[0;36m\u001b[1;34m(.0)\u001b[0m\n\u001b[0;32m 902\u001b[0m \u001b[38;5;250m\u001b[39m\u001b[38;5;124;03m\"\"\"\u001b[39;00m\n\u001b[0;32m 903\u001b[0m \u001b[38;5;124;03mProduce a dictionary describing the current state of this object.\u001b[39;00m\n\u001b[0;32m 904\u001b[0m \n\u001b[1;32m (...)\u001b[0m\n\u001b[0;32m 908\u001b[0m \u001b[38;5;124;03m:rtype: Dict\u001b[39;00m\n\u001b[0;32m 909\u001b[0m \u001b[38;5;124;03m\"\"\"\u001b[39;00m\n\u001b[0;32m 910\u001b[0m state \u001b[38;5;241m=\u001b[39m \u001b[38;5;28msuper\u001b[39m()\u001b[38;5;241m.\u001b[39mdescribe_state()\n\u001b[0;32m 911\u001b[0m state\u001b[38;5;241m.\u001b[39mupdate(\n\u001b[0;32m 912\u001b[0m {\n\u001b[0;32m 913\u001b[0m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mhostname\u001b[39m\u001b[38;5;124m\"\u001b[39m: \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mhostname,\n\u001b[0;32m 914\u001b[0m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124moperating_state\u001b[39m\u001b[38;5;124m\"\u001b[39m: \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39moperating_state\u001b[38;5;241m.\u001b[39mvalue,\n\u001b[0;32m 915\u001b[0m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mNICs\u001b[39m\u001b[38;5;124m\"\u001b[39m: {\n\u001b[0;32m 916\u001b[0m eth_num: network_interface\u001b[38;5;241m.\u001b[39mdescribe_state()\n\u001b[0;32m 917\u001b[0m \u001b[38;5;28;01mfor\u001b[39;00m eth_num, network_interface \u001b[38;5;129;01min\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mnetwork_interface\u001b[38;5;241m.\u001b[39mitems()\n\u001b[0;32m 918\u001b[0m },\n\u001b[0;32m 919\u001b[0m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mfile_system\u001b[39m\u001b[38;5;124m\"\u001b[39m: \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mfile_system\u001b[38;5;241m.\u001b[39mdescribe_state(),\n\u001b[1;32m--> 920\u001b[0m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mapplications\u001b[39m\u001b[38;5;124m\"\u001b[39m: {app\u001b[38;5;241m.\u001b[39mname: \u001b[43mapp\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mdescribe_state\u001b[49m\u001b[43m(\u001b[49m\u001b[43m)\u001b[49m \u001b[38;5;28;01mfor\u001b[39;00m app \u001b[38;5;129;01min\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mapplications\u001b[38;5;241m.\u001b[39mvalues()},\n\u001b[0;32m 921\u001b[0m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mservices\u001b[39m\u001b[38;5;124m\"\u001b[39m: {svc\u001b[38;5;241m.\u001b[39mname: svc\u001b[38;5;241m.\u001b[39mdescribe_state() \u001b[38;5;28;01mfor\u001b[39;00m svc \u001b[38;5;129;01min\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mservices\u001b[38;5;241m.\u001b[39mvalues()},\n\u001b[0;32m 922\u001b[0m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mprocess\u001b[39m\u001b[38;5;124m\"\u001b[39m: {proc\u001b[38;5;241m.\u001b[39mname: proc\u001b[38;5;241m.\u001b[39mdescribe_state() \u001b[38;5;28;01mfor\u001b[39;00m proc \u001b[38;5;129;01min\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mprocesses\u001b[38;5;241m.\u001b[39mvalues()},\n\u001b[0;32m 923\u001b[0m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mrevealed_to_red\u001b[39m\u001b[38;5;124m\"\u001b[39m: \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mrevealed_to_red,\n\u001b[0;32m 924\u001b[0m }\n\u001b[0;32m 925\u001b[0m )\n\u001b[0;32m 926\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m state\n", - "File \u001b[1;32mC:\\Projects\\PrimAITE\\src\\primaite\\simulator\\system\\applications\\web_browser.py:75\u001b[0m, in \u001b[0;36mWebBrowser.describe_state\u001b[1;34m(self)\u001b[0m\n\u001b[0;32m 69\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21mdescribe_state\u001b[39m(\u001b[38;5;28mself\u001b[39m) \u001b[38;5;241m-\u001b[39m\u001b[38;5;241m>\u001b[39m Dict:\n\u001b[0;32m 70\u001b[0m \u001b[38;5;250m \u001b[39m\u001b[38;5;124;03m\"\"\"\u001b[39;00m\n\u001b[0;32m 71\u001b[0m \u001b[38;5;124;03m Produce a dictionary describing the current state of the WebBrowser.\u001b[39;00m\n\u001b[0;32m 72\u001b[0m \n\u001b[0;32m 73\u001b[0m \u001b[38;5;124;03m :return: A dictionary capturing the current state of the WebBrowser and its child objects.\u001b[39;00m\n\u001b[0;32m 74\u001b[0m \u001b[38;5;124;03m \"\"\"\u001b[39;00m\n\u001b[1;32m---> 75\u001b[0m state \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;43msuper\u001b[39;49m\u001b[43m(\u001b[49m\u001b[43m)\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mdescribe_state\u001b[49m\u001b[43m(\u001b[49m\u001b[43m)\u001b[49m\n\u001b[0;32m 76\u001b[0m state[\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mhistory\u001b[39m\u001b[38;5;124m\"\u001b[39m] \u001b[38;5;241m=\u001b[39m [hist_item\u001b[38;5;241m.\u001b[39mstate() \u001b[38;5;28;01mfor\u001b[39;00m hist_item \u001b[38;5;129;01min\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mhistory]\n\u001b[0;32m 77\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m state\n", - "File \u001b[1;32mC:\\Projects\\PrimAITE\\src\\primaite\\simulator\\system\\applications\\application.py:64\u001b[0m, in \u001b[0;36mApplication.describe_state\u001b[1;34m(self)\u001b[0m\n\u001b[0;32m 54\u001b[0m \u001b[38;5;129m@abstractmethod\u001b[39m\n\u001b[0;32m 55\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21mdescribe_state\u001b[39m(\u001b[38;5;28mself\u001b[39m) \u001b[38;5;241m-\u001b[39m\u001b[38;5;241m>\u001b[39m Dict:\n\u001b[0;32m 56\u001b[0m \u001b[38;5;250m \u001b[39m\u001b[38;5;124;03m\"\"\"\u001b[39;00m\n\u001b[0;32m 57\u001b[0m \u001b[38;5;124;03m Produce a dictionary describing the current state of this object.\u001b[39;00m\n\u001b[0;32m 58\u001b[0m \n\u001b[1;32m (...)\u001b[0m\n\u001b[0;32m 62\u001b[0m \u001b[38;5;124;03m :rtype: Dict\u001b[39;00m\n\u001b[0;32m 63\u001b[0m \u001b[38;5;124;03m \"\"\"\u001b[39;00m\n\u001b[1;32m---> 64\u001b[0m state \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;43msuper\u001b[39;49m\u001b[43m(\u001b[49m\u001b[43m)\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mdescribe_state\u001b[49m\u001b[43m(\u001b[49m\u001b[43m)\u001b[49m\n\u001b[0;32m 65\u001b[0m state\u001b[38;5;241m.\u001b[39mupdate(\n\u001b[0;32m 66\u001b[0m {\n\u001b[0;32m 67\u001b[0m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124moperating_state\u001b[39m\u001b[38;5;124m\"\u001b[39m: \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39moperating_state\u001b[38;5;241m.\u001b[39mvalue,\n\u001b[1;32m (...)\u001b[0m\n\u001b[0;32m 71\u001b[0m }\n\u001b[0;32m 72\u001b[0m )\n\u001b[0;32m 73\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m state\n", - "File \u001b[1;32mC:\\Projects\\PrimAITE\\src\\primaite\\simulator\\system\\software.py:263\u001b[0m, in \u001b[0;36mIOSoftware.describe_state\u001b[1;34m(self)\u001b[0m\n\u001b[0;32m 253\u001b[0m \u001b[38;5;129m@abstractmethod\u001b[39m\n\u001b[0;32m 254\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21mdescribe_state\u001b[39m(\u001b[38;5;28mself\u001b[39m) \u001b[38;5;241m-\u001b[39m\u001b[38;5;241m>\u001b[39m Dict:\n\u001b[0;32m 255\u001b[0m \u001b[38;5;250m \u001b[39m\u001b[38;5;124;03m\"\"\"\u001b[39;00m\n\u001b[0;32m 256\u001b[0m \u001b[38;5;124;03m Produce a dictionary describing the current state of this object.\u001b[39;00m\n\u001b[0;32m 257\u001b[0m \n\u001b[1;32m (...)\u001b[0m\n\u001b[0;32m 261\u001b[0m \u001b[38;5;124;03m :rtype: Dict\u001b[39;00m\n\u001b[0;32m 262\u001b[0m \u001b[38;5;124;03m \"\"\"\u001b[39;00m\n\u001b[1;32m--> 263\u001b[0m state \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;43msuper\u001b[39;49m\u001b[43m(\u001b[49m\u001b[43m)\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mdescribe_state\u001b[49m\u001b[43m(\u001b[49m\u001b[43m)\u001b[49m\n\u001b[0;32m 264\u001b[0m state\u001b[38;5;241m.\u001b[39mupdate(\n\u001b[0;32m 265\u001b[0m {\n\u001b[0;32m 266\u001b[0m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124minstalling_count\u001b[39m\u001b[38;5;124m\"\u001b[39m: \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39minstalling_count,\n\u001b[1;32m (...)\u001b[0m\n\u001b[0;32m 271\u001b[0m }\n\u001b[0;32m 272\u001b[0m )\n\u001b[0;32m 273\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m state\n", - "File \u001b[1;32mC:\\Projects\\PrimAITE\\src\\primaite\\simulator\\system\\software.py:149\u001b[0m, in \u001b[0;36mSoftware.describe_state\u001b[1;34m(self)\u001b[0m\n\u001b[0;32m 138\u001b[0m \u001b[38;5;250m\u001b[39m\u001b[38;5;124;03m\"\"\"\u001b[39;00m\n\u001b[0;32m 139\u001b[0m \u001b[38;5;124;03mProduce a dictionary describing the current state of this object.\u001b[39;00m\n\u001b[0;32m 140\u001b[0m \n\u001b[1;32m (...)\u001b[0m\n\u001b[0;32m 144\u001b[0m \u001b[38;5;124;03m:rtype: Dict\u001b[39;00m\n\u001b[0;32m 145\u001b[0m \u001b[38;5;124;03m\"\"\"\u001b[39;00m\n\u001b[0;32m 146\u001b[0m state \u001b[38;5;241m=\u001b[39m \u001b[38;5;28msuper\u001b[39m()\u001b[38;5;241m.\u001b[39mdescribe_state()\n\u001b[0;32m 147\u001b[0m state\u001b[38;5;241m.\u001b[39mupdate(\n\u001b[0;32m 148\u001b[0m {\n\u001b[1;32m--> 149\u001b[0m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mhealth_state_actual\u001b[39m\u001b[38;5;124m\"\u001b[39m: \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mhealth_state_actual\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mvalue\u001b[49m,\n\u001b[0;32m 150\u001b[0m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mhealth_state_visible\u001b[39m\u001b[38;5;124m\"\u001b[39m: \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mhealth_state_visible\u001b[38;5;241m.\u001b[39mvalue,\n\u001b[0;32m 151\u001b[0m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mcriticality\u001b[39m\u001b[38;5;124m\"\u001b[39m: \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mcriticality\u001b[38;5;241m.\u001b[39mvalue,\n\u001b[0;32m 152\u001b[0m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mfixing_count\u001b[39m\u001b[38;5;124m\"\u001b[39m: \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mfixing_count,\n\u001b[0;32m 153\u001b[0m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mscanning_count\u001b[39m\u001b[38;5;124m\"\u001b[39m: \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mscanning_count,\n\u001b[0;32m 154\u001b[0m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mrevealed_to_red\u001b[39m\u001b[38;5;124m\"\u001b[39m: \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mrevealed_to_red,\n\u001b[0;32m 155\u001b[0m }\n\u001b[0;32m 156\u001b[0m )\n\u001b[0;32m 157\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m state\n", - "File \u001b[1;32m~\\AppData\\Local\\Programs\\Python\\Python310\\lib\\types.py:177\u001b[0m, in \u001b[0;36mDynamicClassAttribute.__get__\u001b[1;34m(self, instance, ownerclass)\u001b[0m\n\u001b[0;32m 176\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21m__get__\u001b[39m(\u001b[38;5;28mself\u001b[39m, instance, ownerclass\u001b[38;5;241m=\u001b[39m\u001b[38;5;28;01mNone\u001b[39;00m):\n\u001b[1;32m--> 177\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[43minstance\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;129;43;01mis\u001b[39;49;00m\u001b[43m \u001b[49m\u001b[38;5;28;43;01mNone\u001b[39;49;00m:\n\u001b[0;32m 178\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m__isabstractmethod__:\n\u001b[0;32m 179\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28mself\u001b[39m\n", - "\u001b[1;31mKeyboardInterrupt\u001b[0m: " - ] - } - ], + "outputs": [], "source": [ "model.learn(total_timesteps=TOTAL_TIMESTEPS)\n" ] }, { "cell_type": "code", - "execution_count": 9, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -7216,7 +83,7 @@ }, { "cell_type": "code", - "execution_count": 10, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -7226,187 +93,9 @@ }, { "cell_type": "code", - "execution_count": 11, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "name": "stderr", - "output_type": "stream", - "text": [ - "c:\\Projects\\PrimAITE\\.venv\\lib\\site-packages\\stable_baselines3\\common\\evaluation.py:67: UserWarning: Evaluation environment is not wrapped with a ``Monitor`` wrapper. This may result in reporting modified episode lengths and rewards, if other wrappers happen to modify these. Consider wrapping environment first with ``Monitor`` wrapper.\n", - " warnings.warn(\n", - "2024-04-08 15:04:51,136: Resetting environment, episode 473, avg. reward: 0.0\n", - "2024-04-08 15:04:51,140: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_473.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 15:04:53,329: Resetting environment, episode 474, avg. reward: -62.59999999999992\n", - "2024-04-08 15:04:53,332: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_474.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 15:04:55,400: Resetting environment, episode 475, avg. reward: -58.649999999999935\n", - "2024-04-08 15:04:55,403: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_475.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 15:04:57,612: Resetting environment, episode 476, avg. reward: -54.549999999999955\n", - "2024-04-08 15:04:57,617: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_476.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 15:05:02,916: Resetting environment, episode 477, avg. reward: -64.99999999999991\n", - "2024-04-08 15:05:02,918: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_477.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 15:05:05,225: Resetting environment, episode 478, avg. reward: -53.19999999999996\n", - "2024-04-08 15:05:05,228: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_478.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 15:05:07,766: Resetting environment, episode 479, avg. reward: -55.79999999999997\n", - "2024-04-08 15:05:07,769: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_479.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 15:05:10,062: Resetting environment, episode 480, avg. reward: -32.75000000000003\n", - "2024-04-08 15:05:10,065: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_480.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 15:05:12,370: Resetting environment, episode 481, avg. reward: -23.549999999999986\n", - "2024-04-08 15:05:12,373: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_481.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 15:05:14,716: Resetting environment, episode 482, avg. reward: -15.04999999999997\n", - "2024-04-08 15:05:14,719: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_482.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-04-08 15:05:16,779: Resetting environment, episode 483, avg. reward: -50.549999999999976\n", - "2024-04-08 15:05:16,782: Saving agent action log to C:\\Users\\CharlieCrane\\primaite\\3.0.0b7\\sessions\\2024-04-08\\14-49-25\\agent_actions\\episode_483.json\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'CUSTOM', 'options': {'components': [{'type': 'NODES', 'label': 'NODES', 'options': {'hosts': [{'hostname': 'domain_controller'}, {'hostname': 'web_server', 'services': [{'service_name': 'WebServer'}]}, {'hostname': 'database_server', 'folders': [{'folder_name': 'database', 'files': [{'file_name': 'database.db'}]}]}, {'hostname': 'backup_server'}, {'hostname': 'security_suite'}, {'hostname': 'client_1'}, {'hostname': 'client_2'}], 'num_services': 1, 'num_applications': 0, 'num_folders': 1, 'num_files': 1, 'num_nics': 2, 'include_num_access': False, 'include_nmne': True, 'routers': [{'hostname': 'router_1'}], 'num_ports': 0, 'ip_list': ['192.168.1.10', '192.168.1.12', '192.168.1.14', '192.168.1.16', '192.168.1.110', '192.168.10.21', '192.168.10.22', '192.168.10.110'], 'wildcard_list': ['0.0.0.1'], 'port_list': [80, 5432], 'protocol_list': ['ICMP', 'TCP', 'UDP'], 'num_rules': 10}}, {'type': 'LINKS', 'label': 'LINKS', 'options': {'link_references': ['router_1:eth-1<->switch_1:eth-8', 'router_1:eth-2<->switch_2:eth-8', 'switch_1:eth-1<->domain_controller:eth-1', 'switch_1:eth-2<->web_server:eth-1', 'switch_1:eth-3<->database_server:eth-1', 'switch_1:eth-4<->backup_server:eth-1', 'switch_1:eth-7<->security_suite:eth-1', 'switch_2:eth-1<->client_1:eth-1', 'switch_2:eth-2<->client_2:eth-1', 'switch_2:eth-7<->security_suite:eth-2']}}, {'type': 'NONE', 'label': 'ICS', 'options': {}}]}}\n" - ] - }, - { - "data": { - "text/plain": [ - "(-47.170001389086245, 16.315777792523683)" - ] - }, - "execution_count": 11, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "from stable_baselines3.common.evaluation import evaluate_policy\n", "\n", From 0828f70b4c277fd02c3bf1e55502bbc9bf4012d2 Mon Sep 17 00:00:00 2001 From: Marek Wolan Date: Mon, 15 Apr 2024 11:50:08 +0100 Subject: [PATCH 102/124] #2459 back-sync b8 changes into core --- .pre-commit-config.yaml | 6 +- docs/source/configuration/agents.rst | 2 +- .../simulation/nodes/firewall.rst | 56 ++-- docs/source/simulation.rst | 2 + .../_package_data/data_manipulation.yaml | 52 ++- .../_package_data/data_manipulation_marl.yaml | 64 ++-- src/primaite/game/agent/actions.py | 75 +++-- .../agent/observations/link_observation.py | 5 +- .../agent/observations/observation_manager.py | 1 - src/primaite/game/agent/rewards.py | 1 + .../agent/scripted_agents/random_agent.py | 64 +++- .../game/agent/scripted_agents/tap001.py | 78 +++++ src/primaite/game/game.py | 46 +++ src/primaite/session/environment.py | 5 + src/primaite/session/io.py | 8 +- src/primaite/simulator/__init__.py | 1 + src/primaite/simulator/core.py | 9 + src/primaite/simulator/file_system/file.py | 4 + .../simulator/file_system/file_system.py | 12 +- src/primaite/simulator/file_system/folder.py | 7 + src/primaite/simulator/network/container.py | 20 +- src/primaite/simulator/network/creation.py | 14 +- .../simulator/network/hardware/base.py | 35 +- .../hardware/nodes/network/firewall.py | 12 + .../network/hardware/nodes/network/router.py | 51 ++- .../network/hardware/nodes/network/switch.py | 9 +- .../network/transmission/data_link_layer.py | 36 +- .../network/transmission/transport_layer.py | 3 + src/primaite/simulator/sim_container.py | 5 + .../system/applications/application.py | 5 +- .../system/applications/database_client.py | 57 ++-- .../red_applications/ransomware_script.py | 316 ++++++++++++++++++ src/primaite/simulator/system/core/sys_log.py | 19 +- .../services/database/database_service.py | 33 +- .../system/services/ntp/ntp_client.py | 8 +- src/primaite/simulator/system/software.py | 4 + .../assets/configs/bad_primaite_session.yaml | 38 ++- tests/assets/configs/basic_firewall.yaml | 14 - .../configs/basic_switched_network.yaml | 15 - tests/assets/configs/dmz_network.yaml | 14 - .../configs/eval_only_primaite_session.yaml | 38 ++- .../configs/firewall_actions_network.yaml | 42 +-- tests/assets/configs/multi_agent_session.yaml | 76 +++-- .../no_nodes_links_agents_network.yaml | 14 - tests/assets/configs/shared_rewards.yaml | 42 +-- .../configs/test_application_install.yaml | 38 ++- .../assets/configs/test_primaite_session.yaml | 38 ++- .../configs/train_only_primaite_session.yaml | 38 ++- tests/conftest.py | 6 +- .../game_layer/test_actions.py | 4 + .../network/test_capture_nmne.py | 94 +++++- .../integration_tests/network/test_routing.py | 16 + .../test_dos_bot_and_server.py | 4 + .../test_ransomware_script.py | 163 +++++++++ .../_file_system/test_file_system.py | 5 + 55 files changed, 1383 insertions(+), 441 deletions(-) create mode 100644 src/primaite/game/agent/scripted_agents/tap001.py create mode 100644 src/primaite/simulator/system/applications/red_applications/ransomware_script.py create mode 100644 tests/integration_tests/system/red_applications/test_ransomware_script.py diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 494ea937..56dc6424 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -6,7 +6,7 @@ repos: - id: end-of-file-fixer - id: trailing-whitespace - id: check-added-large-files - args: ['--maxkb=1000'] + args: ['--maxkb=5000'] - id: mixed-line-ending - id: requirements-txt-fixer - repo: http://github.com/psf/black @@ -28,3 +28,7 @@ repos: additional_dependencies: - flake8-docstrings - flake8-annotations + - repo: https://github.com/kynan/nbstripout + rev: 0.7.1 + hooks: + - id: nbstripout diff --git a/docs/source/configuration/agents.rst b/docs/source/configuration/agents.rst index b8912883..5acf17a4 100644 --- a/docs/source/configuration/agents.rst +++ b/docs/source/configuration/agents.rst @@ -82,7 +82,7 @@ Allows configuration of the chosen observation type. These are optional. * ``num_services_per_node``, ``num_folders_per_node``, ``num_files_per_folder``, ``num_nics_per_node`` all define the shape of the observation space. The size and shape of the obs space must remain constant, but the number of files, folders, ACL rules, and other components can change within an episode. Therefore padding is performed and these options set the size of the obs space. * ``nodes``: list of nodes that will be present in this agent's observation space. The ``node_ref`` relates to the human-readable unique reference defined later in the ``simulation`` part of the config. Each node can also be configured with services, and files that should be monitored. * ``links``: list of links that will be present in this agent's observation space. The ``link_ref`` relates to the human-readable unique reference defined later in the ``simulation`` part of the config. - * ``acl``: configure how the agent reads the access control list on the router in the simulation. ``router_node_ref`` is for selecting which router's ACL table should be used. ``ip_address_order`` sets the encoding of ip addresses as integers within the observation space. + * ``acl``: configure how the agent reads the access control list on the router in the simulation. ``router_node_ref`` is for selecting which router's ACL table should be used. ``ip_list`` sets the encoding of ip addresses as integers within the observation space. For more information see :py:mod:`primaite.game.agent.observations` diff --git a/docs/source/configuration/simulation/nodes/firewall.rst b/docs/source/configuration/simulation/nodes/firewall.rst index 47db4001..77e6cd12 100644 --- a/docs/source/configuration/simulation/nodes/firewall.rst +++ b/docs/source/configuration/simulation/nodes/firewall.rst @@ -22,35 +22,35 @@ example firewall network: nodes: - ref: firewall - hostname: firewall - type: firewall - start_up_duration: 0 - shut_down_duration: 0 - ports: - external_port: # port 1 - ip_address: 192.168.20.1 - subnet_mask: 255.255.255.0 - internal_port: # port 2 - ip_address: 192.168.1.2 - subnet_mask: 255.255.255.0 - dmz_port: # port 3 - ip_address: 192.168.10.1 - subnet_mask: 255.255.255.0 - acl: - internal_inbound_acl: + hostname: firewall + type: firewall + start_up_duration: 0 + shut_down_duration: 0 + ports: + external_port: # port 1 + ip_address: 192.168.20.1 + subnet_mask: 255.255.255.0 + internal_port: # port 2 + ip_address: 192.168.1.2 + subnet_mask: 255.255.255.0 + dmz_port: # port 3 + ip_address: 192.168.10.1 + subnet_mask: 255.255.255.0 + acl: + internal_inbound_acl: + ... + internal_outbound_acl: + ... + dmz_inbound_acl: + ... + dmz_outbound_acl: + ... + external_inbound_acl: + ... + external_outbound_acl: + ... + routes: ... - internal_outbound_acl: - ... - dmz_inbound_acl: - ... - dmz_outbound_acl: - ... - external_inbound_acl: - ... - external_outbound_acl: - ... - routes: - ... .. include:: common/common_node_attributes.rst diff --git a/docs/source/simulation.rst b/docs/source/simulation.rst index c4bf1bf0..20e1182a 100644 --- a/docs/source/simulation.rst +++ b/docs/source/simulation.rst @@ -25,6 +25,8 @@ Contents simulation_components/network/nodes/switch simulation_components/network/nodes/wireless_router simulation_components/network/nodes/firewall + simulation_components/network/switch + simulation_components/network/radio simulation_components/network/network simulation_components/system/internal_frame_processing simulation_components/system/sys_log diff --git a/src/primaite/config/_package_data/data_manipulation.yaml b/src/primaite/config/_package_data/data_manipulation.yaml index deda5d73..8c365320 100644 --- a/src/primaite/config/_package_data/data_manipulation.yaml +++ b/src/primaite/config/_package_data/data_manipulation.yaml @@ -1,15 +1,3 @@ -training_config: - rl_framework: SB3 - rl_algorithm: PPO - seed: 333 - n_learn_episodes: 1 - n_eval_episodes: 5 - max_steps_per_episode: 128 - deterministic_eval: false - n_agents: 1 - agent_references: - - defender - io_settings: save_agent_actions: true save_step_metadata: false @@ -490,6 +478,8 @@ agents: source_port_id: 1 dest_port_id: 1 protocol_id: 1 + source_wildcard_id: 0 + dest_wildcard_id: 0 47: # old action num: 23 # "ACL: ADDRULE - Block outgoing traffic from client 2" action: "ROUTER_ACL_ADDRULE" options: @@ -501,6 +491,8 @@ agents: source_port_id: 1 dest_port_id: 1 protocol_id: 1 + source_wildcard_id: 0 + dest_wildcard_id: 0 48: # old action num: 24 # block tcp traffic from client 1 to web app action: "ROUTER_ACL_ADDRULE" options: @@ -512,6 +504,8 @@ agents: source_port_id: 1 dest_port_id: 1 protocol_id: 3 + source_wildcard_id: 0 + dest_wildcard_id: 0 49: # old action num: 25 # block tcp traffic from client 2 to web app action: "ROUTER_ACL_ADDRULE" options: @@ -523,6 +517,8 @@ agents: source_port_id: 1 dest_port_id: 1 protocol_id: 3 + source_wildcard_id: 0 + dest_wildcard_id: 0 50: # old action num: 26 action: "ROUTER_ACL_ADDRULE" options: @@ -534,6 +530,8 @@ agents: source_port_id: 1 dest_port_id: 1 protocol_id: 3 + source_wildcard_id: 0 + dest_wildcard_id: 0 51: # old action num: 27 action: "ROUTER_ACL_ADDRULE" options: @@ -545,6 +543,8 @@ agents: source_port_id: 1 dest_port_id: 1 protocol_id: 3 + source_wildcard_id: 0 + dest_wildcard_id: 0 52: # old action num: 28 action: "ROUTER_ACL_REMOVERULE" options: @@ -703,23 +703,15 @@ agents: max_services_per_node: 2 max_nics_per_node: 8 max_acl_rules: 10 - ip_address_order: - - node_name: domain_controller - nic_num: 1 - - node_name: web_server - nic_num: 1 - - node_name: database_server - nic_num: 1 - - node_name: backup_server - nic_num: 1 - - node_name: security_suite - nic_num: 1 - - node_name: client_1 - nic_num: 1 - - node_name: client_2 - nic_num: 1 - - node_name: security_suite - nic_num: 2 + ip_list: + - 192.168.1.10 + - 192.168.1.12 + - 192.168.1.14 + - 192.168.1.16 + - 192.168.1.110 + - 192.168.10.21 + - 192.168.10.22 + - 192.168.10.110 reward_function: @@ -730,10 +722,12 @@ agents: node_hostname: database_server folder_name: database file_name: database.db + - type: SHARED_REWARD weight: 1.0 options: agent_name: client_1_green_user + - type: SHARED_REWARD weight: 1.0 options: diff --git a/src/primaite/config/_package_data/data_manipulation_marl.yaml b/src/primaite/config/_package_data/data_manipulation_marl.yaml index 653ddfd3..eaee132b 100644 --- a/src/primaite/config/_package_data/data_manipulation_marl.yaml +++ b/src/primaite/config/_package_data/data_manipulation_marl.yaml @@ -492,6 +492,8 @@ agents: source_port_id: 1 dest_port_id: 1 protocol_id: 1 + source_wildcard_id: 0 + dest_wildcard_id: 0 47: # old action num: 23 # "ACL: ADDRULE - Block outgoing traffic from client 2" action: "ROUTER_ACL_ADDRULE" options: @@ -503,6 +505,8 @@ agents: source_port_id: 1 dest_port_id: 1 protocol_id: 1 + source_wildcard_id: 0 + dest_wildcard_id: 0 48: # old action num: 24 # block tcp traffic from client 1 to web app action: "ROUTER_ACL_ADDRULE" options: @@ -514,6 +518,8 @@ agents: source_port_id: 1 dest_port_id: 1 protocol_id: 3 + source_wildcard_id: 0 + dest_wildcard_id: 0 49: # old action num: 25 # block tcp traffic from client 2 to web app action: "ROUTER_ACL_ADDRULE" options: @@ -525,6 +531,8 @@ agents: source_port_id: 1 dest_port_id: 1 protocol_id: 3 + source_wildcard_id: 0 + dest_wildcard_id: 0 50: # old action num: 26 action: "ROUTER_ACL_ADDRULE" options: @@ -536,6 +544,8 @@ agents: source_port_id: 1 dest_port_id: 1 protocol_id: 3 + source_wildcard_id: 0 + dest_wildcard_id: 0 51: # old action num: 27 action: "ROUTER_ACL_ADDRULE" options: @@ -547,6 +557,8 @@ agents: source_port_id: 1 dest_port_id: 1 protocol_id: 3 + source_wildcard_id: 0 + dest_wildcard_id: 0 52: # old action num: 28 action: "ROUTER_ACL_REMOVERULE" options: @@ -704,23 +716,15 @@ agents: max_services_per_node: 2 max_nics_per_node: 8 max_acl_rules: 10 - ip_address_order: - - node_name: domain_controller - nic_num: 1 - - node_name: web_server - nic_num: 1 - - node_name: database_server - nic_num: 1 - - node_name: backup_server - nic_num: 1 - - node_name: security_suite - nic_num: 1 - - node_name: client_1 - nic_num: 1 - - node_name: client_2 - nic_num: 1 - - node_name: security_suite - nic_num: 2 + ip_list: + - 192.168.1.10 + - 192.168.1.12 + - 192.168.1.14 + - 192.168.1.16 + - 192.168.1.110 + - 192.168.10.21 + - 192.168.10.22 + - 192.168.10.110 reward_function: @@ -1284,23 +1288,15 @@ agents: max_services_per_node: 2 max_nics_per_node: 8 max_acl_rules: 10 - ip_address_order: - - node_name: domain_controller - nic_num: 1 - - node_name: web_server - nic_num: 1 - - node_name: database_server - nic_num: 1 - - node_name: backup_server - nic_num: 1 - - node_name: security_suite - nic_num: 1 - - node_name: client_1 - nic_num: 1 - - node_name: client_2 - nic_num: 1 - - node_name: security_suite - nic_num: 2 + ip_list: + - 192.168.1.10 + - 192.168.1.12 + - 192.168.1.14 + - 192.168.1.16 + - 192.168.1.110 + - 192.168.10.21 + - 192.168.10.22 + - 192.168.10.110 reward_function: reward_components: diff --git a/src/primaite/game/agent/actions.py b/src/primaite/game/agent/actions.py index 9e967f91..f4f9a2cc 100644 --- a/src/primaite/game/agent/actions.py +++ b/src/primaite/game/agent/actions.py @@ -487,7 +487,9 @@ class RouterACLAddRuleAction(AbstractAction): position: int, permission: int, source_ip_id: int, + source_wildcard_id: int, dest_ip_id: int, + dest_wildcard_id: int, source_port_id: int, dest_port_id: int, protocol_id: int, @@ -519,7 +521,7 @@ class RouterACLAddRuleAction(AbstractAction): else: src_ip = self.manager.get_ip_address_by_idx(source_ip_id - 2) # subtract 2 to account for UNUSED=0, and ALL=1 - + src_wildcard = self.manager.get_wildcard_by_idx(source_wildcard_id) if source_port_id == 0: return ["do_nothing"] # invalid formulation elif source_port_id == 1: @@ -528,13 +530,14 @@ class RouterACLAddRuleAction(AbstractAction): src_port = self.manager.get_port_by_idx(source_port_id - 2) # subtract 2 to account for UNUSED=0, and ALL=1 - if source_ip_id == 0: + if dest_ip_id == 0: return ["do_nothing"] # invalid formulation elif dest_ip_id == 1: dst_ip = "ALL" else: dst_ip = self.manager.get_ip_address_by_idx(dest_ip_id - 2) # subtract 2 to account for UNUSED=0, and ALL=1 + dst_wildcard = self.manager.get_wildcard_by_idx(dest_wildcard_id) if dest_port_id == 0: return ["do_nothing"] # invalid formulation @@ -553,8 +556,10 @@ class RouterACLAddRuleAction(AbstractAction): permission_str, protocol, str(src_ip), + src_wildcard, src_port, str(dst_ip), + dst_wildcard, dst_port, position, ] @@ -624,7 +629,9 @@ class FirewallACLAddRuleAction(AbstractAction): position: int, permission: int, source_ip_id: int, + source_wildcard_id: int, dest_ip_id: int, + dest_wildcard_id: int, source_port_id: int, dest_port_id: int, protocol_id: int, @@ -665,7 +672,7 @@ class FirewallACLAddRuleAction(AbstractAction): src_port = self.manager.get_port_by_idx(source_port_id - 2) # subtract 2 to account for UNUSED=0, and ALL=1 - if source_ip_id == 0: + if dest_ip_id == 0: return ["do_nothing"] # invalid formulation elif dest_ip_id == 1: dst_ip = "ALL" @@ -680,6 +687,8 @@ class FirewallACLAddRuleAction(AbstractAction): else: dst_port = self.manager.get_port_by_idx(dest_port_id - 2) # subtract 2 to account for UNUSED=0, and ALL=1 + src_wildcard = self.manager.get_wildcard_by_idx(source_wildcard_id) + dst_wildcard = self.manager.get_wildcard_by_idx(dest_wildcard_id) return [ "network", @@ -692,8 +701,10 @@ class FirewallACLAddRuleAction(AbstractAction): permission_str, protocol, str(src_ip), + src_wildcard, src_port, str(dst_ip), + dst_wildcard, dst_port, position, ] @@ -871,7 +882,8 @@ class ActionManager: max_acl_rules: int = 10, # allows calculating shape protocols: List[str] = ["TCP", "UDP", "ICMP"], # allow mapping index to protocol ports: List[str] = ["HTTP", "DNS", "ARP", "FTP", "NTP"], # allow mapping index to port - ip_address_list: List[str] = [], # to allow us to map an index to an ip address. + ip_list: List[str] = [], # to allow us to map an index to an ip address. + wildcard_list: List[str] = [], # to allow mapping from wildcard index to act_map: Optional[Dict[int, Dict]] = None, # allows restricting set of possible actions ) -> None: """Init method for ActionManager. @@ -897,8 +909,8 @@ class ActionManager: :type protocols: List[str] :param ports: List of ports that are available in the simulation. Used for calculating action shape. :type ports: List[str] - :param ip_address_list: List of IP addresses that known to this agent. Used for calculating action shape. - :type ip_address_list: Optional[List[str]] + :param ip_list: List of IP addresses that known to this agent. Used for calculating action shape. + :type ip_list: Optional[List[str]] :param act_map: Action map which maps integers to actions. Used for restricting the set of possible actions. :type act_map: Optional[Dict[int, Dict]] """ @@ -959,8 +971,10 @@ class ActionManager: self.protocols: List[str] = protocols self.ports: List[str] = ports - self.ip_address_list: List[str] = ip_address_list - + self.ip_address_list: List[str] = ip_list + self.wildcard_list: List[str] = wildcard_list + if self.wildcard_list == []: + self.wildcard_list = ["NONE"] # action_args are settings which are applied to the action space as a whole. global_action_args = { "num_nodes": len(self.node_names), @@ -1195,6 +1209,24 @@ class ActionManager: raise RuntimeError(msg) return self.ip_address_list[ip_idx] + def get_wildcard_by_idx(self, wildcard_idx: int) -> str: + """ + Get the IP wildcard corresponding to the given index. + + :param ip_idx: The index of the IP wildcard to retrieve. + :type ip_idx: int + :return: The wildcard address. + :rtype: str + """ + if wildcard_idx >= len(self.wildcard_list): + msg = ( + f"Error: agent attempted to perform an action on ip wildcard {wildcard_idx} but this" + f" is out of range for its action space. Wildcard list: {self.wildcard_list}" + ) + _LOGGER.error(msg) + raise RuntimeError(msg) + return self.wildcard_list[wildcard_idx] + def get_port_by_idx(self, port_idx: int) -> str: """ Get the port corresponding to the given index. @@ -1253,37 +1285,14 @@ class ActionManager: :return: The constructed ActionManager. :rtype: ActionManager """ - # If the user has provided a list of IP addresses, use that. Otherwise, generate a list of IP addresses from - # the nodes in the simulation. - # TODO: refactor. Options: - # 1: This should be pulled out into it's own function for clarity - # 2: The simulation itself should be able to provide a list of IP addresses with its API, rather than having to - # go through the nodes here. - ip_address_order = cfg["options"].pop("ip_address_order", {}) - ip_address_list = [] - for entry in ip_address_order: - node_name = entry["node_name"] - nic_num = entry["nic_num"] - node_obj = game.simulation.network.get_node_by_hostname(node_name) - ip_address = node_obj.network_interface[nic_num].ip_address - ip_address_list.append(ip_address) - - if not ip_address_list: - node_names = [n["node_name"] for n in cfg.get("nodes", {})] - for node_name in node_names: - node_obj = game.simulation.network.get_node_by_hostname(node_name) - if node_obj is None: - continue - network_interfaces = node_obj.network_interfaces - for nic_uuid, nic_obj in network_interfaces.items(): - ip_address_list.append(nic_obj.ip_address) + if "ip_list" not in cfg["options"]: + cfg["options"]["ip_list"] = [] obj = cls( actions=cfg["action_list"], **cfg["options"], protocols=game.options.protocols, ports=game.options.ports, - ip_address_list=ip_address_list, act_map=cfg.get("action_map"), ) diff --git a/src/primaite/game/agent/observations/link_observation.py b/src/primaite/game/agent/observations/link_observation.py index 03a19fa0..50dc1105 100644 --- a/src/primaite/game/agent/observations/link_observation.py +++ b/src/primaite/game/agent/observations/link_observation.py @@ -43,7 +43,10 @@ class LinkObservation(AbstractObservation, identifier="LINK"): """ link_state = access_from_nested_dict(state, self.where) if link_state is NOT_PRESENT_IN_STATE: - return self.default_observation + self.where[-1] = "<->".join(self.where[-1].split("<->")[::-1]) # try swapping endpoint A and B + link_state = access_from_nested_dict(state, self.where) + if link_state is NOT_PRESENT_IN_STATE: + return self.default_observation bandwidth = link_state["bandwidth"] load = link_state["current_load"] diff --git a/src/primaite/game/agent/observations/observation_manager.py b/src/primaite/game/agent/observations/observation_manager.py index 047acce6..352003d6 100644 --- a/src/primaite/game/agent/observations/observation_manager.py +++ b/src/primaite/game/agent/observations/observation_manager.py @@ -189,7 +189,6 @@ class ObservationManager: """ if config is None: return cls(NullObservation()) - print(config) obs_type = config["type"] obs_class = AbstractObservation._registry[obs_type] observation = obs_class.from_config(config=obs_class.ConfigSchema(**config["options"])) diff --git a/src/primaite/game/agent/rewards.py b/src/primaite/game/agent/rewards.py index 2201b09e..f3398631 100644 --- a/src/primaite/game/agent/rewards.py +++ b/src/primaite/game/agent/rewards.py @@ -293,6 +293,7 @@ class GreenAdminDatabaseUnreachablePenalty(AbstractReward): db_state = access_from_nested_dict(state, self.location_in_state) if db_state is NOT_PRESENT_IN_STATE or "last_connection_successful" not in db_state: _LOGGER.debug(f"Can't calculate reward for {self.__class__.__name__}") + return 0.0 last_connection_successful = db_state["last_connection_successful"] if last_connection_successful is False: return -1.0 diff --git a/src/primaite/game/agent/scripted_agents/random_agent.py b/src/primaite/game/agent/scripted_agents/random_agent.py index 34a4b5ac..5021a832 100644 --- a/src/primaite/game/agent/scripted_agents/random_agent.py +++ b/src/primaite/game/agent/scripted_agents/random_agent.py @@ -1,8 +1,13 @@ -from typing import Dict, Tuple +import random +from typing import Dict, Optional, Tuple from gymnasium.core import ObsType +from pydantic import BaseModel +from primaite.game.agent.actions import ActionManager from primaite.game.agent.interface import AbstractScriptedAgent +from primaite.game.agent.observations.observation_manager import ObservationManager +from primaite.game.agent.rewards import RewardFunction class RandomAgent(AbstractScriptedAgent): @@ -19,3 +24,60 @@ class RandomAgent(AbstractScriptedAgent): :rtype: Tuple[str, Dict] """ return self.action_manager.get_action(self.action_manager.space.sample()) + + +class PeriodicAgent(AbstractScriptedAgent): + """Agent that does nothing most of the time, but executes application at regular intervals (with variance).""" + + class Settings(BaseModel): + """Configuration values for when an agent starts performing actions.""" + + start_step: int = 20 + "The timestep at which an agent begins performing it's actions." + start_variance: int = 5 + "Deviation around the start step." + frequency: int = 5 + "The number of timesteps to wait between performing actions." + variance: int = 0 + "The amount the frequency can randomly change to." + max_executions: int = 999999 + "Maximum number of times the agent can execute its action." + + def __init__( + self, + agent_name: str, + action_space: ActionManager, + observation_space: ObservationManager, + reward_function: RewardFunction, + settings: Optional[Settings] = None, + ) -> None: + """Initialise PeriodicAgent.""" + super().__init__( + agent_name=agent_name, + action_space=action_space, + observation_space=observation_space, + reward_function=reward_function, + ) + self.settings = settings or PeriodicAgent.Settings() + self._set_next_execution_timestep(timestep=self.settings.start_step, variance=self.settings.start_variance) + self.num_executions = 0 + + def _set_next_execution_timestep(self, timestep: int, variance: int) -> None: + """Set the next execution timestep with a configured random variance. + + :param timestep: The timestep when the next execute action should be taken. + :type timestep: int + :param variance: Uniform random variance applied to the timestep + :type variance: int + """ + random_increment = random.randint(-variance, variance) + self.next_execution_timestep = timestep + random_increment + + def get_action(self, obs: ObsType, timestep: int) -> Tuple[str, Dict]: + """Do nothing, unless the current timestep is the next execution timestep, in which case do the action.""" + if timestep == self.next_execution_timestep and self.num_executions < self.settings.max_executions: + self.num_executions += 1 + self._set_next_execution_timestep(timestep + self.settings.frequency, self.settings.variance) + return "NODE_APPLICATION_EXECUTE", {"node_id": 0, "application_id": 0} + + return "DONOTHING", {} diff --git a/src/primaite/game/agent/scripted_agents/tap001.py b/src/primaite/game/agent/scripted_agents/tap001.py new file mode 100644 index 00000000..88fa37cf --- /dev/null +++ b/src/primaite/game/agent/scripted_agents/tap001.py @@ -0,0 +1,78 @@ +import random +from typing import Dict, Tuple + +from gymnasium.core import ObsType + +from primaite.game.agent.interface import AbstractScriptedAgent + + +class TAP001(AbstractScriptedAgent): + """ + TAP001 | Mobile Malware -- Ransomware Variant. + + Scripted Red Agent. Capable of one action; launching the kill-chain (Ransomware Application) + """ + + def __init__(self, *args, **kwargs): + super().__init__(*args, **kwargs) + self.setup_agent() + + next_execution_timestep: int = 0 + starting_node_idx: int = 0 + installed: bool = False + + def _set_next_execution_timestep(self, timestep: int) -> None: + """Set the next execution timestep with a configured random variance. + + :param timestep: The timestep to add variance to. + """ + random_timestep_increment = random.randint( + -self.agent_settings.start_settings.variance, self.agent_settings.start_settings.variance + ) + self.next_execution_timestep = timestep + random_timestep_increment + + def get_action(self, obs: ObsType, timestep: int) -> Tuple[str, Dict]: + """Waits until a specific timestep, then attempts to execute the ransomware application. + + This application acts a wrapper around the kill-chain, similar to green-analyst and + the previous UC2 data manipulation bot. + + :param obs: Current observation for this agent. + :type obs: ObsType + :param timestep: The current simulation timestep, used for scheduling actions + :type timestep: int + :return: Action formatted in CAOS format + :rtype: Tuple[str, Dict] + """ + if timestep < self.next_execution_timestep: + return "DONOTHING", {} + + self._set_next_execution_timestep(timestep + self.agent_settings.start_settings.frequency) + + if not self.installed: + self.installed = True + return "NODE_APPLICATION_INSTALL", { + "node_id": self.starting_node_idx, + "application_name": "RansomwareScript", + "ip_address": self.ip_address, + } + + return "NODE_APPLICATION_EXECUTE", {"node_id": self.starting_node_idx, "application_id": 0} + + def setup_agent(self) -> None: + """Set the next execution timestep when the episode resets.""" + self._select_start_node() + self._set_next_execution_timestep(self.agent_settings.start_settings.start_step) + for n, act in self.action_manager.action_map.items(): + if not act[0] == "NODE_APPLICATION_INSTALL": + continue + if act[1]["node_id"] == self.starting_node_idx: + self.ip_address = act[1]["ip_address"] + return + raise RuntimeError("TAP001 agent could not find database server ip address in action map") + + def _select_start_node(self) -> None: + """Set the starting starting node of the agent to be a random node from this agent's action manager.""" + # we are assuming that every node in the node manager has a data manipulation application at idx 0 + num_nodes = len(self.action_manager.node_names) + self.starting_node_idx = random.randint(0, num_nodes - 1) diff --git a/src/primaite/game/game.py b/src/primaite/game/game.py index f069433e..27fd452d 100644 --- a/src/primaite/game/game.py +++ b/src/primaite/game/game.py @@ -11,7 +11,10 @@ from primaite.game.agent.observations.observation_manager import ObservationMana from primaite.game.agent.rewards import RewardFunction, SharedReward from primaite.game.agent.scripted_agents.data_manipulation_bot import DataManipulationAgent from primaite.game.agent.scripted_agents.probabilistic_agent import ProbabilisticAgent +from primaite.game.agent.scripted_agents.random_agent import PeriodicAgent +from primaite.game.agent.scripted_agents.tap001 import TAP001 from primaite.game.science import graph_has_cycle, topological_sort +from primaite.simulator.network.airspace import AIR_SPACE from primaite.simulator.network.hardware.base import NodeOperatingState from primaite.simulator.network.hardware.nodes.host.computer import Computer from primaite.simulator.network.hardware.nodes.host.host_node import NIC @@ -26,6 +29,7 @@ from primaite.simulator.sim_container import Simulation from primaite.simulator.system.applications.database_client import DatabaseClient from primaite.simulator.system.applications.red_applications.data_manipulation_bot import DataManipulationBot from primaite.simulator.system.applications.red_applications.dos_bot import DoSBot +from primaite.simulator.system.applications.red_applications.ransomware_script import RansomwareScript from primaite.simulator.system.applications.web_browser import WebBrowser from primaite.simulator.system.services.database.database_service import DatabaseService from primaite.simulator.system.services.dns.dns_client import DNSClient @@ -43,6 +47,7 @@ APPLICATION_TYPES_MAPPING = { "DatabaseClient": DatabaseClient, "DataManipulationBot": DataManipulationBot, "DoSBot": DoSBot, + "RansomwareScript": RansomwareScript, } """List of available applications that can be installed on nodes in the PrimAITE Simulation.""" @@ -128,6 +133,8 @@ class PrimaiteGame: """ _LOGGER.debug(f"Stepping. Step counter: {self.step_counter}") + self.pre_timestep() + if self.step_counter == 0: state = self.get_sim_state() for agent in self.agents.values(): @@ -172,6 +179,10 @@ class PrimaiteGame: response=response, ) + def pre_timestep(self) -> None: + """Apply any pre-timestep logic that helps make sure we have the correct observations.""" + self.simulation.pre_timestep(self.step_counter) + def advance_timestep(self) -> None: """Advance timestep.""" self.step_counter += 1 @@ -211,6 +222,7 @@ class PrimaiteGame: :return: A PrimaiteGame object. :rtype: PrimaiteGame """ + AIR_SPACE.clear() game = cls() game.options = PrimaiteGameOptions(**cfg["game"]) game.save_step_metadata = cfg.get("io_settings", {}).get("save_step_metadata") or False @@ -268,6 +280,9 @@ class PrimaiteGame: hostname=node_cfg["hostname"], ip_address=node_cfg["ip_address"], subnet_mask=node_cfg["subnet_mask"], + operating_state=NodeOperatingState.ON + if not (p := node_cfg.get("operating_state")) + else NodeOperatingState[p.upper()], ) else: msg = f"invalid node type {n_type} in config" @@ -339,6 +354,19 @@ class PrimaiteGame: port_scan_p_of_success=float(opt.get("port_scan_p_of_success", "0.1")), data_manipulation_p_of_success=float(opt.get("data_manipulation_p_of_success", "0.1")), ) + elif application_type == "RansomwareScript": + if "options" in application_cfg: + opt = application_cfg["options"] + new_application.configure( + server_ip_address=IPv4Address(opt.get("server_ip")), + server_password=opt.get("server_password"), + payload=opt.get("payload", "ENCRYPT"), + c2_beacon_p_of_success=float(opt.get("c2_beacon_p_of_success", "0.5")), + target_scan_p_of_success=float(opt.get("target_scan_p_of_success", "0.1")), + ransomware_encrypt_p_of_success=float( + opt.get("ransomware_encrypt_p_of_success", "0.1") + ), + ) elif application_type == "DatabaseClient": if "options" in application_cfg: opt = application_cfg["options"] @@ -423,6 +451,15 @@ class PrimaiteGame: reward_function=reward_function, settings=settings, ) + elif agent_type == "PeriodicAgent": + settings = PeriodicAgent.Settings(**agent_cfg.get("settings", {})) + new_agent = PeriodicAgent( + agent_name=agent_cfg["ref"], + action_space=action_space, + observation_space=obs_space, + reward_function=reward_function, + settings=settings, + ) elif agent_type == "ProxyAgent": agent_settings = AgentSettings.from_config(agent_cfg.get("agent_settings")) new_agent = ProxyAgent( @@ -443,6 +480,15 @@ class PrimaiteGame: reward_function=reward_function, agent_settings=agent_settings, ) + elif agent_type == "TAP001": + agent_settings = AgentSettings.from_config(agent_cfg.get("agent_settings")) + new_agent = TAP001( + agent_name=agent_cfg["ref"], + action_space=action_space, + observation_space=obs_space, + reward_function=reward_function, + agent_settings=agent_settings, + ) else: msg = f"Configuration error: {agent_type} is not a valid agent type." _LOGGER.error(msg) diff --git a/src/primaite/session/environment.py b/src/primaite/session/environment.py index 4fdbbe34..cb891cd7 100644 --- a/src/primaite/session/environment.py +++ b/src/primaite/session/environment.py @@ -26,6 +26,9 @@ class PrimaiteGymEnv(gymnasium.Env): def __init__(self, game_config: Dict): """Initialise the environment.""" super().__init__() + self.io = PrimaiteIO.from_config(game_config.get("io_settings", {})) + """Handles IO for the environment. This produces sys logs, agent logs, etc.""" + self.game_config: Dict = game_config """PrimaiteGame definition. This can be changed between episodes to enable curriculum learning.""" self.io = PrimaiteIO.from_config(game_config.get("io_settings", {})) @@ -49,6 +52,7 @@ class PrimaiteGymEnv(gymnasium.Env): step = self.game.step_counter self.agent.store_action(action) # apply_agent_actions accesses the action we just stored + self.game.pre_timestep() self.game.apply_agent_actions() self.game.advance_timestep() state = self.game.get_sim_state() @@ -224,6 +228,7 @@ class PrimaiteRayMARLEnv(MultiAgentEnv): # 1. Perform actions for agent_name, action in actions.items(): self.agents[agent_name].store_action(action) + self.game.pre_timestep() self.game.apply_agent_actions() # 2. Advance timestep diff --git a/src/primaite/session/io.py b/src/primaite/session/io.py index e57f88ae..69cea614 100644 --- a/src/primaite/session/io.py +++ b/src/primaite/session/io.py @@ -29,10 +29,12 @@ class PrimaiteIO: """Whether to save a log of all agents' actions every step.""" save_step_metadata: bool = False """Whether to save the RL agents' action, environment state, and other data at every single step.""" - save_pcap_logs: bool = False + save_pcap_logs: bool = True """Whether to save PCAP logs.""" - save_sys_logs: bool = False + save_sys_logs: bool = True """Whether to save system logs.""" + write_sys_log_to_terminal: bool = False + """Whether to write the sys log to the terminal.""" def __init__(self, settings: Optional[Settings] = None) -> None: """ @@ -47,6 +49,7 @@ class PrimaiteIO: SIM_OUTPUT.path = self.session_path / "simulation_output" SIM_OUTPUT.save_pcap_logs = self.settings.save_pcap_logs SIM_OUTPUT.save_sys_logs = self.settings.save_sys_logs + SIM_OUTPUT.write_sys_log_to_terminal = self.settings.write_sys_log_to_terminal def generate_session_path(self, timestamp: Optional[datetime] = None) -> Path: """Create a folder for the session and return the path to it.""" @@ -93,4 +96,5 @@ class PrimaiteIO: def from_config(cls, config: Dict) -> "PrimaiteIO": """Create an instance of PrimaiteIO based on a configuration dict.""" new = cls(settings=cls.Settings(**config)) + return new diff --git a/src/primaite/simulator/__init__.py b/src/primaite/simulator/__init__.py index aebd77cf..9e2ce9a1 100644 --- a/src/primaite/simulator/__init__.py +++ b/src/primaite/simulator/__init__.py @@ -14,6 +14,7 @@ class _SimOutput: ) self.save_pcap_logs: bool = False self.save_sys_logs: bool = False + self.write_sys_log_to_terminal: bool = False @property def path(self) -> Path: diff --git a/src/primaite/simulator/core.py b/src/primaite/simulator/core.py index 6da8a2f8..8e954229 100644 --- a/src/primaite/simulator/core.py +++ b/src/primaite/simulator/core.py @@ -226,6 +226,15 @@ class SimComponent(BaseModel): return return self._request_manager(request, context) + def pre_timestep(self, timestep: int) -> None: + """ + Apply any logic that needs to happen at the beginning of the timestep to ensure correct observations/rewards. + + :param timestep: what's the current time + :type timestep: int + """ + pass + def apply_timestep(self, timestep: int) -> None: """ Apply a timestep evolution to this component. diff --git a/src/primaite/simulator/file_system/file.py b/src/primaite/simulator/file_system/file.py index 9331c40c..3a1c24df 100644 --- a/src/primaite/simulator/file_system/file.py +++ b/src/primaite/simulator/file_system/file.py @@ -103,6 +103,10 @@ class File(FileSystemItemABC): """ super().apply_timestep(timestep=timestep) + def pre_timestep(self, timestep: int) -> None: + """Apply pre-timestep logic.""" + super().pre_timestep(timestep) + # reset the number of accesses to 0 self.num_access = 0 diff --git a/src/primaite/simulator/file_system/file_system.py b/src/primaite/simulator/file_system/file_system.py index 9166178c..aacb7d01 100644 --- a/src/primaite/simulator/file_system/file_system.py +++ b/src/primaite/simulator/file_system/file_system.py @@ -427,15 +427,21 @@ class FileSystem(SimComponent): """Apply time step to FileSystem and its child folders and files.""" super().apply_timestep(timestep=timestep) + # apply timestep to folders + for folder_id in self.folders: + self.folders[folder_id].apply_timestep(timestep=timestep) + + def pre_timestep(self, timestep: int) -> None: + """Apply pre-timestep logic.""" + super().pre_timestep(timestep) # reset number of file creations self.num_file_creations = 0 # reset number of file deletions self.num_file_deletions = 0 - # apply timestep to folders - for folder_id in self.folders: - self.folders[folder_id].apply_timestep(timestep=timestep) + for folder in self.folders.values(): + folder.pre_timestep(timestep) ############################################################### # Agent actions diff --git a/src/primaite/simulator/file_system/folder.py b/src/primaite/simulator/file_system/folder.py index 6ebd8d14..9f176660 100644 --- a/src/primaite/simulator/file_system/folder.py +++ b/src/primaite/simulator/file_system/folder.py @@ -128,6 +128,13 @@ class Folder(FileSystemItemABC): for file_id in self.files: self.files[file_id].apply_timestep(timestep=timestep) + def pre_timestep(self, timestep: int) -> None: + """Apply pre-timestep logic.""" + super().pre_timestep(timestep) + + for file in self.files.values(): + file.pre_timestep(timestep) + def _scan_timestep(self) -> None: """Apply the scan action timestep.""" if self.scan_countdown >= 0: diff --git a/src/primaite/simulator/network/container.py b/src/primaite/simulator/network/container.py index cfe66d89..e9a938ce 100644 --- a/src/primaite/simulator/network/container.py +++ b/src/primaite/simulator/network/container.py @@ -1,3 +1,4 @@ +from ipaddress import IPv4Address from typing import Any, Dict, List, Optional import matplotlib.pyplot as plt @@ -86,6 +87,16 @@ class Network(SimComponent): for link_id in self.links: self.links[link_id].apply_timestep(timestep=timestep) + def pre_timestep(self, timestep: int) -> None: + """Apply pre-timestep logic.""" + super().pre_timestep(timestep) + + for node in self.nodes.values(): + node.pre_timestep(timestep) + + for link in self.links.values(): + link.pre_timestep(timestep) + @property def router_nodes(self) -> List[Node]: """The Routers in the Network.""" @@ -163,10 +174,11 @@ class Network(SimComponent): for node in nodes: for i, port in node.network_interface.items(): if hasattr(port, "ip_address"): - port_str = port.port_name if port.port_name else port.port_num - table.add_row( - [node.hostname, port_str, port.ip_address, port.subnet_mask, node.default_gateway] - ) + if port.ip_address != IPv4Address("127.0.0.1"): + port_str = port.port_name if port.port_name else port.port_num + table.add_row( + [node.hostname, port_str, port.ip_address, port.subnet_mask, node.default_gateway] + ) print(table) if links: diff --git a/src/primaite/simulator/network/creation.py b/src/primaite/simulator/network/creation.py index c1b0d43a..8bda626a 100644 --- a/src/primaite/simulator/network/creation.py +++ b/src/primaite/simulator/network/creation.py @@ -9,7 +9,7 @@ from primaite.simulator.network.transmission.network_layer import IPProtocol from primaite.simulator.network.transmission.transport_layer import Port -def num_of_switches_required(num_nodes: int, max_switch_ports: int = 24) -> int: +def num_of_switches_required(num_nodes: int, max_network_interface: int = 24) -> int: """ Calculate the minimum number of network switches required to connect a given number of nodes. @@ -18,7 +18,7 @@ def num_of_switches_required(num_nodes: int, max_switch_ports: int = 24) -> int: to accommodate all nodes under this constraint. :param num_nodes: The total number of nodes that need to be connected in the network. - :param max_switch_ports: The maximum number of ports available on each switch. Defaults to 24. + :param max_network_interface: The maximum number of ports available on each switch. Defaults to 24. :return: The minimum number of switches required to connect all PCs. @@ -33,11 +33,11 @@ def num_of_switches_required(num_nodes: int, max_switch_ports: int = 24) -> int: 3 """ # Reduce the effective number of switch ports by 1 to leave space for the router - effective_switch_ports = max_switch_ports - 1 + effective_network_interface = max_network_interface - 1 # Calculate the number of fully utilised switches and any additional switch for remaining PCs - full_switches = num_nodes // effective_switch_ports - extra_pcs = num_nodes % effective_switch_ports + full_switches = num_nodes // effective_network_interface + extra_pcs = num_nodes % effective_network_interface # Return the total number of switches required return full_switches + (1 if extra_pcs > 0 else 0) @@ -77,7 +77,7 @@ def create_office_lan( # Calculate the required number of switches num_of_switches = num_of_switches_required(num_nodes=num_pcs) - effective_switch_ports = 23 # One port less for router connection + effective_network_interface = 23 # One port less for router connection if pcs_ip_block_start <= num_of_switches: raise ValueError(f"pcs_ip_block_start must be greater than the number of required switches {num_of_switches}") @@ -116,7 +116,7 @@ def create_office_lan( # Add PCs to the LAN and connect them to switches for i in range(1, num_pcs + 1): # Add a new edge switch if the current one is full - if switch_port == effective_switch_ports: + if switch_port == effective_network_interface: switch_n += 1 switch_port = 0 switch = Switch(hostname=f"switch_edge_{switch_n}_{lan_name}", start_up_duration=0) diff --git a/src/primaite/simulator/network/hardware/base.py b/src/primaite/simulator/network/hardware/base.py index 1aa4366b..55636356 100644 --- a/src/primaite/simulator/network/hardware/base.py +++ b/src/primaite/simulator/network/hardware/base.py @@ -264,6 +264,9 @@ class NetworkInterface(SimComponent, ABC): """ return f"Port {self.port_name if self.port_name else self.port_num}: {self.mac_address}" + def __hash__(self) -> int: + return hash(self.uuid) + def apply_timestep(self, timestep: int) -> None: """ Apply a timestep evolution to this component. @@ -661,6 +664,10 @@ class Link(SimComponent): def apply_timestep(self, timestep: int) -> None: """Apply a timestep to the simulation.""" super().apply_timestep(timestep) + + def pre_timestep(self, timestep: int) -> None: + """Apply pre-timestep logic.""" + super().pre_timestep(timestep) self.current_load = 0.0 @@ -895,6 +902,10 @@ class Node(SimComponent): from primaite.simulator.system.applications.web_browser import WebBrowser return WebBrowser + elif application_class_str == "RansomwareScript": + from primaite.simulator.system.applications.red_applications.ransomware_script import RansomwareScript + + return RansomwareScript else: return 0 @@ -965,12 +976,15 @@ class Node(SimComponent): table.align = "l" table.title = f"{self.hostname} Network Interface Cards" for port, network_interface in self.network_interface.items(): + ip_address = "" + if hasattr(network_interface, "ip_address"): + ip_address = f"{network_interface.ip_address}/{network_interface.ip_network.prefixlen}" table.add_row( [ port, network_interface.__class__.__name__, network_interface.mac_address, - f"{network_interface.ip_address}/{network_interface.ip_network.prefixlen}", + ip_address, network_interface.speed, "Enabled" if network_interface.enabled else "Disabled", ] @@ -1071,6 +1085,23 @@ class Node(SimComponent): self.file_system.apply_timestep(timestep=timestep) + def pre_timestep(self, timestep: int) -> None: + """Apply pre-timestep logic.""" + super().pre_timestep(timestep) + for network_interface in self.network_interfaces.values(): + network_interface.pre_timestep(timestep=timestep) + + for process_id in self.processes: + self.processes[process_id].pre_timestep(timestep=timestep) + + for service_id in self.services: + self.services[service_id].pre_timestep(timestep=timestep) + + for application_id in self.applications: + self.applications[application_id].pre_timestep(timestep=timestep) + + self.file_system.pre_timestep(timestep=timestep) + def scan(self) -> bool: """ Scan the node and all the items within it. @@ -1341,6 +1372,8 @@ class Node(SimComponent): application_instance.configure(target_ip_address=IPv4Address(ip_address)) elif application_instance.name == "DataManipulationBot": application_instance.configure(server_ip_address=IPv4Address(ip_address)) + elif application_instance.name == "RansomwareScript": + application_instance.configure(server_ip_address=IPv4Address(ip_address)) else: pass diff --git a/src/primaite/simulator/network/hardware/nodes/network/firewall.py b/src/primaite/simulator/network/hardware/nodes/network/firewall.py index 08735b3b..84ed3ee5 100644 --- a/src/primaite/simulator/network/hardware/nodes/network/firewall.py +++ b/src/primaite/simulator/network/hardware/nodes/network/firewall.py @@ -599,7 +599,9 @@ class Firewall(Router): dst_port=None if not (p := r_cfg.get("dst_port")) else Port[p], protocol=None if not (p := r_cfg.get("protocol")) else IPProtocol[p], src_ip_address=r_cfg.get("src_ip"), + src_wildcard_mask=r_cfg.get("src_wildcard_mask"), dst_ip_address=r_cfg.get("dst_ip"), + dst_wildcard_mask=r_cfg.get("dst_wildcard_mask"), position=r_num, ) @@ -612,7 +614,9 @@ class Firewall(Router): dst_port=None if not (p := r_cfg.get("dst_port")) else Port[p], protocol=None if not (p := r_cfg.get("protocol")) else IPProtocol[p], src_ip_address=r_cfg.get("src_ip"), + src_wildcard_mask=r_cfg.get("src_wildcard_mask"), dst_ip_address=r_cfg.get("dst_ip"), + dst_wildcard_mask=r_cfg.get("dst_wildcard_mask"), position=r_num, ) @@ -625,7 +629,9 @@ class Firewall(Router): dst_port=None if not (p := r_cfg.get("dst_port")) else Port[p], protocol=None if not (p := r_cfg.get("protocol")) else IPProtocol[p], src_ip_address=r_cfg.get("src_ip"), + src_wildcard_mask=r_cfg.get("src_wildcard_mask"), dst_ip_address=r_cfg.get("dst_ip"), + dst_wildcard_mask=r_cfg.get("dst_wildcard_mask"), position=r_num, ) @@ -638,7 +644,9 @@ class Firewall(Router): dst_port=None if not (p := r_cfg.get("dst_port")) else Port[p], protocol=None if not (p := r_cfg.get("protocol")) else IPProtocol[p], src_ip_address=r_cfg.get("src_ip"), + src_wildcard_mask=r_cfg.get("src_wildcard_mask"), dst_ip_address=r_cfg.get("dst_ip"), + dst_wildcard_mask=r_cfg.get("dst_wildcard_mask"), position=r_num, ) @@ -651,7 +659,9 @@ class Firewall(Router): dst_port=None if not (p := r_cfg.get("dst_port")) else Port[p], protocol=None if not (p := r_cfg.get("protocol")) else IPProtocol[p], src_ip_address=r_cfg.get("src_ip"), + src_wildcard_mask=r_cfg.get("src_wildcard_mask"), dst_ip_address=r_cfg.get("dst_ip"), + dst_wildcard_mask=r_cfg.get("dst_wildcard_mask"), position=r_num, ) @@ -664,7 +674,9 @@ class Firewall(Router): dst_port=None if not (p := r_cfg.get("dst_port")) else Port[p], protocol=None if not (p := r_cfg.get("protocol")) else IPProtocol[p], src_ip_address=r_cfg.get("src_ip"), + src_wildcard_mask=r_cfg.get("src_wildcard_mask"), dst_ip_address=r_cfg.get("dst_ip"), + dst_wildcard_mask=r_cfg.get("dst_wildcard_mask"), position=r_num, ) diff --git a/src/primaite/simulator/network/hardware/nodes/network/router.py b/src/primaite/simulator/network/hardware/nodes/network/router.py index 1c36c696..5d041fd1 100644 --- a/src/primaite/simulator/network/hardware/nodes/network/router.py +++ b/src/primaite/simulator/network/hardware/nodes/network/router.py @@ -322,10 +322,12 @@ class AccessControlList(SimComponent): action=ACLAction[request[0]], protocol=None if request[1] == "ALL" else IPProtocol[request[1]], src_ip_address=None if request[2] == "ALL" else IPv4Address(request[2]), - src_port=None if request[3] == "ALL" else Port[request[3]], - dst_ip_address=None if request[4] == "ALL" else IPv4Address(request[4]), - dst_port=None if request[5] == "ALL" else Port[request[5]], - position=int(request[6]), + src_wildcard_mask=None if request[3] == "NONE" else IPv4Address(request[3]), + src_port=None if request[4] == "ALL" else Port[request[4]], + dst_ip_address=None if request[5] == "ALL" else IPv4Address(request[5]), + dst_wildcard_mask=None if request[6] == "NONE" else IPv4Address(request[6]), + dst_port=None if request[7] == "ALL" else Port[request[7]], + position=int(request[8]), ) ) ), @@ -772,6 +774,13 @@ class RouterARP(ARP): is_reattempt=True, is_default_route_attempt=is_default_route_attempt, ) + elif route and route == self.router.route_table.default_route: + self.send_arp_request(self.router.route_table.default_route.next_hop_ip_address) + return self._get_arp_cache_mac_address( + ip_address=self.router.route_table.default_route.next_hop_ip_address, + is_reattempt=True, + is_default_route_attempt=True, + ) else: if self.router.route_table.default_route: if not is_default_route_attempt: @@ -822,6 +831,12 @@ class RouterARP(ARP): return network_interface if not is_reattempt: + if self.router.ip_is_in_router_interface_subnet(ip_address): + self.send_arp_request(ip_address) + return self._get_arp_cache_network_interface( + ip_address=ip_address, is_reattempt=True, is_default_route_attempt=is_default_route_attempt + ) + route = self.router.route_table.find_best_route(ip_address) if route and route != self.router.route_table.default_route: self.send_arp_request(route.next_hop_ip_address) @@ -830,6 +845,13 @@ class RouterARP(ARP): is_reattempt=True, is_default_route_attempt=is_default_route_attempt, ) + elif route and route == self.router.route_table.default_route: + self.send_arp_request(self.router.route_table.default_route.next_hop_ip_address) + return self._get_arp_cache_network_interface( + ip_address=self.router.route_table.default_route.next_hop_ip_address, + is_reattempt=True, + is_default_route_attempt=True, + ) else: if self.router.route_table.default_route: if not is_default_route_attempt: @@ -1460,6 +1482,8 @@ class Router(NetworkNode): frame.ethernet.src_mac_addr = network_interface.mac_address frame.ethernet.dst_mac_addr = target_mac network_interface.send_frame(frame) + else: + self.sys_log.error(f"Frame dropped as there is no route to {frame.ip.dst_ip_address}") def configure_port(self, port: int, ip_address: Union[IPv4Address, str], subnet_mask: Union[IPv4Address, str]): """ @@ -1540,6 +1564,13 @@ class Router(NetworkNode): - protocol (str, optional): the named IP protocol such as ICMP, TCP, or UDP - src_ip_address (str, optional): IP address octet written in base 10 - dst_ip_address (str, optional): IP address octet written in base 10 + - routes (list[dict]): List of route dicts with values: + - address (str): The destination address of the route. + - subnet_mask (str): The subnet mask of the route. + - next_hop_ip_address (str): The next hop IP for the route. + - metric (int): The metric of the route. Optional. + - default_route: + - next_hop_ip_address (str): The next hop IP for the route. Example config: ``` @@ -1550,6 +1581,10 @@ class Router(NetworkNode): 1: { 'ip_address' : '192.168.1.1', 'subnet_mask' : '255.255.255.0', + }, + 2: { + 'ip_address' : '192.168.0.1', + 'subnet_mask' : '255.255.255.252', } }, 'acl' : { @@ -1557,6 +1592,10 @@ class Router(NetworkNode): 22: {'action': 'PERMIT', 'src_port': 'ARP', 'dst_port': 'ARP'}, 23: {'action': 'PERMIT', 'protocol': 'ICMP'}, }, + 'routes' : [ + {'address': '192.168.0.0', 'subnet_mask': '255.255.255.0', 'next_hop_ip_address': '192.168.1.2'} + ], + 'default_route': {'next_hop_ip_address': '192.168.0.2'} } ``` @@ -1600,4 +1639,8 @@ class Router(NetworkNode): next_hop_ip_address=IPv4Address(route.get("next_hop_ip_address")), metric=float(route.get("metric", 0)), ) + if "default_route" in cfg: + next_hop_ip_address = cfg["default_route"].get("next_hop_ip_address", None) + if next_hop_ip_address: + router.route_table.set_default_route_next_hop_ip_address(next_hop_ip_address) return router diff --git a/src/primaite/simulator/network/hardware/nodes/network/switch.py b/src/primaite/simulator/network/hardware/nodes/network/switch.py index 557ea287..aa405e14 100644 --- a/src/primaite/simulator/network/hardware/nodes/network/switch.py +++ b/src/primaite/simulator/network/hardware/nodes/network/switch.py @@ -100,13 +100,8 @@ class Switch(NetworkNode): def __init__(self, **kwargs): super().__init__(**kwargs) - if not self.network_interface: - self.network_interface = {i: SwitchPort() for i in range(1, self.num_ports + 1)} - for port_num, port in self.network_interface.items(): - port._connected_node = self - port.port_num = port_num - port.parent = self - port.port_num = port_num + for i in range(1, self.num_ports + 1): + self.connect_nic(SwitchPort()) def show(self, markdown: bool = False): """ diff --git a/src/primaite/simulator/network/transmission/data_link_layer.py b/src/primaite/simulator/network/transmission/data_link_layer.py index 27d40df0..e3189cd8 100644 --- a/src/primaite/simulator/network/transmission/data_link_layer.py +++ b/src/primaite/simulator/network/transmission/data_link_layer.py @@ -8,7 +8,7 @@ from primaite.simulator.network.protocols.icmp import ICMPPacket from primaite.simulator.network.protocols.packet import DataPacket from primaite.simulator.network.transmission.network_layer import IPPacket, IPProtocol from primaite.simulator.network.transmission.primaite_layer import PrimaiteHeader -from primaite.simulator.network.transmission.transport_layer import TCPHeader, UDPHeader +from primaite.simulator.network.transmission.transport_layer import Port, TCPHeader, UDPHeader from primaite.simulator.network.utils import convert_bytes_to_megabits _LOGGER = getLogger(__name__) @@ -141,3 +141,37 @@ class Frame(BaseModel): def size_Mbits(self) -> float: # noqa - Keep it as MBits as this is how they're expressed """The daa transfer size of the Frame in Mbits.""" return convert_bytes_to_megabits(self.size) + + @property + def is_broadcast(self) -> bool: + """ + Determines if the Frame is a broadcast frame. + + A Frame is considered a broadcast frame if the destination MAC address is set to the broadcast address + "ff:ff:ff:ff:ff:ff". + + :return: True if the destination MAC address is a broadcast address, otherwise False. + """ + return self.ethernet.dst_mac_addr.lower() == "ff:ff:ff:ff:ff:ff" + + @property + def is_arp(self) -> bool: + """ + Checks if the Frame is an ARP (Address Resolution Protocol) packet. + + This is determined by checking if the destination port of the TCP header is equal to the ARP port. + + :return: True if the Frame is an ARP packet, otherwise False. + """ + return self.udp.dst_port == Port.ARP + + @property + def is_icmp(self) -> bool: + """ + Determines if the Frame is an ICMP (Internet Control Message Protocol) packet. + + This check is performed by verifying if the 'icmp' attribute of the Frame instance is present (not None). + + :return: True if the Frame is an ICMP packet (i.e., has an ICMP header), otherwise False. + """ + return self.icmp is not None diff --git a/src/primaite/simulator/network/transmission/transport_layer.py b/src/primaite/simulator/network/transmission/transport_layer.py index c73e451a..bf739ad1 100644 --- a/src/primaite/simulator/network/transmission/transport_layer.py +++ b/src/primaite/simulator/network/transmission/transport_layer.py @@ -11,6 +11,9 @@ class Port(Enum): .. _List of Ports: """ + UNUSED = -1 + "An unused port stub." + NONE = 0 "Place holder for a non-port." WOL = 9 diff --git a/src/primaite/simulator/sim_container.py b/src/primaite/simulator/sim_container.py index 997cc0be..9e2e5da4 100644 --- a/src/primaite/simulator/sim_container.py +++ b/src/primaite/simulator/sim_container.py @@ -63,3 +63,8 @@ class Simulation(SimComponent): """Apply a timestep to the simulation.""" super().apply_timestep(timestep) self.network.apply_timestep(timestep) + + def pre_timestep(self, timestep: int) -> None: + """Apply pre-timestep logic.""" + super().pre_timestep(timestep) + self.network.pre_timestep(timestep) diff --git a/src/primaite/simulator/system/applications/application.py b/src/primaite/simulator/system/applications/application.py index 617fdc23..ff71b51a 100644 --- a/src/primaite/simulator/system/applications/application.py +++ b/src/primaite/simulator/system/applications/application.py @@ -80,7 +80,10 @@ class Application(IOSoftware): """ super().apply_timestep(timestep=timestep) - self.num_executions = 0 # reset number of executions + def pre_timestep(self, timestep: int) -> None: + """Apply pre-timestep logic.""" + super().pre_timestep(timestep) + self.num_executions = 0 def _can_perform_action(self) -> bool: """ diff --git a/src/primaite/simulator/system/applications/database_client.py b/src/primaite/simulator/system/applications/database_client.py index 1de75dc5..d304c200 100644 --- a/src/primaite/simulator/system/applications/database_client.py +++ b/src/primaite/simulator/system/applications/database_client.py @@ -31,6 +31,7 @@ class DatabaseClient(Application): """Keep track of connections that were established or verified during this step. Used for rewards.""" last_query_response: Optional[Dict] = None """Keep track of the latest query response. Used to determine rewards.""" + _server_connection_id: Optional[str] = None def __init__(self, **kwargs): kwargs["name"] = "DatabaseClient" @@ -51,10 +52,9 @@ class DatabaseClient(Application): def execute(self) -> bool: """Execution definition for db client: perform a select query.""" self.num_executions += 1 # trying to connect counts as an execution - if self.connections: - can_connect = self.check_connection(connection_id=list(self.connections.keys())[-1]) - else: - can_connect = self.check_connection(connection_id=str(uuid4())) + if not self._server_connection_id: + self.connect() + can_connect = self.check_connection(connection_id=self._server_connection_id) self._last_connection_successful = can_connect return can_connect @@ -80,17 +80,21 @@ class DatabaseClient(Application): self.server_password = server_password self.sys_log.info(f"{self.name}: Configured the {self.name} with {server_ip_address=}, {server_password=}.") - def connect(self, connection_id: Optional[str] = None) -> bool: + def connect(self) -> bool: """Connect to a Database Service.""" if not self._can_perform_action(): return False - if not connection_id: - connection_id = str(uuid4()) + if not self._server_connection_id: + self._server_connection_id = str(uuid4()) self.connected = self._connect( - server_ip_address=self.server_ip_address, password=self.server_password, connection_id=connection_id + server_ip_address=self.server_ip_address, + password=self.server_password, + connection_id=self._server_connection_id, ) + if not self.connected: + self._server_connection_id = None return self.connected def check_connection(self, connection_id: str) -> bool: @@ -125,7 +129,7 @@ class DatabaseClient(Application): :type: is_reattempt: Optional[bool] """ if is_reattempt: - if self.connections.get(connection_id): + if self._server_connection_id: self.sys_log.info( f"{self.name} {connection_id=}: DatabaseClient connection to {server_ip_address} authorised" ) @@ -149,31 +153,28 @@ class DatabaseClient(Application): server_ip_address=server_ip_address, password=password, connection_id=connection_id, is_reattempt=True ) - def disconnect(self, connection_id: Optional[str] = None) -> bool: + def disconnect(self) -> bool: """Disconnect from the Database Service.""" if not self._can_perform_action(): self.sys_log.error(f"Unable to disconnect - {self.name} is {self.operating_state.name}") return False # if there are no connections - nothing to disconnect - if not len(self.connections): + if not self._server_connection_id: self.sys_log.error(f"Unable to disconnect - {self.name} has no active connections.") return False # if no connection provided, disconnect the first connection - if not connection_id: - connection_id = list(self.connections.keys())[0] - software_manager: SoftwareManager = self.software_manager software_manager.send_payload_to_session_manager( - payload={"type": "disconnect", "connection_id": connection_id}, + payload={"type": "disconnect", "connection_id": self._server_connection_id}, dest_ip_address=self.server_ip_address, dest_port=self.port, ) - self.remove_connection(connection_id=connection_id) + self.remove_connection(connection_id=self._server_connection_id) self.sys_log.info( - f"{self.name}: DatabaseClient disconnected connection {connection_id} from {self.server_ip_address}" + f"{self.name}: DatabaseClient disconnected {self._server_connection_id} from {self.server_ip_address}" ) self.connected = False @@ -224,18 +225,20 @@ class DatabaseClient(Application): # reset last query response self.last_query_response = None - if connection_id is None: - if self.connections: - connection_id = list(self.connections.keys())[-1] - # TODO: if the most recent connection dies, it should be automatically cleared. - else: - connection_id = str(uuid4()) + connection_id: str - if not self.connections.get(connection_id): - if not self.connect(connection_id=connection_id): - return False + if not connection_id: + connection_id = self._server_connection_id + + if not connection_id: + self.connect() + connection_id = self._server_connection_id + + if not connection_id: + msg = "Cannot run sql query, could not establish connection with the server." + self.parent.sys_log(msg) + return False - # Initialise the tracker of this ID to False uuid = str(uuid4()) self._query_success_tracker[uuid] = False return self._query(sql=sql, query_id=uuid, connection_id=connection_id) diff --git a/src/primaite/simulator/system/applications/red_applications/ransomware_script.py b/src/primaite/simulator/system/applications/red_applications/ransomware_script.py new file mode 100644 index 00000000..54880271 --- /dev/null +++ b/src/primaite/simulator/system/applications/red_applications/ransomware_script.py @@ -0,0 +1,316 @@ +from enum import IntEnum +from ipaddress import IPv4Address +from typing import Dict, Optional + +from primaite import getLogger +from primaite.game.science import simulate_trial +from primaite.interface.request import RequestResponse +from primaite.simulator.core import RequestManager, RequestType +from primaite.simulator.network.transmission.network_layer import IPProtocol +from primaite.simulator.network.transmission.transport_layer import Port +from primaite.simulator.system.applications.application import Application +from primaite.simulator.system.applications.database_client import DatabaseClient + +_LOGGER = getLogger(__name__) + + +class RansomwareAttackStage(IntEnum): + """ + Enumeration representing different attack stages of the ransomware script. + + This enumeration defines the various stages a data manipulation attack can be in during its lifecycle + in the simulation. + Each stage represents a specific phase in the attack process. + """ + + NOT_STARTED = 0 + "Indicates that the attack has not started yet." + DOWNLOAD = 1 + "Installing the Encryption Script - Testing" + INSTALL = 2 + "The stage where logon procedures are simulated." + ACTIVATE = 3 + "Operating Status Changes" + PROPAGATE = 4 + "Represents the stage of performing a horizontal port scan on the target." + COMMAND_AND_CONTROL = 5 + "Represents the stage of setting up a rely C2 Beacon (Not Implemented)" + PAYLOAD = 6 + "Stage of actively attacking the target." + SUCCEEDED = 7 + "Indicates the attack has been successfully completed." + FAILED = 8 + "Signifies that the attack has failed." + + +class RansomwareScript(Application): + """Ransomware Kill Chain - Designed to be used by the TAP001 Agent on the example layout Network. + + :ivar payload: The attack stage query payload. (Default Corrupt) + :ivar target_scan_p_of_success: The probability of success for the target scan stage. + :ivar c2_beacon_p_of_success: The probability of success for the c2_beacon stage + :ivar ransomware_encrypt_p_of_success: The probability of success for the ransomware 'attack' (encrypt) stage. + :ivar repeat: Whether to repeat attacking once finished. + """ + + server_ip_address: Optional[IPv4Address] = None + """IP address of node which hosts the database.""" + server_password: Optional[str] = None + """Password required to access the database.""" + payload: Optional[str] = "ENCRYPT" + "Payload String for the payload stage" + target_scan_p_of_success: float = 0.9 + "Probability of the target scan succeeding: Default 0.9" + c2_beacon_p_of_success: float = 0.9 + "Probability of the c2 beacon setup stage succeeding: Default 0.9" + ransomware_encrypt_p_of_success: float = 0.9 + "Probability of the ransomware attack succeeding: Default 0.9" + repeat: bool = False + "If true, the Denial of Service bot will keep performing the attack." + attack_stage: RansomwareAttackStage = RansomwareAttackStage.NOT_STARTED + "The ransomware attack stage. See RansomwareAttackStage Class" + + def __init__(self, **kwargs): + kwargs["name"] = "RansomwareScript" + kwargs["port"] = Port.NONE + kwargs["protocol"] = IPProtocol.NONE + + super().__init__(**kwargs) + + def describe_state(self) -> Dict: + """ + Produce a dictionary describing the current state of this object. + + Please see :py:meth:`primaite.simulator.core.SimComponent.describe_state` for a more detailed explanation. + + :return: Current state of this object and child objects. + :rtype: Dict + """ + state = super().describe_state() + return state + + @property + def _host_db_client(self) -> DatabaseClient: + """Return the database client that is installed on the same machine as the Ransomware Script.""" + db_client = self.software_manager.software.get("DatabaseClient") + if db_client is None: + _LOGGER.info(f"{self.__class__.__name__} cannot find a database client on its host.") + return db_client + + def _init_request_manager(self) -> RequestManager: + """ + Initialise the request manager. + + More information in user guide and docstring for SimComponent._init_request_manager. + """ + rm = super()._init_request_manager() + rm.add_request( + name="execute", + request_type=RequestType(func=lambda request, context: RequestResponse.from_bool(self.attack())), + ) + return rm + + def _activate(self): + """ + Simulate the install process as the initial stage of the attack. + + Advances the attack stage to 'ACTIVATE' attack state. + """ + if self.attack_stage == RansomwareAttackStage.INSTALL: + self.sys_log.info(f"{self.name}: Activated!") + self.attack_stage = RansomwareAttackStage.ACTIVATE + + def apply_timestep(self, timestep: int) -> None: + """ + Apply a timestep to the bot, triggering the application loop. + + :param timestep: The timestep value to update the bot's state. + """ + pass + + def run(self) -> bool: + """Calls the parent classes execute method before starting the application loop.""" + super().run() + return True + + def _application_loop(self) -> bool: + """ + The main application loop of the script, handling the attack process. + + This is the core loop where the bot sequentially goes through the stages of the attack. + """ + if not self._can_perform_action(): + return False + if self.server_ip_address and self.payload: + self.sys_log.info(f"{self.name}: Running") + self.attack_stage = RansomwareAttackStage.NOT_STARTED + self._local_download() + self._install() + self._activate() + self._perform_target_scan() + self._setup_beacon() + self._perform_ransomware_encrypt() + + if self.repeat and self.attack_stage in ( + RansomwareAttackStage.SUCCEEDED, + RansomwareAttackStage.FAILED, + ): + self.attack_stage = RansomwareAttackStage.NOT_STARTED + return True + else: + self.sys_log.error(f"{self.name}: Failed to start as it requires both a target_ip_address and payload.") + return False + + def configure( + self, + server_ip_address: IPv4Address, + server_password: Optional[str] = None, + payload: Optional[str] = None, + target_scan_p_of_success: Optional[float] = None, + c2_beacon_p_of_success: Optional[float] = None, + ransomware_encrypt_p_of_success: Optional[float] = None, + repeat: bool = True, + ): + """ + Configure the Ransomware Script to communicate with a DatabaseService. + + :param server_ip_address: The IP address of the Node the DatabaseService is on. + :param server_password: The password on the DatabaseService. + :param payload: The attack stage query (Encrypt / Delete) + :param target_scan_p_of_success: The probability of success for the target scan stage. + :param c2_beacon_p_of_success: The probability of success for the c2_beacon stage + :param ransomware_encrypt_p_of_success: The probability of success for the ransomware 'attack' (encrypt) stage. + :param repeat: Whether to repeat attacking once finished. + """ + if server_ip_address: + self.server_ip_address = server_ip_address + if server_password: + self.server_password = server_password + if payload: + self.payload = payload + if target_scan_p_of_success: + self.target_scan_p_of_success = target_scan_p_of_success + if c2_beacon_p_of_success: + self.c2_beacon_p_of_success = c2_beacon_p_of_success + if ransomware_encrypt_p_of_success: + self.ransomware_encrypt_p_of_success = ransomware_encrypt_p_of_success + if repeat: + self.repeat = repeat + self.sys_log.info( + f"{self.name}: Configured the {self.name} with {server_ip_address=}, {payload=}, {server_password=}, " + f"{repeat=}." + ) + + def _install(self): + """ + Simulate the install stage in the kill-chain. + + Advances the attack stage to 'ACTIVATE' if successful. + + From this attack stage onwards. + the ransomware application is now visible from this point onwardin the observation space. + """ + if self.attack_stage == RansomwareAttackStage.DOWNLOAD: + self.sys_log.info(f"{self.name}: Malware installed on the local file system") + downloads_folder = self.file_system.get_folder(folder_name="downloads") + ransomware_file = downloads_folder.get_file(file_name="ransom_script.pdf") + ransomware_file.num_access += 1 + self.attack_stage = RansomwareAttackStage.INSTALL + + def _setup_beacon(self): + """ + Simulates setting up a c2 beacon; currently a pseudo step for increasing red variance. + + Advances the attack stage to 'COMMAND AND CONTROL` if successful. + + :param p_of_sucess: Probability of a successful c2 setup (Advancing this step), + by default the success rate is 0.5 + """ + if self.attack_stage == RansomwareAttackStage.PROPAGATE: + self.sys_log.info(f"{self.name} Attempting to set up C&C Beacon - Scan 1/2") + if simulate_trial(self.c2_beacon_p_of_success): + self.sys_log.info(f"{self.name} C&C Successful setup - Scan 2/2") + c2c_setup = True # TODO Implement the c2c step via an FTP Application/Service + if c2c_setup: + self.attack_stage = RansomwareAttackStage.COMMAND_AND_CONTROL + + def _perform_target_scan(self): + """ + Perform a simulated port scan to check for open SQL ports. + + Advances the attack stage to `PROPAGATE` if successful. + + :param p_of_success: Probability of successful port scan, by default 0.1. + """ + if self.attack_stage == RansomwareAttackStage.ACTIVATE: + # perform a port scan to identify that the SQL port is open on the server + self.sys_log.info(f"{self.name}: Scanning for vulnerable databases - Scan 0/2") + if simulate_trial(self.target_scan_p_of_success): + self.sys_log.info(f"{self.name}: Found a target database! Scan 1/2") + port_is_open = True # TODO Implement a NNME Triggering scan as a seperate Red Application + if port_is_open: + self.attack_stage = RansomwareAttackStage.PROPAGATE + + def attack(self) -> bool: + """Perform the attack steps after opening the application.""" + if not self._can_perform_action(): + _LOGGER.debug("Ransomware application is unable to perform it's actions.") + self.run() + self.num_executions += 1 + return self._application_loop() + + def _perform_ransomware_encrypt(self): + """ + Execute the Ransomware Encrypt payload on the target. + + Advances the attack stage to `COMPLETE` if successful, or 'FAILED' if unsuccessful. + :param p_of_success: Probability of successfully performing ransomware encryption, by default 0.1. + """ + if self._host_db_client is None: + self.sys_log.info(f"{self.name}: Failed to connect to db_client - Ransomware Script") + self.attack_stage = RansomwareAttackStage.FAILED + return + + self._host_db_client.server_ip_address = self.server_ip_address + self._host_db_client.server_password = self.server_password + if self.attack_stage == RansomwareAttackStage.COMMAND_AND_CONTROL: + if simulate_trial(self.ransomware_encrypt_p_of_success): + self.sys_log.info(f"{self.name}: Attempting to launch payload") + if not len(self._host_db_client.connections): + self._host_db_client.connect() + if len(self._host_db_client.connections): + self._host_db_client.query(self.payload) + self.sys_log.info(f"{self.name} Payload delivered: {self.payload}") + attack_successful = True + if attack_successful: + self.sys_log.info(f"{self.name}: Payload Successful") + self.attack_stage = RansomwareAttackStage.SUCCEEDED + else: + self.sys_log.info(f"{self.name}: Payload failed") + self.attack_stage = RansomwareAttackStage.FAILED + else: + self.sys_log.error("Attack Attempted to launch too quickly") + self.attack_stage = RansomwareAttackStage.FAILED + + def _local_download(self): + """Downloads itself via the onto the local file_system.""" + if self.attack_stage == RansomwareAttackStage.NOT_STARTED: + if self._local_download_verify(): + self.attack_stage = RansomwareAttackStage.DOWNLOAD + else: + self.sys_log.info("Malware failed to create a installation location") + self.attack_stage = RansomwareAttackStage.FAILED + else: + self.sys_log.info("Malware failed to download") + self.attack_stage = RansomwareAttackStage.FAILED + + def _local_download_verify(self) -> bool: + """Verifies a download location - Creates one if needed.""" + for folder in self.file_system.folders: + if self.file_system.folders[folder].name == "downloads": + self.file_system.num_file_creations += 1 + return True + + self.file_system.create_folder("downloads") + self.file_system.create_file(folder_name="downloads", file_name="ransom_script.pdf") + return True diff --git a/src/primaite/simulator/system/core/sys_log.py b/src/primaite/simulator/system/core/sys_log.py index 414bacef..c10f7d3c 100644 --- a/src/primaite/simulator/system/core/sys_log.py +++ b/src/primaite/simulator/system/core/sys_log.py @@ -88,6 +88,10 @@ class SysLog: root.mkdir(exist_ok=True, parents=True) return root / f"{self.hostname}_sys.log" + def _write_to_terminal(self, msg: str, level: str, to_terminal: bool = False): + if to_terminal or SIM_OUTPUT.write_sys_log_to_terminal: + print(f"{self.hostname}: ({level}) {msg}") + def debug(self, msg: str, to_terminal: bool = False): """ Logs a message with the DEBUG level. @@ -97,8 +101,7 @@ class SysLog: """ if SIM_OUTPUT.save_sys_logs: self.logger.debug(msg) - if to_terminal: - print(msg) + self._write_to_terminal(msg, "DEBUG", to_terminal) def info(self, msg: str, to_terminal: bool = False): """ @@ -109,8 +112,7 @@ class SysLog: """ if SIM_OUTPUT.save_sys_logs: self.logger.info(msg) - if to_terminal: - print(msg) + self._write_to_terminal(msg, "INFO", to_terminal) def warning(self, msg: str, to_terminal: bool = False): """ @@ -121,8 +123,7 @@ class SysLog: """ if SIM_OUTPUT.save_sys_logs: self.logger.warning(msg) - if to_terminal: - print(msg) + self._write_to_terminal(msg, "WARNING", to_terminal) def error(self, msg: str, to_terminal: bool = False): """ @@ -133,8 +134,7 @@ class SysLog: """ if SIM_OUTPUT.save_sys_logs: self.logger.error(msg) - if to_terminal: - print(msg) + self._write_to_terminal(msg, "ERROR", to_terminal) def critical(self, msg: str, to_terminal: bool = False): """ @@ -145,5 +145,4 @@ class SysLog: """ if SIM_OUTPUT.save_sys_logs: self.logger.critical(msg) - if to_terminal: - print(msg) + self._write_to_terminal(msg, "CRITICAL", to_terminal) diff --git a/src/primaite/simulator/system/services/database/database_service.py b/src/primaite/simulator/system/services/database/database_service.py index 321d9088..833b1fa5 100644 --- a/src/primaite/simulator/system/services/database/database_service.py +++ b/src/primaite/simulator/system/services/database/database_service.py @@ -141,8 +141,7 @@ class DatabaseService(Service): """Returns the database file.""" return self.file_system.get_file(folder_name="database", file_name="database.db") - @property - def folder(self) -> Folder: + def _return_database_folder(self) -> Folder: """Returns the database folder.""" return self.file_system.get_folder_by_id(self.db_file.folder_id) @@ -187,7 +186,10 @@ class DatabaseService(Service): } def _process_sql( - self, query: Literal["SELECT", "DELETE", "INSERT"], query_id: str, connection_id: Optional[str] = None + self, + query: Literal["SELECT", "DELETE", "INSERT", "ENCRYPT"], + query_id: str, + connection_id: Optional[str] = None, ) -> Dict[str, Union[int, List[Any]]]: """ Executes the given SQL query and returns the result. @@ -196,6 +198,7 @@ class DatabaseService(Service): - SELECT : returns the data - DELETE : deletes the data - INSERT : inserts the data + - ENCRYPT : corrupts the data :param query: The SQL query to be executed. :return: Dictionary containing status code and data fetched. @@ -207,7 +210,15 @@ class DatabaseService(Service): return {"status_code": 404, "type": "sql", "data": False} if query == "SELECT": - if self.db_file.health_status == FileSystemItemHealthStatus.GOOD: + if self.db_file.health_status == FileSystemItemHealthStatus.CORRUPT: + return { + "status_code": 200, + "type": "sql", + "data": False, + "uuid": query_id, + "connection_id": connection_id, + } + elif self.db_file.health_status == FileSystemItemHealthStatus.GOOD: return { "status_code": 200, "type": "sql", @@ -226,6 +237,20 @@ class DatabaseService(Service): "uuid": query_id, "connection_id": connection_id, } + elif query == "ENCRYPT": + self.file_system.num_file_creations += 1 + self.db_file.health_status = FileSystemItemHealthStatus.CORRUPT + self.db_file.num_access += 1 + database_folder = self._return_database_folder() + database_folder.health_status = FileSystemItemHealthStatus.CORRUPT + self.file_system.num_file_deletions += 1 + return { + "status_code": 200, + "type": "sql", + "data": False, + "uuid": query_id, + "connection_id": connection_id, + } elif query == "INSERT": if self.health_state_actual == SoftwareHealthState.GOOD: return { diff --git a/src/primaite/simulator/system/services/ntp/ntp_client.py b/src/primaite/simulator/system/services/ntp/ntp_client.py index ad00065c..fe351dba 100644 --- a/src/primaite/simulator/system/services/ntp/ntp_client.py +++ b/src/primaite/simulator/system/services/ntp/ntp_client.py @@ -87,13 +87,9 @@ class NTPClient(Service): :return: True if successful, False otherwise. """ if not isinstance(payload, NTPPacket): - _LOGGER.debug(f"{payload} is not a NTPPacket") + _LOGGER.debug(f"{self.name}: Failed to parse NTP update") return False if payload.ntp_reply.ntp_datetime: - self.sys_log.info( - f"{self.name}: \ - Received time update from NTP server{payload.ntp_reply.ntp_datetime}" - ) self.time = payload.ntp_reply.ntp_datetime return True @@ -124,5 +120,3 @@ class NTPClient(Service): if self.operating_state == ServiceOperatingState.RUNNING: # request time from server self.request_time() - else: - self.sys_log.debug(f"{self.name} ntp client not running") diff --git a/src/primaite/simulator/system/software.py b/src/primaite/simulator/system/software.py index 3ab32bc6..50c96c17 100644 --- a/src/primaite/simulator/system/software.py +++ b/src/primaite/simulator/system/software.py @@ -224,6 +224,10 @@ class Software(SimComponent): if self.health_state_actual == SoftwareHealthState.FIXING: self._update_fix_status() + def pre_timestep(self, timestep: int) -> None: + """Apply pre-timestep logic.""" + super().pre_timestep(timestep) + class IOSoftware(Software): """ diff --git a/tests/assets/configs/bad_primaite_session.yaml b/tests/assets/configs/bad_primaite_session.yaml index 7d85ea9f..18b86bf3 100644 --- a/tests/assets/configs/bad_primaite_session.yaml +++ b/tests/assets/configs/bad_primaite_session.yaml @@ -303,6 +303,8 @@ agents: source_port_id: 1 dest_port_id: 1 protocol_id: 1 + source_wildcard_id: 0 + dest_wildcard_id: 0 23: # "ACL: ADDRULE - Block outgoing traffic from client 2" (not supported in Primaite) action: "ROUTER_ACL_ADDRULE" options: @@ -314,6 +316,8 @@ agents: source_port_id: 1 dest_port_id: 1 protocol_id: 1 + source_wildcard_id: 0 + dest_wildcard_id: 0 24: # block tcp traffic from client 1 to web app action: "ROUTER_ACL_ADDRULE" options: @@ -325,6 +329,8 @@ agents: source_port_id: 1 dest_port_id: 1 protocol_id: 3 + source_wildcard_id: 0 + dest_wildcard_id: 0 25: # block tcp traffic from client 2 to web app action: "ROUTER_ACL_ADDRULE" options: @@ -336,6 +342,8 @@ agents: source_port_id: 1 dest_port_id: 1 protocol_id: 3 + source_wildcard_id: 0 + dest_wildcard_id: 0 26: action: "ROUTER_ACL_ADDRULE" options: @@ -347,6 +355,8 @@ agents: source_port_id: 1 dest_port_id: 1 protocol_id: 3 + source_wildcard_id: 0 + dest_wildcard_id: 0 27: action: "ROUTER_ACL_ADDRULE" options: @@ -358,6 +368,8 @@ agents: source_port_id: 1 dest_port_id: 1 protocol_id: 3 + source_wildcard_id: 0 + dest_wildcard_id: 0 28: action: "ROUTER_ACL_REMOVERULE" options: @@ -505,23 +517,15 @@ agents: max_services_per_node: 2 max_nics_per_node: 8 max_acl_rules: 10 - ip_address_order: - - node_name: domain_controller - nic_num: 1 - - node_name: web_server - nic_num: 1 - - node_name: database_server - nic_num: 1 - - node_name: backup_server - nic_num: 1 - - node_name: security_suite - nic_num: 1 - - node_name: client_1 - nic_num: 1 - - node_name: client_2 - nic_num: 1 - - node_name: security_suite - nic_num: 2 + ip_list: + - 192.168.1.10 + - 192.168.1.12 + - 192.168.1.14 + - 192.168.1.16 + - 192.168.1.110 + - 192.168.10.21 + - 192.168.10.22 + - 192.168.10.110 reward_function: reward_components: diff --git a/tests/assets/configs/basic_firewall.yaml b/tests/assets/configs/basic_firewall.yaml index 0512fbe1..0253a4d2 100644 --- a/tests/assets/configs/basic_firewall.yaml +++ b/tests/assets/configs/basic_firewall.yaml @@ -5,21 +5,7 @@ # -------------- -------------- -------------- # -training_config: - rl_framework: SB3 - rl_algorithm: PPO - seed: 333 - n_learn_episodes: 1 - n_eval_episodes: 5 - max_steps_per_episode: 128 - deterministic_eval: false - n_agents: 1 - agent_references: - - defender - io_settings: - save_checkpoints: true - checkpoint_interval: 5 save_step_metadata: false save_pcap_logs: true save_sys_logs: true diff --git a/tests/assets/configs/basic_switched_network.yaml b/tests/assets/configs/basic_switched_network.yaml index bbc45de2..15dd377e 100644 --- a/tests/assets/configs/basic_switched_network.yaml +++ b/tests/assets/configs/basic_switched_network.yaml @@ -4,22 +4,7 @@ # | client_1 |------| switch_1 |------| client_2 | # -------------- -------------- -------------- # - -training_config: - rl_framework: SB3 - rl_algorithm: PPO - seed: 333 - n_learn_episodes: 1 - n_eval_episodes: 5 - max_steps_per_episode: 128 - deterministic_eval: false - n_agents: 1 - agent_references: - - defender - io_settings: - save_checkpoints: true - checkpoint_interval: 5 save_step_metadata: false save_pcap_logs: true save_sys_logs: true diff --git a/tests/assets/configs/dmz_network.yaml b/tests/assets/configs/dmz_network.yaml index 2ce722f7..52316260 100644 --- a/tests/assets/configs/dmz_network.yaml +++ b/tests/assets/configs/dmz_network.yaml @@ -30,21 +30,7 @@ # | external_computer |------| switch_3 |------| external_server | # ----------------------- -------------- --------------------- # -training_config: - rl_framework: SB3 - rl_algorithm: PPO - seed: 333 - n_learn_episodes: 1 - n_eval_episodes: 5 - max_steps_per_episode: 128 - deterministic_eval: false - n_agents: 1 - agent_references: - - defender - io_settings: - save_checkpoints: true - checkpoint_interval: 5 save_step_metadata: false save_pcap_logs: true save_sys_logs: true diff --git a/tests/assets/configs/eval_only_primaite_session.yaml b/tests/assets/configs/eval_only_primaite_session.yaml index f05e3390..eab0720a 100644 --- a/tests/assets/configs/eval_only_primaite_session.yaml +++ b/tests/assets/configs/eval_only_primaite_session.yaml @@ -319,6 +319,8 @@ agents: source_port_id: 1 dest_port_id: 1 protocol_id: 1 + source_wildcard_id: 0 + dest_wildcard_id: 0 23: # "ACL: ADDRULE - Block outgoing traffic from client 2" (not supported in Primaite) action: "ROUTER_ACL_ADDRULE" options: @@ -330,6 +332,8 @@ agents: source_port_id: 1 dest_port_id: 1 protocol_id: 1 + source_wildcard_id: 0 + dest_wildcard_id: 0 24: # block tcp traffic from client 1 to web app action: "ROUTER_ACL_ADDRULE" options: @@ -341,6 +345,8 @@ agents: source_port_id: 1 dest_port_id: 1 protocol_id: 3 + source_wildcard_id: 0 + dest_wildcard_id: 0 25: # block tcp traffic from client 2 to web app action: "ROUTER_ACL_ADDRULE" options: @@ -352,6 +358,8 @@ agents: source_port_id: 1 dest_port_id: 1 protocol_id: 3 + source_wildcard_id: 0 + dest_wildcard_id: 0 26: action: "ROUTER_ACL_ADDRULE" options: @@ -363,6 +371,8 @@ agents: source_port_id: 1 dest_port_id: 1 protocol_id: 3 + source_wildcard_id: 0 + dest_wildcard_id: 0 27: action: "ROUTER_ACL_ADDRULE" options: @@ -374,6 +384,8 @@ agents: source_port_id: 1 dest_port_id: 1 protocol_id: 3 + source_wildcard_id: 0 + dest_wildcard_id: 0 28: action: "ROUTER_ACL_REMOVERULE" options: @@ -521,23 +533,15 @@ agents: max_services_per_node: 2 max_nics_per_node: 8 max_acl_rules: 10 - ip_address_order: - - node_name: domain_controller - nic_num: 1 - - node_name: web_server - nic_num: 1 - - node_name: database_server - nic_num: 1 - - node_name: backup_server - nic_num: 1 - - node_name: security_suite - nic_num: 1 - - node_name: client_1 - nic_num: 1 - - node_name: client_2 - nic_num: 1 - - node_name: security_suite - nic_num: 2 + ip_list: + - 192.168.1.10 + - 192.168.1.12 + - 192.168.1.14 + - 192.168.1.16 + - 192.168.1.110 + - 192.168.10.21 + - 192.168.10.22 + - 192.168.10.110 reward_function: reward_components: diff --git a/tests/assets/configs/firewall_actions_network.yaml b/tests/assets/configs/firewall_actions_network.yaml index 1f4a45e0..fdf29599 100644 --- a/tests/assets/configs/firewall_actions_network.yaml +++ b/tests/assets/configs/firewall_actions_network.yaml @@ -106,25 +106,6 @@ agents: label: ICS options: {} - # observation_space: - # type: UC2BlueObservation - # options: - # num_services_per_node: 1 - # num_folders_per_node: 1 - # num_files_per_folder: 1 - # num_nics_per_node: 2 - # nodes: - # - node_hostname: client_1 - # links: - # - link_ref: client_1___switch_1 - # acl: - # options: - # max_acl_rules: 10 - # router_hostname: router_1 - # ip_address_order: - # - node_hostname: client_1 - # nic_num: 1 - # ics: null action_space: action_list: - type: DONOTHING @@ -149,6 +130,8 @@ agents: source_port_id: 1 dest_port_id: 1 protocol_id: 1 + source_wildcard_id: 0 + dest_wildcard_id: 0 2: action: FIREWALL_ACL_REMOVERULE options: @@ -169,6 +152,8 @@ agents: source_port_id: 2 dest_port_id: 3 protocol_id: 2 + source_wildcard_id: 0 + dest_wildcard_id: 0 4: action: FIREWALL_ACL_REMOVERULE options: @@ -189,6 +174,8 @@ agents: source_port_id: 4 dest_port_id: 4 protocol_id: 4 + source_wildcard_id: 0 + dest_wildcard_id: 0 6: action: FIREWALL_ACL_REMOVERULE options: @@ -209,6 +196,8 @@ agents: source_port_id: 4 dest_port_id: 4 protocol_id: 3 + source_wildcard_id: 0 + dest_wildcard_id: 0 8: action: FIREWALL_ACL_REMOVERULE options: @@ -229,6 +218,8 @@ agents: source_port_id: 5 dest_port_id: 5 protocol_id: 2 + source_wildcard_id: 0 + dest_wildcard_id: 0 10: action: FIREWALL_ACL_REMOVERULE options: @@ -249,6 +240,8 @@ agents: source_port_id: 1 dest_port_id: 1 protocol_id: 1 + source_wildcard_id: 0 + dest_wildcard_id: 0 12: action: FIREWALL_ACL_REMOVERULE options: @@ -271,13 +264,10 @@ agents: - node_name: client_1 - node_name: dmz_server - node_name: external_computer - ip_address_order: - - node_name: client_1 - nic_num: 1 - - node_name: dmz_server - nic_num: 1 - - node_name: external_computer - nic_num: 1 + ip_list: + - 192.168.0.10 + - 192.168.10.10 + - 192.168.20.10 max_folders_per_node: 2 max_files_per_folder: 2 max_services_per_node: 2 diff --git a/tests/assets/configs/multi_agent_session.yaml b/tests/assets/configs/multi_agent_session.yaml index 6a37be80..0b0685c0 100644 --- a/tests/assets/configs/multi_agent_session.yaml +++ b/tests/assets/configs/multi_agent_session.yaml @@ -314,6 +314,8 @@ agents: source_port_id: 1 dest_port_id: 1 protocol_id: 1 + source_wildcard_id: 0 + dest_wildcard_id: 0 23: # "ACL: ADDRULE - Block outgoing traffic from client 2" (not supported in Primaite) action: "ROUTER_ACL_ADDRULE" options: @@ -325,6 +327,8 @@ agents: source_port_id: 1 dest_port_id: 1 protocol_id: 1 + source_wildcard_id: 0 + dest_wildcard_id: 0 24: # block tcp traffic from client 1 to web app action: "ROUTER_ACL_ADDRULE" options: @@ -336,6 +340,8 @@ agents: source_port_id: 1 dest_port_id: 1 protocol_id: 3 + source_wildcard_id: 0 + dest_wildcard_id: 0 25: # block tcp traffic from client 2 to web app action: "ROUTER_ACL_ADDRULE" options: @@ -347,6 +353,8 @@ agents: source_port_id: 1 dest_port_id: 1 protocol_id: 3 + source_wildcard_id: 0 + dest_wildcard_id: 0 26: action: "ROUTER_ACL_ADDRULE" options: @@ -358,6 +366,8 @@ agents: source_port_id: 1 dest_port_id: 1 protocol_id: 3 + source_wildcard_id: 0 + dest_wildcard_id: 0 27: action: "ROUTER_ACL_ADDRULE" options: @@ -369,6 +379,8 @@ agents: source_port_id: 1 dest_port_id: 1 protocol_id: 3 + source_wildcard_id: 0 + dest_wildcard_id: 0 28: action: "ROUTER_ACL_REMOVERULE" options: @@ -516,23 +528,15 @@ agents: max_services_per_node: 2 max_nics_per_node: 8 max_acl_rules: 10 - ip_address_order: - - node_name: domain_controller - nic_num: 1 - - node_name: web_server - nic_num: 1 - - node_name: database_server - nic_num: 1 - - node_name: backup_server - nic_num: 1 - - node_name: security_suite - nic_num: 1 - - node_name: client_1 - nic_num: 1 - - node_name: client_2 - nic_num: 1 - - node_name: security_suite - nic_num: 2 + ip_list: + - 192.168.1.10 + - 192.168.1.12 + - 192.168.1.14 + - 192.168.1.16 + - 192.168.1.110 + - 192.168.10.21 + - 192.168.10.22 + - 192.168.10.110 reward_function: reward_components: @@ -780,6 +784,8 @@ agents: source_port_id: 1 dest_port_id: 1 protocol_id: 1 + source_wildcard_id: 0 + dest_wildcard_id: 0 23: # "ACL: ADDRULE - Block outgoing traffic from client 2" (not supported in Primaite) action: "ROUTER_ACL_ADDRULE" options: @@ -791,6 +797,8 @@ agents: source_port_id: 1 dest_port_id: 1 protocol_id: 1 + source_wildcard_id: 0 + dest_wildcard_id: 0 24: # block tcp traffic from client 1 to web app action: "ROUTER_ACL_ADDRULE" options: @@ -802,6 +810,8 @@ agents: source_port_id: 1 dest_port_id: 1 protocol_id: 3 + source_wildcard_id: 0 + dest_wildcard_id: 0 25: # block tcp traffic from client 2 to web app action: "ROUTER_ACL_ADDRULE" options: @@ -813,6 +823,8 @@ agents: source_port_id: 1 dest_port_id: 1 protocol_id: 3 + source_wildcard_id: 0 + dest_wildcard_id: 0 26: action: "ROUTER_ACL_ADDRULE" options: @@ -824,6 +836,8 @@ agents: source_port_id: 1 dest_port_id: 1 protocol_id: 3 + source_wildcard_id: 0 + dest_wildcard_id: 0 27: action: "ROUTER_ACL_ADDRULE" options: @@ -835,6 +849,8 @@ agents: source_port_id: 1 dest_port_id: 1 protocol_id: 3 + source_wildcard_id: 0 + dest_wildcard_id: 0 28: action: "ROUTER_ACL_REMOVERULE" options: @@ -981,23 +997,15 @@ agents: max_services_per_node: 2 max_nics_per_node: 8 max_acl_rules: 10 - ip_address_order: - - node_name: domain_controller - nic_num: 1 - - node_name: web_server - nic_num: 1 - - node_name: database_server - nic_num: 1 - - node_name: backup_server - nic_num: 1 - - node_name: security_suite - nic_num: 1 - - node_name: client_1 - nic_num: 1 - - node_name: client_2 - nic_num: 1 - - node_name: security_suite - nic_num: 2 + ip_list: + - 192.168.1.10 + - 192.168.1.12 + - 192.168.1.14 + - 192.168.1.16 + - 192.168.1.110 + - 192.168.10.21 + - 192.168.10.22 + - 192.168.10.110 reward_function: reward_components: diff --git a/tests/assets/configs/no_nodes_links_agents_network.yaml b/tests/assets/configs/no_nodes_links_agents_network.yaml index 607a899a..b20835bc 100644 --- a/tests/assets/configs/no_nodes_links_agents_network.yaml +++ b/tests/assets/configs/no_nodes_links_agents_network.yaml @@ -1,18 +1,4 @@ -training_config: - rl_framework: SB3 - rl_algorithm: PPO - seed: 333 - n_learn_episodes: 1 - n_eval_episodes: 5 - max_steps_per_episode: 128 - deterministic_eval: false - n_agents: 1 - agent_references: - - defender - io_settings: - save_checkpoints: true - checkpoint_interval: 5 save_step_metadata: false save_pcap_logs: true save_sys_logs: true diff --git a/tests/assets/configs/shared_rewards.yaml b/tests/assets/configs/shared_rewards.yaml index bfa03ace..c5ba06b1 100644 --- a/tests/assets/configs/shared_rewards.yaml +++ b/tests/assets/configs/shared_rewards.yaml @@ -131,10 +131,6 @@ agents: options: node_hostname: client_1 - - - - - ref: data_manipulation_attacker team: RED type: RedDatabaseCorruptingAgent @@ -490,6 +486,8 @@ agents: source_port_id: 1 dest_port_id: 1 protocol_id: 1 + source_wildcard_id: 0 + dest_wildcard_id: 0 47: # old action num: 23 # "ACL: ADDRULE - Block outgoing traffic from client 2" action: "ROUTER_ACL_ADDRULE" options: @@ -501,6 +499,8 @@ agents: source_port_id: 1 dest_port_id: 1 protocol_id: 1 + source_wildcard_id: 0 + dest_wildcard_id: 0 48: # old action num: 24 # block tcp traffic from client 1 to web app action: "ROUTER_ACL_ADDRULE" options: @@ -512,6 +512,8 @@ agents: source_port_id: 1 dest_port_id: 1 protocol_id: 3 + source_wildcard_id: 0 + dest_wildcard_id: 0 49: # old action num: 25 # block tcp traffic from client 2 to web app action: "ROUTER_ACL_ADDRULE" options: @@ -523,6 +525,8 @@ agents: source_port_id: 1 dest_port_id: 1 protocol_id: 3 + source_wildcard_id: 0 + dest_wildcard_id: 0 50: # old action num: 26 action: "ROUTER_ACL_ADDRULE" options: @@ -534,6 +538,8 @@ agents: source_port_id: 1 dest_port_id: 1 protocol_id: 3 + source_wildcard_id: 0 + dest_wildcard_id: 0 51: # old action num: 27 action: "ROUTER_ACL_ADDRULE" options: @@ -545,6 +551,8 @@ agents: source_port_id: 1 dest_port_id: 1 protocol_id: 3 + source_wildcard_id: 0 + dest_wildcard_id: 0 52: # old action num: 28 action: "ROUTER_ACL_REMOVERULE" options: @@ -703,23 +711,15 @@ agents: max_services_per_node: 2 max_nics_per_node: 8 max_acl_rules: 10 - ip_address_order: - - node_name: domain_controller - nic_num: 1 - - node_name: web_server - nic_num: 1 - - node_name: database_server - nic_num: 1 - - node_name: backup_server - nic_num: 1 - - node_name: security_suite - nic_num: 1 - - node_name: client_1 - nic_num: 1 - - node_name: client_2 - nic_num: 1 - - node_name: security_suite - nic_num: 2 + ip_list: + - 192.168.1.10 + - 192.168.1.12 + - 192.168.1.14 + - 192.168.1.16 + - 192.168.1.110 + - 192.168.10.21 + - 192.168.10.22 + - 192.168.10.110 reward_function: diff --git a/tests/assets/configs/test_application_install.yaml b/tests/assets/configs/test_application_install.yaml index 3323937e..d1fed272 100644 --- a/tests/assets/configs/test_application_install.yaml +++ b/tests/assets/configs/test_application_install.yaml @@ -493,6 +493,8 @@ agents: source_port_id: 1 dest_port_id: 1 protocol_id: 1 + source_wildcard_id: 0 + dest_wildcard_id: 0 47: # old action num: 23 # "ACL: ADDRULE - Block outgoing traffic from client 2" action: "ROUTER_ACL_ADDRULE" options: @@ -504,6 +506,8 @@ agents: source_port_id: 1 dest_port_id: 1 protocol_id: 1 + source_wildcard_id: 0 + dest_wildcard_id: 0 48: # old action num: 24 # block tcp traffic from client 1 to web app action: "ROUTER_ACL_ADDRULE" options: @@ -515,6 +519,8 @@ agents: source_port_id: 1 dest_port_id: 1 protocol_id: 3 + source_wildcard_id: 0 + dest_wildcard_id: 0 49: # old action num: 25 # block tcp traffic from client 2 to web app action: "ROUTER_ACL_ADDRULE" options: @@ -526,6 +532,8 @@ agents: source_port_id: 1 dest_port_id: 1 protocol_id: 3 + source_wildcard_id: 0 + dest_wildcard_id: 0 50: # old action num: 26 action: "ROUTER_ACL_ADDRULE" options: @@ -537,6 +545,8 @@ agents: source_port_id: 1 dest_port_id: 1 protocol_id: 3 + source_wildcard_id: 0 + dest_wildcard_id: 0 51: # old action num: 27 action: "ROUTER_ACL_ADDRULE" options: @@ -548,6 +558,8 @@ agents: source_port_id: 1 dest_port_id: 1 protocol_id: 3 + source_wildcard_id: 0 + dest_wildcard_id: 0 52: # old action num: 28 action: "ROUTER_ACL_REMOVERULE" options: @@ -729,23 +741,15 @@ agents: max_services_per_node: 2 max_nics_per_node: 8 max_acl_rules: 10 - ip_address_order: - - node_name: domain_controller - nic_num: 1 - - node_name: web_server - nic_num: 1 - - node_name: database_server - nic_num: 1 - - node_name: backup_server - nic_num: 1 - - node_name: security_suite - nic_num: 1 - - node_name: client_1 - nic_num: 1 - - node_name: client_2 - nic_num: 1 - - node_name: security_suite - nic_num: 2 + ip_list: + - 192.168.1.10 + - 192.168.1.12 + - 192.168.1.14 + - 192.168.1.16 + - 192.168.1.110 + - 192.168.10.21 + - 192.168.10.22 + - 192.168.10.110 reward_function: diff --git a/tests/assets/configs/test_primaite_session.yaml b/tests/assets/configs/test_primaite_session.yaml index 9284f1d1..490e99d4 100644 --- a/tests/assets/configs/test_primaite_session.yaml +++ b/tests/assets/configs/test_primaite_session.yaml @@ -327,6 +327,8 @@ agents: source_port_id: 1 dest_port_id: 1 protocol_id: 1 + source_wildcard_id: 0 + dest_wildcard_id: 0 23: # "ACL: ADDRULE - Block outgoing traffic from client 2" (not supported in Primaite) action: "ROUTER_ACL_ADDRULE" options: @@ -338,6 +340,8 @@ agents: source_port_id: 1 dest_port_id: 1 protocol_id: 1 + source_wildcard_id: 0 + dest_wildcard_id: 0 24: # block tcp traffic from client 1 to web app action: "ROUTER_ACL_ADDRULE" options: @@ -349,6 +353,8 @@ agents: source_port_id: 1 dest_port_id: 1 protocol_id: 3 + source_wildcard_id: 0 + dest_wildcard_id: 0 25: # block tcp traffic from client 2 to web app action: "ROUTER_ACL_ADDRULE" options: @@ -360,6 +366,8 @@ agents: source_port_id: 1 dest_port_id: 1 protocol_id: 3 + source_wildcard_id: 0 + dest_wildcard_id: 0 26: action: "ROUTER_ACL_ADDRULE" options: @@ -371,6 +379,8 @@ agents: source_port_id: 1 dest_port_id: 1 protocol_id: 3 + source_wildcard_id: 0 + dest_wildcard_id: 0 27: action: "ROUTER_ACL_ADDRULE" options: @@ -382,6 +392,8 @@ agents: source_port_id: 1 dest_port_id: 1 protocol_id: 3 + source_wildcard_id: 0 + dest_wildcard_id: 0 28: action: "ROUTER_ACL_REMOVERULE" options: @@ -528,23 +540,15 @@ agents: max_services_per_node: 2 max_nics_per_node: 8 max_acl_rules: 10 - ip_address_order: - - node_name: domain_controller - nic_num: 1 - - node_name: web_server - nic_num: 1 - - node_name: database_server - nic_num: 1 - - node_name: backup_server - nic_num: 1 - - node_name: security_suite - nic_num: 1 - - node_name: client_1 - nic_num: 1 - - node_name: client_2 - nic_num: 1 - - node_name: security_suite - nic_num: 2 + ip_list: + - 192.168.1.10 + - 192.168.1.12 + - 192.168.1.14 + - 192.168.1.16 + - 192.168.1.110 + - 192.168.10.21 + - 192.168.10.22 + - 192.168.10.110 reward_function: reward_components: diff --git a/tests/assets/configs/train_only_primaite_session.yaml b/tests/assets/configs/train_only_primaite_session.yaml index 7d1ac09f..3de2c80a 100644 --- a/tests/assets/configs/train_only_primaite_session.yaml +++ b/tests/assets/configs/train_only_primaite_session.yaml @@ -327,6 +327,8 @@ agents: source_port_id: 1 dest_port_id: 1 protocol_id: 1 + source_wildcard_id: 0 + dest_wildcard_id: 0 23: # "ACL: ADDRULE - Block outgoing traffic from client 2" (not supported in Primaite) action: "ROUTER_ACL_ADDRULE" options: @@ -338,6 +340,8 @@ agents: source_port_id: 1 dest_port_id: 1 protocol_id: 1 + source_wildcard_id: 0 + dest_wildcard_id: 0 24: # block tcp traffic from client 1 to web app action: "ROUTER_ACL_ADDRULE" options: @@ -349,6 +353,8 @@ agents: source_port_id: 1 dest_port_id: 1 protocol_id: 3 + source_wildcard_id: 0 + dest_wildcard_id: 0 25: # block tcp traffic from client 2 to web app action: "ROUTER_ACL_ADDRULE" options: @@ -360,6 +366,8 @@ agents: source_port_id: 1 dest_port_id: 1 protocol_id: 3 + source_wildcard_id: 0 + dest_wildcard_id: 0 26: action: "ROUTER_ACL_ADDRULE" options: @@ -371,6 +379,8 @@ agents: source_port_id: 1 dest_port_id: 1 protocol_id: 3 + source_wildcard_id: 0 + dest_wildcard_id: 0 27: action: "ROUTER_ACL_ADDRULE" options: @@ -382,6 +392,8 @@ agents: source_port_id: 1 dest_port_id: 1 protocol_id: 3 + source_wildcard_id: 0 + dest_wildcard_id: 0 28: action: "ROUTER_ACL_REMOVERULE" options: @@ -528,23 +540,15 @@ agents: max_services_per_node: 2 max_nics_per_node: 8 max_acl_rules: 10 - ip_address_order: - - node_name: domain_controller - nic_num: 1 - - node_name: web_server - nic_num: 1 - - node_name: database_server - nic_num: 1 - - node_name: backup_server - nic_num: 1 - - node_name: security_suite - nic_num: 1 - - node_name: client_1 - nic_num: 1 - - node_name: client_2 - nic_num: 1 - - node_name: security_suite - nic_num: 2 + ip_list: + - 192.168.1.10 + - 192.168.1.12 + - 192.168.1.14 + - 192.168.1.16 + - 192.168.1.110 + - 192.168.10.21 + - 192.168.10.22 + - 192.168.10.110 reward_function: reward_components: diff --git a/tests/conftest.py b/tests/conftest.py index f5b5cb1b..018dcb70 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -50,8 +50,8 @@ def set_syslog_output_to_true(): "path", Path(TEST_ASSETS_ROOT.parent.parent / "simulation_output" / datetime.now().strftime("%Y-%m-%d_%H-%M-%S")), ) - monkeypatch.setattr(SIM_OUTPUT, "save_pcap_logs", True) - monkeypatch.setattr(SIM_OUTPUT, "save_sys_logs", True) + monkeypatch.setattr(SIM_OUTPUT, "save_pcap_logs", False) + monkeypatch.setattr(SIM_OUTPUT, "save_sys_logs", False) yield @@ -529,7 +529,7 @@ def game_and_agent(): max_acl_rules=10, protocols=["TCP", "UDP", "ICMP"], ports=["HTTP", "DNS", "ARP"], - ip_address_list=["10.0.1.1", "10.0.1.2", "10.0.2.1", "10.0.2.2", "10.0.2.3"], + ip_list=["10.0.1.1", "10.0.1.2", "10.0.2.1", "10.0.2.2", "10.0.2.3"], act_map={}, ) observation_space = ObservationManager(NestedObservation(components={})) diff --git a/tests/integration_tests/game_layer/test_actions.py b/tests/integration_tests/game_layer/test_actions.py index 3ebce6ad..855bc38d 100644 --- a/tests/integration_tests/game_layer/test_actions.py +++ b/tests/integration_tests/game_layer/test_actions.py @@ -130,6 +130,8 @@ def test_router_acl_addrule_integration(game_and_agent: Tuple[PrimaiteGame, Prox "dest_port_id": 1, # ALL "source_port_id": 1, # ALL "protocol_id": 1, # ALL + "source_wildcard_id": 0, + "dest_wildcard_id": 0, }, ) agent.store_action(action) @@ -155,6 +157,8 @@ def test_router_acl_addrule_integration(game_and_agent: Tuple[PrimaiteGame, Prox "dest_port_id": 1, # ALL "source_port_id": 1, # ALL "protocol_id": 1, # ALL + "source_wildcard_id": 0, + "dest_wildcard_id": 0, }, ) agent.store_action(action) diff --git a/tests/integration_tests/network/test_capture_nmne.py b/tests/integration_tests/network/test_capture_nmne.py index 6601831f..1f9a35d9 100644 --- a/tests/integration_tests/network/test_capture_nmne.py +++ b/tests/integration_tests/network/test_capture_nmne.py @@ -22,10 +22,13 @@ def test_capture_nmne(uc2_network): web_server_nic = web_server.network_interface[1] db_server_nic = db_server.network_interface[1] - # Set the NMNE configuration to capture DELETE queries as MNEs + # Set the NMNE configuration to capture DELETE/ENCRYPT queries as MNEs nmne_config = { "capture_nmne": True, # Enable the capture of MNEs - "nmne_capture_keywords": ["DELETE"], # Specify "DELETE" SQL command as a keyword for MNE detection + "nmne_capture_keywords": [ + "DELETE", + "ENCRYPT", + ], # Specify "DELETE/ENCRYPT" SQL command as a keyword for MNE detection } # Apply the NMNE configuration settings @@ -63,6 +66,20 @@ def test_capture_nmne(uc2_network): assert web_server_nic.nmne == {"direction": {"outbound": {"keywords": {"*": 2}}}} assert db_server_nic.nmne == {"direction": {"inbound": {"keywords": {"*": 2}}}} + # Perform an "ENCRYPT" query + db_client.query("ENCRYPT") + + # Check that the web server and database server interfaces register an additional MNE + assert web_server_nic.nmne == {"direction": {"outbound": {"keywords": {"*": 3}}}} + assert db_server_nic.nmne == {"direction": {"inbound": {"keywords": {"*": 3}}}} + + # Perform another "SELECT" query + db_client.query("SELECT") + + # Check that no additional MNEs are captured + assert web_server_nic.nmne == {"direction": {"outbound": {"keywords": {"*": 3}}}} + assert db_server_nic.nmne == {"direction": {"inbound": {"keywords": {"*": 3}}}} + def test_describe_state_nmne(uc2_network): """ @@ -70,7 +87,7 @@ def test_describe_state_nmne(uc2_network): This test involves a web server querying a database server and checks if the MNEs are captured based on predefined keywords in the network configuration. Specifically, it checks the capture - of the "DELETE" SQL command as a malicious network event. It also checks that running describe_state + of the "DELETE" / "ENCRYPT" SQL commands as a malicious network event. It also checks that running describe_state only shows MNEs since the last time describe_state was called. """ web_server: Server = uc2_network.get_node_by_hostname("web_server") # noqa @@ -82,10 +99,13 @@ def test_describe_state_nmne(uc2_network): web_server_nic = web_server.network_interface[1] db_server_nic = db_server.network_interface[1] - # Set the NMNE configuration to capture DELETE queries as MNEs + # Set the NMNE configuration to capture DELETE/ENCRYPT queries as MNEs nmne_config = { "capture_nmne": True, # Enable the capture of MNEs - "nmne_capture_keywords": ["DELETE"], # Specify "DELETE" SQL command as a keyword for MNE detection + "nmne_capture_keywords": [ + "DELETE", + "ENCRYPT", + ], # "DELETE" & "ENCRYPT" SQL commands as a keywords for MNE detection } # Apply the NMNE configuration settings @@ -138,6 +158,36 @@ def test_describe_state_nmne(uc2_network): assert web_server_nic_state["nmne"] == {"direction": {"outbound": {"keywords": {"*": 2}}}} assert db_server_nic_state["nmne"] == {"direction": {"inbound": {"keywords": {"*": 2}}}} + # Perform a "ENCRYPT" query + db_client.query("ENCRYPT") + + # Check that the web server's outbound interface and the database server's inbound interface register the MNE + web_server_nic_state = web_server_nic.describe_state() + db_server_nic_state = db_server_nic.describe_state() + uc2_network.apply_timestep(timestep=0) + assert web_server_nic_state["nmne"] == {"direction": {"outbound": {"keywords": {"*": 3}}}} + assert db_server_nic_state["nmne"] == {"direction": {"inbound": {"keywords": {"*": 3}}}} + + # Perform another "SELECT" query + db_client.query("SELECT") + + # Check that no additional MNEs are captured + web_server_nic_state = web_server_nic.describe_state() + db_server_nic_state = db_server_nic.describe_state() + uc2_network.apply_timestep(timestep=0) + assert web_server_nic_state["nmne"] == {"direction": {"outbound": {"keywords": {"*": 3}}}} + assert db_server_nic_state["nmne"] == {"direction": {"inbound": {"keywords": {"*": 3}}}} + + # Perform another "ENCRYPT" + db_client.query("ENCRYPT") + + # Check that the web server and database server interfaces register an additional MNE + web_server_nic_state = web_server_nic.describe_state() + db_server_nic_state = db_server_nic.describe_state() + uc2_network.apply_timestep(timestep=0) + assert web_server_nic_state["nmne"] == {"direction": {"outbound": {"keywords": {"*": 4}}}} + assert db_server_nic_state["nmne"] == {"direction": {"inbound": {"keywords": {"*": 4}}}} + def test_capture_nmne_observations(uc2_network): """ @@ -146,7 +196,7 @@ def test_capture_nmne_observations(uc2_network): This test ensures the observation space, as defined by instances of NICObservation, accurately reflects the number of MNEs detected based on network activities over multiple iterations. - The test employs a series of "DELETE" SQL operations, considered as MNEs, to validate the dynamic update + The test employs a series of "DELETE" and "ENCRYPT" SQL operations, considered as MNEs, to validate the dynamic update and accuracy of the observation space related to network interface conditions. It confirms that the observed NIC states match expected MNE activity levels. """ @@ -158,10 +208,13 @@ def test_capture_nmne_observations(uc2_network): db_client: DatabaseClient = web_server.software_manager.software["DatabaseClient"] db_client.connect() - # Set the NMNE configuration to capture DELETE queries as MNEs + # Set the NMNE configuration to capture DELETE/ENCRYPT queries as MNEs nmne_config = { "capture_nmne": True, # Enable the capture of MNEs - "nmne_capture_keywords": ["DELETE"], # Specify "DELETE" SQL command as a keyword for MNE detection + "nmne_capture_keywords": [ + "DELETE", + "ENCRYPT", + ], # Specify "DELETE" & "ENCRYPT" SQL commands as a keywords for MNE detection } # Apply the NMNE configuration settings @@ -196,3 +249,28 @@ def test_capture_nmne_observations(uc2_network): assert web_nic_obs["outbound"] == expected_nmne assert db_nic_obs["inbound"] == expected_nmne uc2_network.apply_timestep(timestep=0) + + for i in range(0, 20): + # Perform a "ENCRYPT" query each iteration + for j in range(i): + db_client.query("ENCRYPT") + + # Observe the current state of NMNEs from the NICs of both the database and web servers + state = sim.describe_state() + db_nic_obs = db_server_nic_obs.observe(state)["NMNE"] + web_nic_obs = web_server_nic_obs.observe(state)["NMNE"] + + # Define expected NMNE values based on the iteration count + if i > 10: + expected_nmne = 3 # High level of detected MNEs after 10 iterations + elif i > 5: + expected_nmne = 2 # Moderate level after more than 5 iterations + elif i > 0: + expected_nmne = 1 # Low level detected after just starting + else: + expected_nmne = 0 # No MNEs detected + + # Assert that the observed NMNEs match the expected values for both NICs + assert web_nic_obs["outbound"] == expected_nmne + assert db_nic_obs["inbound"] == expected_nmne + uc2_network.apply_timestep(timestep=0) diff --git a/tests/integration_tests/network/test_routing.py b/tests/integration_tests/network/test_routing.py index 869b27be..267b9b53 100644 --- a/tests/integration_tests/network/test_routing.py +++ b/tests/integration_tests/network/test_routing.py @@ -152,6 +152,22 @@ def test_with_routes_can_ping(multi_hop_network): assert pc_a.ping(pc_b.network_interface[1].ip_address) +def test_with_default_routes_can_ping(multi_hop_network): + pc_a = multi_hop_network.get_node_by_hostname("pc_a") + pc_b = multi_hop_network.get_node_by_hostname("pc_b") + + router_1: Router = multi_hop_network.get_node_by_hostname("router_1") # noqa + router_2: Router = multi_hop_network.get_node_by_hostname("router_2") # noqa + + # Configure Route from Router 1 to PC B subnet + router_1.route_table.set_default_route_next_hop_ip_address("192.168.1.2") + + # Configure Route from Router 2 to PC A subnet + router_2.route_table.set_default_route_next_hop_ip_address("192.168.1.1") + + assert pc_a.ping(pc_b.network_interface[1].ip_address) + + def test_ping_router_port_multi_hop(multi_hop_network): pc_a = multi_hop_network.get_node_by_hostname("pc_a") router_2 = multi_hop_network.get_node_by_hostname("router_2") diff --git a/tests/integration_tests/system/red_applications/test_dos_bot_and_server.py b/tests/integration_tests/system/red_applications/test_dos_bot_and_server.py index e42862bf..8ed10da6 100644 --- a/tests/integration_tests/system/red_applications/test_dos_bot_and_server.py +++ b/tests/integration_tests/system/red_applications/test_dos_bot_and_server.py @@ -73,6 +73,7 @@ def dos_bot_db_server_green_client(example_network) -> Network: return network +@pytest.mark.xfail(reason="Tests fail due to recent changes in how DB connections are handled for example layout.") def test_repeating_dos_attack(dos_bot_and_db_server): dos_bot, computer, db_server_service, server = dos_bot_and_db_server @@ -104,6 +105,7 @@ def test_repeating_dos_attack(dos_bot_and_db_server): assert db_server_service.health_state_actual is SoftwareHealthState.OVERWHELMED +@pytest.mark.xfail(reason="Tests fail due to recent changes in how DB connections are handled for example layout.") def test_non_repeating_dos_attack(dos_bot_and_db_server): dos_bot, computer, db_server_service, server = dos_bot_and_db_server @@ -135,6 +137,7 @@ def test_non_repeating_dos_attack(dos_bot_and_db_server): assert db_server_service.health_state_actual is SoftwareHealthState.GOOD +@pytest.mark.xfail(reason="Tests fail due to recent changes in how DB connections are handled for example layout.") def test_dos_bot_database_service_connection(dos_bot_and_db_server): dos_bot, computer, db_server_service, server = dos_bot_and_db_server @@ -147,6 +150,7 @@ def test_dos_bot_database_service_connection(dos_bot_and_db_server): assert len(dos_bot.connections) == db_server_service.max_sessions +@pytest.mark.xfail(reason="Tests fail due to recent changes in how DB connections are handled for example layout.") def test_dos_blocks_green_agent_connection(dos_bot_db_server_green_client): network: Network = dos_bot_db_server_green_client diff --git a/tests/integration_tests/system/red_applications/test_ransomware_script.py b/tests/integration_tests/system/red_applications/test_ransomware_script.py new file mode 100644 index 00000000..72a444ff --- /dev/null +++ b/tests/integration_tests/system/red_applications/test_ransomware_script.py @@ -0,0 +1,163 @@ +from ipaddress import IPv4Address +from typing import Tuple + +import pytest + +from primaite.simulator.file_system.file_system_item_abc import FileSystemItemHealthStatus +from primaite.simulator.network.container import Network +from primaite.simulator.network.hardware.nodes.host.computer import Computer +from primaite.simulator.network.hardware.nodes.host.server import Server +from primaite.simulator.network.hardware.nodes.network.router import ACLAction, Router +from primaite.simulator.network.transmission.transport_layer import Port +from primaite.simulator.system.applications.application import ApplicationOperatingState +from primaite.simulator.system.applications.database_client import DatabaseClient +from primaite.simulator.system.applications.red_applications.ransomware_script import ( + RansomwareAttackStage, + RansomwareScript, +) +from primaite.simulator.system.services.database.database_service import DatabaseService +from primaite.simulator.system.software import SoftwareHealthState + + +@pytest.fixture(scope="function") +def ransomware_script_and_db_server(client_server) -> Tuple[RansomwareScript, Computer, DatabaseService, Server]: + computer, server = client_server + + # install db client on computer + computer.software_manager.install(DatabaseClient) + db_client: DatabaseClient = computer.software_manager.software.get("DatabaseClient") + db_client.run() + + # Install DoSBot on computer + computer.software_manager.install(RansomwareScript) + + ransomware_script_application: RansomwareScript = computer.software_manager.software.get("RansomwareScript") + ransomware_script_application.configure( + server_ip_address=IPv4Address(server.network_interface[1].ip_address), payload="ENCRYPT" + ) + + # Install DB Server service on server + server.software_manager.install(DatabaseService) + db_server_service: DatabaseService = server.software_manager.software.get("DatabaseService") + db_server_service.start() + + return ransomware_script_application, computer, db_server_service, server + + +@pytest.fixture(scope="function") +def ransomware_script_db_server_green_client(example_network) -> Network: + network: Network = example_network + + router_1: Router = example_network.get_node_by_hostname("router_1") + router_1.acl.add_rule( + action=ACLAction.PERMIT, src_port=Port.POSTGRES_SERVER, dst_port=Port.POSTGRES_SERVER, position=0 + ) + + client_1: Computer = network.get_node_by_hostname("client_1") + client_2: Computer = network.get_node_by_hostname("client_2") + server: Server = network.get_node_by_hostname("server_1") + + # install db client on client 1 + client_1.software_manager.install(DatabaseClient) + db_client: DatabaseClient = client_1.software_manager.software.get("DatabaseClient") + db_client.run() + + # install Ransomware Script bot on client 1 + client_1.software_manager.install(RansomwareScript) + + ransomware_script_application: RansomwareScript = client_1.software_manager.software.get("RansomwareScript") + ransomware_script_application.configure( + server_ip_address=IPv4Address(server.network_interface[1].ip_address), payload="ENCRYPT" + ) + + # install db server service on server + server.software_manager.install(DatabaseService) + db_server_service: DatabaseService = server.software_manager.software.get("DatabaseService") + db_server_service.start() + + # Install DB client (green) on client 2 + client_2.software_manager.install(DatabaseClient) + + database_client: DatabaseClient = client_2.software_manager.software.get("DatabaseClient") + database_client.configure(server_ip_address=IPv4Address(server.network_interface[1].ip_address)) + database_client.run() + + return network + + +def test_repeating_ransomware_script_attack(ransomware_script_and_db_server): + """Test a repeating data manipulation attack.""" + RansomwareScript, computer, db_server_service, server = ransomware_script_and_db_server + + assert db_server_service.health_state_actual is SoftwareHealthState.GOOD + assert computer.file_system.num_file_creations == 0 + + RansomwareScript.target_scan_p_of_success = 1 + RansomwareScript.c2_beacon_p_of_success = 1 + RansomwareScript.ransomware_encrypt_p_of_success = 1 + RansomwareScript.repeat = True + RansomwareScript.attack() + + assert RansomwareScript.attack_stage == RansomwareAttackStage.NOT_STARTED + assert db_server_service.db_file.health_status is FileSystemItemHealthStatus.COMPROMISED + assert computer.file_system.num_file_creations == 1 + + computer.apply_timestep(timestep=1) + server.apply_timestep(timestep=1) + + assert RansomwareScript.attack_stage == RansomwareAttackStage.NOT_STARTED + assert db_server_service.db_file.health_status is FileSystemItemHealthStatus.COMPROMISED + + +def test_repeating_ransomware_script_attack(ransomware_script_and_db_server): + """Test a repeating ransowmare script attack.""" + RansomwareScript, computer, db_server_service, server = ransomware_script_and_db_server + + assert db_server_service.health_state_actual is SoftwareHealthState.GOOD + + RansomwareScript.target_scan_p_of_success = 1 + RansomwareScript.c2_beacon_p_of_success = 1 + RansomwareScript.ransomware_encrypt_p_of_success = 1 + RansomwareScript.repeat = False + RansomwareScript.attack() + + assert RansomwareScript.attack_stage == RansomwareAttackStage.SUCCEEDED + assert db_server_service.db_file.health_status is FileSystemItemHealthStatus.CORRUPT + assert computer.file_system.num_file_creations == 1 + + computer.apply_timestep(timestep=1) + computer.pre_timestep(timestep=1) + server.apply_timestep(timestep=1) + server.pre_timestep(timestep=1) + + assert RansomwareScript.attack_stage == RansomwareAttackStage.SUCCEEDED + assert db_server_service.db_file.health_status is FileSystemItemHealthStatus.CORRUPT + assert computer.file_system.num_file_creations == 0 + + +def test_ransomware_disrupts_green_agent_connection(ransomware_script_db_server_green_client): + """Test to see show that the database service still operate""" + network: Network = ransomware_script_db_server_green_client + + client_1: Computer = network.get_node_by_hostname("client_1") + ransomware_script_application: RansomwareScript = client_1.software_manager.software.get("RansomwareScript") + + client_2: Computer = network.get_node_by_hostname("client_2") + green_db_client: DatabaseClient = client_2.software_manager.software.get("DatabaseClient") + + server: Server = network.get_node_by_hostname("server_1") + db_server_service: DatabaseService = server.software_manager.software.get("DatabaseService") + + assert db_server_service.db_file.health_status is FileSystemItemHealthStatus.GOOD + assert green_db_client.query("SELECT") + assert green_db_client.last_query_response.get("status_code") == 200 + + ransomware_script_application.target_scan_p_of_success = 1 + ransomware_script_application.ransomware_encrypt_p_of_success = 1 + ransomware_script_application.c2_beacon_p_of_success = 1 + ransomware_script_application.repeat = False + ransomware_script_application.attack() + + assert db_server_service.db_file.health_status is FileSystemItemHealthStatus.CORRUPT + assert green_db_client.query("SELECT") is True + assert green_db_client.last_query_response.get("status_code") == 200 diff --git a/tests/unit_tests/_primaite/_simulator/_file_system/test_file_system.py b/tests/unit_tests/_primaite/_simulator/_file_system/test_file_system.py index 05824834..9b2ecf45 100644 --- a/tests/unit_tests/_primaite/_simulator/_file_system/test_file_system.py +++ b/tests/unit_tests/_primaite/_simulator/_file_system/test_file_system.py @@ -21,6 +21,7 @@ def test_create_folder_and_file(file_system): assert file_system.get_folder("test_folder").get_file("test_file.txt") file_system.apply_timestep(0) + file_system.pre_timestep(0) # num file creations should reset assert file_system.num_file_creations == 0 @@ -38,6 +39,7 @@ def test_create_file_no_folder(file_system): assert file_system.get_folder("root").get_file("test_file.txt").size == 10 file_system.apply_timestep(0) + file_system.pre_timestep(0) # num file creations should reset assert file_system.num_file_creations == 0 @@ -59,6 +61,7 @@ def test_delete_file(file_system): assert len(file_system.get_folder("root").deleted_files) == 1 file_system.apply_timestep(0) + file_system.pre_timestep(0) # num file deletions should reset assert file_system.num_file_deletions == 0 @@ -174,6 +177,7 @@ def test_move_file(file_system): assert file_system.get_file("dst_folder", "test_file.txt").uuid == original_uuid file_system.apply_timestep(0) + file_system.pre_timestep(0) # num file creations and deletions should reset assert file_system.num_file_creations == 0 @@ -203,6 +207,7 @@ def test_copy_file(file_system): assert file_system.get_file("dst_folder", "test_file.txt").uuid != original_uuid file_system.apply_timestep(0) + file_system.pre_timestep(0) # num file creations should reset assert file_system.num_file_creations == 0 From e876bb5d41b40b623a8a6176e084d5215c493cfc Mon Sep 17 00:00:00 2001 From: Marek Wolan Date: Mon, 15 Apr 2024 11:59:17 +0100 Subject: [PATCH 103/124] #2459 update doc page --- docs/source/simulation.rst | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/source/simulation.rst b/docs/source/simulation.rst index 20e1182a..fe494453 100644 --- a/docs/source/simulation.rst +++ b/docs/source/simulation.rst @@ -26,7 +26,6 @@ Contents simulation_components/network/nodes/wireless_router simulation_components/network/nodes/firewall simulation_components/network/switch - simulation_components/network/radio simulation_components/network/network simulation_components/system/internal_frame_processing simulation_components/system/sys_log From 72283e61843bd557436c39fc0fa598be630f4ba1 Mon Sep 17 00:00:00 2001 From: Marek Wolan Date: Mon, 15 Apr 2024 12:40:50 +0100 Subject: [PATCH 104/124] #2459 Align whitespace and typing --- src/primaite/game/agent/rewards.py | 3 ++- src/primaite/game/game.py | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/primaite/game/agent/rewards.py b/src/primaite/game/agent/rewards.py index f3398631..726afaa4 100644 --- a/src/primaite/game/agent/rewards.py +++ b/src/primaite/game/agent/rewards.py @@ -26,7 +26,7 @@ the structure: ``` """ from abc import abstractmethod -from typing import Callable, Dict, List, Optional, Tuple, Type, TYPE_CHECKING +from typing import Callable, Dict, Iterable, List, Optional, Tuple, Type, TYPE_CHECKING from typing_extensions import Never @@ -37,6 +37,7 @@ if TYPE_CHECKING: from primaite.game.agent.interface import AgentActionHistoryItem _LOGGER = getLogger(__name__) +WhereType = Iterable[str | int] | None class AbstractReward: diff --git a/src/primaite/game/game.py b/src/primaite/game/game.py index 27fd452d..a1f9cb58 100644 --- a/src/primaite/game/game.py +++ b/src/primaite/game/game.py @@ -411,6 +411,7 @@ class PrimaiteGame: for link_cfg in links_cfg: node_a = net.get_node_by_hostname(link_cfg["endpoint_a_hostname"]) node_b = net.get_node_by_hostname(link_cfg["endpoint_b_hostname"]) + if isinstance(node_a, Switch): endpoint_a = node_a.network_interface[link_cfg["endpoint_a_port"]] else: @@ -460,6 +461,7 @@ class PrimaiteGame: reward_function=reward_function, settings=settings, ) + elif agent_type == "ProxyAgent": agent_settings = AgentSettings.from_config(agent_cfg.get("agent_settings")) new_agent = ProxyAgent( From 39ec55c7b69c7b6d688237fac802aeb572e2778a Mon Sep 17 00:00:00 2001 From: Marek Wolan Date: Mon, 15 Apr 2024 13:12:51 +0100 Subject: [PATCH 105/124] #2459 strip notebook outputs to appease pre-commit --- .../create-simulation_demo.ipynb | 3 +- .../network_simulator_demo.ipynb | 122 +++++++++--------- 2 files changed, 62 insertions(+), 63 deletions(-) diff --git a/src/primaite/simulator/_package_data/create-simulation_demo.ipynb b/src/primaite/simulator/_package_data/create-simulation_demo.ipynb index d9742b50..f403176a 100644 --- a/src/primaite/simulator/_package_data/create-simulation_demo.ipynb +++ b/src/primaite/simulator/_package_data/create-simulation_demo.ipynb @@ -258,8 +258,7 @@ "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.10.12" - }, - "orig_nbformat": 4 + } }, "nbformat": 4, "nbformat_minor": 2 diff --git a/src/primaite/simulator/_package_data/network_simulator_demo.ipynb b/src/primaite/simulator/_package_data/network_simulator_demo.ipynb index b537f54b..1da58409 100644 --- a/src/primaite/simulator/_package_data/network_simulator_demo.ipynb +++ b/src/primaite/simulator/_package_data/network_simulator_demo.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "03b2013a-b7d1-47ee-b08c-8dab83833720", + "id": "0", "metadata": {}, "source": [ "# PrimAITE Router Simulation Demo\n", @@ -12,7 +12,7 @@ }, { "cell_type": "raw", - "id": "c8bb5698-e746-4e90-9c2f-efe962acdfa0", + "id": "1", "metadata": {}, "source": [ " +------------+\n", @@ -48,7 +48,7 @@ }, { "cell_type": "markdown", - "id": "415d487c-6457-497d-85d6-99439b3541e7", + "id": "2", "metadata": {}, "source": [ "## The Network\n", @@ -60,7 +60,7 @@ { "cell_type": "code", "execution_count": null, - "id": "de57ac8c-5b28-4847-a759-2ceaf5593329", + "id": "3", "metadata": { "tags": [] }, @@ -72,7 +72,7 @@ { "cell_type": "code", "execution_count": null, - "id": "a1e2e4df-67c0-4584-ab27-47e2c7c7fcd2", + "id": "4", "metadata": { "tags": [] }, @@ -83,7 +83,7 @@ }, { "cell_type": "markdown", - "id": "fb052c56-e9ca-4093-9115-d0c440b5ff53", + "id": "5", "metadata": {}, "source": [ "Most of the Network components have a `.show()` function that prints a table of information about that object. We can view the Nodes and Links on the Network by calling `network.show()`." @@ -92,7 +92,7 @@ { "cell_type": "code", "execution_count": null, - "id": "cc199741-ef2e-47f5-b2f0-e20049ccf40f", + "id": "6", "metadata": { "tags": [] }, @@ -103,7 +103,7 @@ }, { "cell_type": "markdown", - "id": "76d2b7e9-280b-4741-a8b3-a84bed219fac", + "id": "7", "metadata": { "tags": [] }, @@ -115,7 +115,7 @@ }, { "cell_type": "markdown", - "id": "84113002-843e-4cab-b899-667b50f25f6b", + "id": "8", "metadata": {}, "source": [ "### Router Nodes\n", @@ -125,7 +125,7 @@ }, { "cell_type": "markdown", - "id": "bf63a178-eee5-4669-bf64-13aea7ecf6cb", + "id": "9", "metadata": {}, "source": [ "Calling `router.show()` displays the Ethernet interfaces on the Router. If you need a table in markdown format, pass `markdown=True`." @@ -134,7 +134,7 @@ { "cell_type": "code", "execution_count": null, - "id": "e76d1854-961e-438c-b40f-77fd9c3abe38", + "id": "10", "metadata": { "tags": [] }, @@ -145,7 +145,7 @@ }, { "cell_type": "markdown", - "id": "e000540c-687c-4254-870c-1d814603bdbf", + "id": "11", "metadata": {}, "source": [ "Calling `router.arp.show()` displays the Router ARP Cache." @@ -154,7 +154,7 @@ { "cell_type": "code", "execution_count": null, - "id": "92de8b42-92d7-4934-9c12-50bf724c9eb2", + "id": "12", "metadata": { "tags": [] }, @@ -165,7 +165,7 @@ }, { "cell_type": "markdown", - "id": "a9ff7ee8-9482-44de-9039-b684866bdc82", + "id": "13", "metadata": {}, "source": [ "Calling `router.acl.show()` displays the Access Control List." @@ -174,7 +174,7 @@ { "cell_type": "code", "execution_count": null, - "id": "5922282a-d22b-4e55-9176-f3f3654c849f", + "id": "14", "metadata": { "tags": [] }, @@ -185,7 +185,7 @@ }, { "cell_type": "markdown", - "id": "71c87884-f793-4c9f-b004-5b0df86cf585", + "id": "15", "metadata": {}, "source": [ "Calling `router.router_table.show()` displays the static routes the Router provides." @@ -194,7 +194,7 @@ { "cell_type": "code", "execution_count": null, - "id": "327203be-f475-4727-82a1-e992d3b70ed8", + "id": "16", "metadata": { "tags": [] }, @@ -205,7 +205,7 @@ }, { "cell_type": "markdown", - "id": "eef561a8-3d39-4c8b-bbc8-e8b10b8ed25f", + "id": "17", "metadata": {}, "source": [ "Calling `router.sys_log.show()` displays the Router system log. By default, only the last 10 log entries are displayed, this can be changed by passing `last_n=`." @@ -214,7 +214,7 @@ { "cell_type": "code", "execution_count": null, - "id": "3d0aa004-b10c-445f-aaab-340e0e716c74", + "id": "18", "metadata": { "tags": [] }, @@ -225,7 +225,7 @@ }, { "cell_type": "markdown", - "id": "25630c90-c54e-4b5d-8bf4-ad1b0722e126", + "id": "19", "metadata": {}, "source": [ "### Switch Nodes\n", @@ -235,7 +235,7 @@ }, { "cell_type": "markdown", - "id": "4879394d-2981-40de-a229-e19b09a34e6e", + "id": "20", "metadata": {}, "source": [ "Calling `switch.show()` displays the Switch orts on the Switch." @@ -244,7 +244,7 @@ { "cell_type": "code", "execution_count": null, - "id": "e7fd439b-5442-4e9d-9e7d-86dacb77f458", + "id": "21", "metadata": { "tags": [] }, @@ -255,7 +255,7 @@ }, { "cell_type": "markdown", - "id": "beb8dbd6-7250-4ac9-9fa2-d2a9c0e5fd19", + "id": "22", "metadata": { "tags": [] }, @@ -266,7 +266,7 @@ { "cell_type": "code", "execution_count": null, - "id": "d06e1310-4a77-4315-a59f-cb1b49ca2352", + "id": "23", "metadata": { "tags": [] }, @@ -277,7 +277,7 @@ }, { "cell_type": "markdown", - "id": "fda75ac3-8123-4234-8f36-86547891d8df", + "id": "24", "metadata": {}, "source": [ "Calling `switch.sys_log.show()` displays the Switch system log. By default, only the last 10 log entries are displayed, this can be changed by passing `last_n=`." @@ -286,7 +286,7 @@ { "cell_type": "code", "execution_count": null, - "id": "a0d984b7-a7c1-4bbd-aa5a-9d3caecb08dc", + "id": "25", "metadata": { "tags": [] }, @@ -297,7 +297,7 @@ }, { "cell_type": "markdown", - "id": "2f1d99ad-db4f-4baf-8a35-e1d95f269586", + "id": "26", "metadata": {}, "source": [ "### Computer/Server Nodes\n", @@ -307,7 +307,7 @@ }, { "cell_type": "markdown", - "id": "c9e2251a-1b47-46e5-840f-7fec3e39c5aa", + "id": "27", "metadata": { "tags": [] }, @@ -318,7 +318,7 @@ { "cell_type": "code", "execution_count": null, - "id": "656c37f6-b145-42af-9714-8d2886d0eff8", + "id": "28", "metadata": { "tags": [] }, @@ -329,7 +329,7 @@ }, { "cell_type": "markdown", - "id": "f1097a49-a3da-4d79-a06d-ae8af452918f", + "id": "29", "metadata": {}, "source": [ "Calling `computer.arp.show()` displays the Computer/Server ARP Cache." @@ -338,7 +338,7 @@ { "cell_type": "code", "execution_count": null, - "id": "66b267d6-2308-486a-b9aa-cb8d3bcf0753", + "id": "30", "metadata": { "tags": [] }, @@ -349,7 +349,7 @@ }, { "cell_type": "markdown", - "id": "0d1fcad8-5b1a-4d8b-a49f-aa54a95fcaf0", + "id": "31", "metadata": {}, "source": [ "Calling `switch.sys_log.show()` displays the Computer/Server system log. By default, only the last 10 log entries are displayed, this can be changed by passing `last_n=`." @@ -358,7 +358,7 @@ { "cell_type": "code", "execution_count": null, - "id": "1b5debe8-ef1b-445d-8fa9-6a45568f21f3", + "id": "32", "metadata": { "tags": [] }, @@ -369,7 +369,7 @@ }, { "cell_type": "markdown", - "id": "fcfa1773-798c-4ada-9318-c3ad928217da", + "id": "33", "metadata": {}, "source": [ "## Basic Network Comms Check\n", @@ -380,7 +380,7 @@ { "cell_type": "code", "execution_count": null, - "id": "495b7de4-b6ce-41a6-9114-f74752ab4491", + "id": "34", "metadata": { "tags": [] }, @@ -391,7 +391,7 @@ }, { "cell_type": "markdown", - "id": "3e13922a-217f-4f4e-99b6-57a07613cade", + "id": "35", "metadata": {}, "source": [ "We'll first ping client_1's default gateway." @@ -400,7 +400,7 @@ { "cell_type": "code", "execution_count": null, - "id": "a38abb71-994e-49e8-8f51-e9a550e95b99", + "id": "36", "metadata": { "tags": [] }, @@ -412,7 +412,7 @@ { "cell_type": "code", "execution_count": null, - "id": "8388e1e9-30e3-4534-8e5a-c6e9144149d2", + "id": "37", "metadata": { "tags": [] }, @@ -423,7 +423,7 @@ }, { "cell_type": "markdown", - "id": "02c76d5c-d954-49db-912d-cb9c52f46375", + "id": "38", "metadata": {}, "source": [ "Next, we'll ping the interface of the 192.168.1.0/24 Network on the Router (port 1)." @@ -432,7 +432,7 @@ { "cell_type": "code", "execution_count": null, - "id": "ff8e976a-c16b-470c-8923-325713a30d6c", + "id": "39", "metadata": { "tags": [] }, @@ -443,7 +443,7 @@ }, { "cell_type": "markdown", - "id": "80280404-a5ab-452f-8a02-771a0d7496b1", + "id": "40", "metadata": {}, "source": [ "And finally, we'll ping the web server." @@ -452,7 +452,7 @@ { "cell_type": "code", "execution_count": null, - "id": "c4163f8d-6a72-410c-9f5c-4f881b7de45e", + "id": "41", "metadata": { "tags": [] }, @@ -463,7 +463,7 @@ }, { "cell_type": "markdown", - "id": "1194c045-ba77-4427-be30-ed7b5b224850", + "id": "42", "metadata": {}, "source": [ "To confirm that the ping was received and processed by the web_server, we can view the sys log" @@ -472,7 +472,7 @@ { "cell_type": "code", "execution_count": null, - "id": "e79a523a-5780-45b6-8798-c434e0e522bd", + "id": "43", "metadata": { "tags": [] }, @@ -483,7 +483,7 @@ }, { "cell_type": "markdown", - "id": "5928f6dd-1006-45e3-99f3-8f311a875faa", + "id": "44", "metadata": {}, "source": [ "## Advanced Network Usage\n", @@ -493,7 +493,7 @@ }, { "cell_type": "markdown", - "id": "5e023ef3-7d18-4006-96ee-042a06a481fc", + "id": "45", "metadata": {}, "source": [ "Let's attempt to prevent client_2 from being able to ping the web server. First, we'll confirm that it can ping the server first..." @@ -502,7 +502,7 @@ { "cell_type": "code", "execution_count": null, - "id": "603cf913-e261-49da-a7dd-85e1bb6dec56", + "id": "46", "metadata": { "tags": [] }, @@ -513,7 +513,7 @@ }, { "cell_type": "markdown", - "id": "5cf962a4-20e6-44ae-9748-7fc5267ae111", + "id": "47", "metadata": {}, "source": [ "If we look at the client_2 sys log we can see that the four ICMP echo requests were sent and four ICMP each replies were received:" @@ -522,7 +522,7 @@ { "cell_type": "code", "execution_count": null, - "id": "e047de00-3de4-4823-b26a-2c8d64c7a663", + "id": "48", "metadata": { "tags": [] }, @@ -533,7 +533,7 @@ }, { "cell_type": "markdown", - "id": "bdc4741d-6e3e-4aec-a69c-c2e9653bd02c", + "id": "49", "metadata": {}, "source": [ "Now we'll add an ACL to block ICMP from 192.168.10.22" @@ -542,7 +542,7 @@ { "cell_type": "code", "execution_count": null, - "id": "6db355ae-b99a-441b-a2c4-4ffe78f46bff", + "id": "50", "metadata": { "tags": [] }, @@ -562,7 +562,7 @@ { "cell_type": "code", "execution_count": null, - "id": "a345e000-8842-4827-af96-adc0fbe390fb", + "id": "51", "metadata": { "tags": [] }, @@ -573,7 +573,7 @@ }, { "cell_type": "markdown", - "id": "3a5bfd9f-04cb-493e-a86c-cd268563a262", + "id": "52", "metadata": {}, "source": [ "Now we attempt (and fail) to ping the web server" @@ -582,7 +582,7 @@ { "cell_type": "code", "execution_count": null, - "id": "a4f4ff31-590f-40fb-b13d-efaa8c2720b6", + "id": "53", "metadata": { "tags": [] }, @@ -593,7 +593,7 @@ }, { "cell_type": "markdown", - "id": "83e56497-097b-45cb-964e-b15c72547b38", + "id": "54", "metadata": {}, "source": [ "We can check that the ping was actually sent by client_2 by viewing the sys log" @@ -602,7 +602,7 @@ { "cell_type": "code", "execution_count": null, - "id": "f62b8a4e-fd3b-4059-b108-3d4a0b18f2a0", + "id": "55", "metadata": { "tags": [] }, @@ -613,7 +613,7 @@ }, { "cell_type": "markdown", - "id": "c7040311-a879-4620-86a0-55d0774156e5", + "id": "56", "metadata": {}, "source": [ "We can check the router sys log to see why the traffic was blocked" @@ -622,7 +622,7 @@ { "cell_type": "code", "execution_count": null, - "id": "7e53d776-99da-4d2c-a2a7-bd7ce27bff4c", + "id": "57", "metadata": { "tags": [] }, @@ -633,7 +633,7 @@ }, { "cell_type": "markdown", - "id": "aba0bc7d-da57-477b-b34a-3688b5aab2c6", + "id": "58", "metadata": {}, "source": [ "Now a final check to ensure that client_1 can still ping the web_server." @@ -642,7 +642,7 @@ { "cell_type": "code", "execution_count": null, - "id": "d542734b-7582-4af7-8254-bda3de50d091", + "id": "59", "metadata": { "tags": [] }, @@ -654,7 +654,7 @@ { "cell_type": "code", "execution_count": null, - "id": "d78e9fe3-02c6-4792-944f-5622e26e0412", + "id": "60", "metadata": { "tags": [] }, From b797662b1d79203b9be14084873116f6814569ee Mon Sep 17 00:00:00 2001 From: Marek Wolan Date: Mon, 15 Apr 2024 14:15:58 +0100 Subject: [PATCH 106/124] bump version --- src/primaite/VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/primaite/VERSION b/src/primaite/VERSION index 1129dfd4..f08efbdc 100644 --- a/src/primaite/VERSION +++ b/src/primaite/VERSION @@ -1 +1 @@ -3.0.0b7 +3.0.0b9dev From f0ed9d2240126de3499170bc4010b960e7909cd5 Mon Sep 17 00:00:00 2001 From: Marek Wolan Date: Mon, 15 Apr 2024 14:16:09 +0100 Subject: [PATCH 107/124] re-enable multi platform builds --- .azure/azure-ci-build-pipeline.yaml | 40 ++++++++++++++--------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/.azure/azure-ci-build-pipeline.yaml b/.azure/azure-ci-build-pipeline.yaml index 9faaffaf..e9139d5b 100644 --- a/.azure/azure-ci-build-pipeline.yaml +++ b/.azure/azure-ci-build-pipeline.yaml @@ -24,26 +24,26 @@ parameters: img: 'ubuntu-latest' every_time: true publish_coverage: true - # - job_name: 'WindowsPython38' - # py: '3.8' - # img: 'windows-latest' - # every_time: false - # publish_coverage: false - # - job_name: 'WindowsPython310' - # py: '3.10' - # img: 'windows-latest' - # every_time: false - # publish_coverage: false - # - job_name: 'MacOSPython38' - # py: '3.8' - # img: 'macOS-latest' - # every_time: false - # publish_coverage: false - # - job_name: 'MacOSPython310' - # py: '3.10' - # img: 'macOS-latest' - # every_time: false - # publish_coverage: false + - job_name: 'WindowsPython38' + py: '3.8' + img: 'windows-latest' + every_time: false + publish_coverage: false + - job_name: 'WindowsPython310' + py: '3.10' + img: 'windows-latest' + every_time: false + publish_coverage: false + - job_name: 'MacOSPython38' + py: '3.8' + img: 'macOS-latest' + every_time: false + publish_coverage: false + - job_name: 'MacOSPython310' + py: '3.10' + img: 'macOS-latest' + every_time: false + publish_coverage: false stages: - stage: Test From 2d444f71c97b09b8de46fb43e28ea2029689b176 Mon Sep 17 00:00:00 2001 From: Marek Wolan Date: Tue, 16 Apr 2024 08:53:55 +0000 Subject: [PATCH 108/124] Updated VERSION --- src/primaite/VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/primaite/VERSION b/src/primaite/VERSION index 1129dfd4..6783f3bd 100644 --- a/src/primaite/VERSION +++ b/src/primaite/VERSION @@ -1 +1 @@ -3.0.0b7 +3.0.0b8 From 8d0d323e0bab94bc89e5f9b1a214a47a6a74075c Mon Sep 17 00:00:00 2001 From: Marek Wolan Date: Tue, 16 Apr 2024 11:26:17 +0100 Subject: [PATCH 109/124] #2374 Remove primaite session --- benchmark/primaite_benchmark.py | 4 + docs/source/config.rst | 6 +- docs/source/configuration/io_settings.rst | 30 - docs/source/configuration/training_config.rst | 75 -- docs/source/game_layer.rst | 9 - docs/source/primaite_session.rst | 41 - src/primaite/cli.py | 20 - .../_package_data/data_manipulation_marl.yaml | 14 - src/primaite/game/game.py | 4 +- src/primaite/main.py | 47 -- src/primaite/session/environment.py | 2 +- src/primaite/session/io.py | 1 + src/primaite/session/policy/__init__.py | 4 - src/primaite/session/policy/policy.py | 82 -- src/primaite/session/policy/rllib.py | 111 --- src/primaite/session/policy/sb3.py | 79 -- src/primaite/session/session.py | 119 --- src/primaite/simulator/network/airspace.py | 2 +- src/primaite/utils/session_metadata_parser.py | 4 + src/primaite/utils/session_output_reader.py | 4 + src/primaite/utils/session_output_writer.py | 4 + .../assets/configs/bad_primaite_session.yaml | 9 - .../configs/eval_only_primaite_session.yaml | 13 - .../configs/firewall_actions_network.yaml | 12 - tests/assets/configs/multi_agent_session.yaml | 101 +-- tests/assets/configs/shared_rewards.yaml | 12 - .../configs/test_application_install.yaml | 12 - .../assets/configs/test_primaite_session.yaml | 14 +- .../configs/train_only_primaite_session.yaml | 737 ------------------ tests/conftest.py | 33 - .../test_rllib_multi_agent_environment.py | 17 +- .../e2e_integration_tests/test_environment.py | 91 +++ .../test_primaite_session.py | 109 --- 33 files changed, 122 insertions(+), 1700 deletions(-) delete mode 100644 docs/source/configuration/training_config.rst delete mode 100644 docs/source/primaite_session.rst delete mode 100644 src/primaite/main.py delete mode 100644 src/primaite/session/policy/__init__.py delete mode 100644 src/primaite/session/policy/policy.py delete mode 100644 src/primaite/session/policy/rllib.py delete mode 100644 src/primaite/session/policy/sb3.py delete mode 100644 src/primaite/session/session.py delete mode 100644 tests/assets/configs/train_only_primaite_session.yaml create mode 100644 tests/e2e_integration_tests/test_environment.py delete mode 100644 tests/e2e_integration_tests/test_primaite_session.py diff --git a/benchmark/primaite_benchmark.py b/benchmark/primaite_benchmark.py index 9fec5711..226bb71e 100644 --- a/benchmark/primaite_benchmark.py +++ b/benchmark/primaite_benchmark.py @@ -1,3 +1,7 @@ +# flake8: noqa +raise DeprecationWarning( + "Benchmarking depends on deprecated functionality and it has not been updated to primaite v3 yet." +) # © Crown-owned copyright 2023, Defence Science and Technology Laboratory UK import json import platform diff --git a/docs/source/config.rst b/docs/source/config.rst index 89181a24..b334d99b 100644 --- a/docs/source/config.rst +++ b/docs/source/config.rst @@ -5,8 +5,7 @@ PrimAITE |VERSION| Configuration ******************************** -PrimAITE uses a single configuration file to define everything needed to train and evaluate an RL policy in a custom cybersecurity scenario. This includes the configuration of the network, the scripted or trained agents that interact with the network, as well as settings that define how to perform training in Stable Baselines 3 or Ray RLLib. -The entire config is used by the ``PrimaiteSession`` object for users who wish to let PrimAITE handle the agent definition and training. If you wish to define custom agents and control the training loop yourself, you can use the config with the ``PrimaiteGame``, and ``PrimaiteGymEnv`` objects instead. That way, only the network configuration and agent setup parts of the config are used, and the training section is ignored. +PrimAITE uses a single configuration file to define everything needed to create the training environment for RL agents, including the network, the scripted agents, and the RL agent's action space, observation space, and reward function. Example Configuration Hierarchy ############################### @@ -14,8 +13,6 @@ The top level configuration items in a configuration file is as follows .. code-block:: yaml - training_config: - ... io_settings: ... game: @@ -33,7 +30,6 @@ Configurable items .. toctree:: :maxdepth: 1 - configuration/training_config.rst configuration/io_settings.rst configuration/game.rst configuration/agents.rst diff --git a/docs/source/configuration/io_settings.rst b/docs/source/configuration/io_settings.rst index 979dbfae..67734751 100644 --- a/docs/source/configuration/io_settings.rst +++ b/docs/source/configuration/io_settings.rst @@ -13,42 +13,12 @@ This section configures how PrimAITE saves data during simulation and training. .. code-block:: yaml io_settings: - save_final_model: True - save_checkpoints: False - checkpoint_interval: 10 # save_logs: True - # save_transactions: False save_agent_actions: True save_step_metadata: False save_pcap_logs: False save_sys_logs: False -``save_final_model`` --------------------- - -Optional. Default value is ``True``. - -Only used if training with PrimaiteSession. -If ``True``, the policy will be saved after the final training iteration. - - -``save_checkpoints`` --------------------- - -Optional. Default value is ``False``. - -Only used if training with PrimaiteSession. -If ``True``, the policy will be saved periodically during training. - - -``checkpoint_interval`` ------------------------ - -Optional. Default value is ``10``. - -Only used if training with PrimaiteSession and if ``save_checkpoints`` is ``True``. -Defines how often to save the policy during training. - ``save_logs`` ------------- diff --git a/docs/source/configuration/training_config.rst b/docs/source/configuration/training_config.rst deleted file mode 100644 index 3e63f69b..00000000 --- a/docs/source/configuration/training_config.rst +++ /dev/null @@ -1,75 +0,0 @@ -.. only:: comment - - © Crown-owned copyright 2023, Defence Science and Technology Laboratory UK - -``training_config`` -=================== -Configuration items relevant to how the Reinforcement Learning agent(s) will be trained. - -``training_config`` hierarchy ------------------------------ - -.. code-block:: yaml - - training_config: - rl_framework: SB3 # or RLLIB_single_agent or RLLIB_multi_agent - rl_algorithm: PPO # or A2C - n_learn_episodes: 5 - max_steps_per_episode: 200 - n_eval_episodes: 1 - deterministic_eval: True - seed: 123 - - -``rl_framework`` ----------------- -The RL (Reinforcement Learning) Framework to use in the training session - -Options available are: - -- ``SB3`` (Stable Baselines 3) -- ``RLLIB_single_agent`` (Single Agent Ray RLLib) -- ``RLLIB_multi_agent`` (Multi Agent Ray RLLib) - -``rl_algorithm`` ----------------- -The Reinforcement Learning Algorithm to use in the training session - -Options available are: - -- ``PPO`` (Proximal Policy Optimisation) -- ``A2C`` (Advantage Actor Critic) - -``n_learn_episodes`` --------------------- -The number of episodes to train the agent(s). -This should be an integer value above ``0`` - -``max_steps_per_episode`` -------------------------- -The number of steps each episode will last for. -This should be an integer value above ``0``. - - -``n_eval_episodes`` -------------------- -Optional. Default value is ``0``. - -The number of evaluation episodes to run the trained agent for. -This should be an integer value above ``0``. - -``deterministic_eval`` ----------------------- -Optional. By default this value is ``False``. - -If this is set to ``True``, the agents will act deterministically instead of stochastically. - - - -``seed`` --------- -Optional. - -The seed is used (alongside ``deterministic_eval``) to reproduce a previous instance of training and evaluation of an RL agent. -The seed should be an integer value. -Useful for debugging. diff --git a/docs/source/game_layer.rst b/docs/source/game_layer.rst index af3eadc6..68984a1b 100644 --- a/docs/source/game_layer.rst +++ b/docs/source/game_layer.rst @@ -10,15 +10,6 @@ The simulator and game layer communicate using the PrimAITE State API and the Pr The game layer is responsible for managing agents and getting them to interface with the simulator correctly. It consists of several components: -PrimAITE Session -================ - -.. admonition:: Deprecated - :class: deprecated - - PrimAITE Session is being deprecated in favour of Jupyter Notebooks. The `session` command will be removed in future releases, but example notebooks will be provided to demonstrate the same functionality. - -``PrimaiteSession`` is the main entry point into Primaite and it allows the simultaneous coordination of a simulation and agents that interact with it. ``PrimaiteSession`` keeps track of multiple agents of different types. Agents ====== diff --git a/docs/source/primaite_session.rst b/docs/source/primaite_session.rst deleted file mode 100644 index d0caeaad..00000000 --- a/docs/source/primaite_session.rst +++ /dev/null @@ -1,41 +0,0 @@ -.. only:: comment - - © Crown-owned copyright 2023, Defence Science and Technology Laboratory UK - -.. _run a primaite session: - -.. admonition:: Deprecated - :class: deprecated - - PrimAITE Session is being deprecated in favour of Jupyter Notebooks. The ``session`` command will be removed in future releases, but example notebooks will be provided to demonstrate the same functionality. - -Run a PrimAITE Session -====================== - -``PrimaiteSession`` allows the user to train or evaluate an RL agent on the primaite simulation with just a config file, -no code required. It manages the lifecycle of a training or evaluation session, including the setup of the environment, -policy, simulator, agents, and IO. - -If you want finer control over the RL policy, you can interface with the :py:module::`primaite.session.environment` -module directly without running a session. - - - -Run ---- - -A PrimAITE session can be started either with the ``primaite session`` command from the cli -(See :func:`primaite.cli.session`), or by calling :func:`primaite.main.run` from a Python terminal or Jupyter Notebook. - -There are two parameters that can be specified: - - ``--config``: The path to the config file to use. If not specified, the default config file is used. - - ``--agent-load-file``: The path to the pre-trained agent to load. If not specified, a new agent is created. - -Outputs -------- - -Running a session creates a session output directory in your user data folder. The filepath looks like this: -``~/primaite/{VERSION}/sessions/YYYY-MM-DD/HH-MM-SS/``. This folder contains the simulation sys logs generated by each node, -the saved agent checkpoints, and final model. The folder also contains a .json file for each episode step that -contains the action, reward, and simulation state. These can be found in -``~/primaite/{VERSION}/sessions/YYYY-MM-DD/HH-MM-SS/simulation_output/episode_/step_metadata/step_.json`` diff --git a/src/primaite/cli.py b/src/primaite/cli.py index 18d21f7b..ca493493 100644 --- a/src/primaite/cli.py +++ b/src/primaite/cli.py @@ -114,23 +114,3 @@ def setup(overwrite_existing: bool = True) -> None: reset_example_configs.run(overwrite_existing=True) _LOGGER.info("PrimAITE setup complete!") - - -@app.command() -def session( - config: Optional[str] = None, - agent_load_file: Optional[str] = None, -) -> None: - """ - Run a PrimAITE session. - - :param config: The path to the config file. Optional, if None, the example config will be used. - :type config: Optional[str] - """ - from primaite.config.load import data_manipulation_config_path - from primaite.main import run - - if not config: - config = data_manipulation_config_path() - print(config) - run(config_path=config, agent_load_path=agent_load_file) diff --git a/src/primaite/config/_package_data/data_manipulation_marl.yaml b/src/primaite/config/_package_data/data_manipulation_marl.yaml index eaee132b..cb94a128 100644 --- a/src/primaite/config/_package_data/data_manipulation_marl.yaml +++ b/src/primaite/config/_package_data/data_manipulation_marl.yaml @@ -1,17 +1,3 @@ -training_config: - rl_framework: RLLIB_multi_agent - rl_algorithm: PPO - seed: 333 - n_learn_episodes: 1 - n_eval_episodes: 5 - max_steps_per_episode: 128 - deterministic_eval: false - n_agents: 2 - agent_references: - - defender_1 - - defender_2 - - io_settings: save_agent_actions: true save_step_metadata: false diff --git a/src/primaite/game/game.py b/src/primaite/game/game.py index a1f9cb58..908b5148 100644 --- a/src/primaite/game/game.py +++ b/src/primaite/game/game.py @@ -210,8 +210,8 @@ class PrimaiteGame: """Create a PrimaiteGame object from a config dictionary. The config dictionary should have the following top-level keys: - 1. training_config: options for training the RL agent. - 2. game_config: options for the game itself. Used by PrimaiteGame. + 1. io_settings: options for logging data during training + 2. game_config: options for the game itself, such as agents. 3. simulation: defines the network topology and the initial state of the simulation. The specification for each of the three major areas is described in a separate documentation page. diff --git a/src/primaite/main.py b/src/primaite/main.py deleted file mode 100644 index 053ed65b..00000000 --- a/src/primaite/main.py +++ /dev/null @@ -1,47 +0,0 @@ -# © Crown-owned copyright 2023, Defence Science and Technology Laboratory UK -"""The main PrimAITE session runner module.""" -import argparse -from pathlib import Path -from typing import Optional, Union - -from primaite import getLogger -from primaite.config.load import data_manipulation_config_path, load -from primaite.session.session import PrimaiteSession - -# from primaite.primaite_session import PrimaiteSession - -_LOGGER = getLogger(__name__) - - -def run( - config_path: Optional[Union[str, Path]] = "", - agent_load_path: Optional[Union[str, Path]] = None, -) -> None: - """ - Run the PrimAITE Session. - - :param training_config_path: YAML file containing configurable items defined in - `primaite.config.training_config.TrainingConfig` - :type training_config_path: Union[path, str] - :param lay_down_config_path: YAML file containing configurable items for generating network laydown. - :type lay_down_config_path: Union[path, str] - :param session_path: directory path of the session to load - :param legacy_training_config: True if the training config file is a legacy file from PrimAITE < 2.0, - otherwise False. - :param legacy_lay_down_config: True if the lay_down config file is a legacy file from PrimAITE < 2.0, - otherwise False. - """ - cfg = load(config_path) - sess = PrimaiteSession.from_config(cfg=cfg, agent_load_path=agent_load_path) - sess.start_session() - - -if __name__ == "__main__": - parser = argparse.ArgumentParser() - parser.add_argument("--config") - - args = parser.parse_args() - if not args.config: - args.config = data_manipulation_config_path() - - run(args.config) diff --git a/src/primaite/session/environment.py b/src/primaite/session/environment.py index cb891cd7..9311e1f7 100644 --- a/src/primaite/session/environment.py +++ b/src/primaite/session/environment.py @@ -48,7 +48,7 @@ class PrimaiteGymEnv(gymnasium.Env): def step(self, action: ActType) -> Tuple[ObsType, SupportsFloat, bool, bool, Dict[str, Any]]: """Perform a step in the environment.""" - # make ProxyAgent store the action chosen my the RL policy + # make ProxyAgent store the action chosen by the RL policy step = self.game.step_counter self.agent.store_action(action) # apply_agent_actions accesses the action we just stored diff --git a/src/primaite/session/io.py b/src/primaite/session/io.py index 69cea614..0b22f784 100644 --- a/src/primaite/session/io.py +++ b/src/primaite/session/io.py @@ -95,6 +95,7 @@ class PrimaiteIO: @classmethod def from_config(cls, config: Dict) -> "PrimaiteIO": """Create an instance of PrimaiteIO based on a configuration dict.""" + config = config or {} new = cls(settings=cls.Settings(**config)) return new diff --git a/src/primaite/session/policy/__init__.py b/src/primaite/session/policy/__init__.py deleted file mode 100644 index 811c7a54..00000000 --- a/src/primaite/session/policy/__init__.py +++ /dev/null @@ -1,4 +0,0 @@ -from primaite.session.policy.rllib import RaySingleAgentPolicy -from primaite.session.policy.sb3 import SB3Policy - -__all__ = ["SB3Policy", "RaySingleAgentPolicy"] diff --git a/src/primaite/session/policy/policy.py b/src/primaite/session/policy/policy.py deleted file mode 100644 index 984466d1..00000000 --- a/src/primaite/session/policy/policy.py +++ /dev/null @@ -1,82 +0,0 @@ -"""Base class and common logic for RL policies.""" -from abc import ABC, abstractmethod -from pathlib import Path -from typing import Any, Dict, Type, TYPE_CHECKING - -if TYPE_CHECKING: - from primaite.session.session import PrimaiteSession, TrainingOptions - - -class PolicyABC(ABC): - """Base class for reinforcement learning agents.""" - - _registry: Dict[str, Type["PolicyABC"]] = {} - """ - Registry of policy types, keyed by name. - - Automatically populated when PolicyABC subclasses are defined. Used for defining from_config. - """ - - def __init_subclass__(cls, identifier: str, **kwargs: Any) -> None: - """ - Register a policy subclass. - - :param name: Identifier used by from_config to create an instance of the policy. - :type name: str - :raises ValueError: When attempting to create a policy with a duplicate name. - """ - super().__init_subclass__(**kwargs) - if identifier in cls._registry: - raise ValueError(f"Duplicate policy name {identifier}") - cls._registry[identifier] = cls - return - - @abstractmethod - def __init__(self, session: "PrimaiteSession") -> None: - """ - Initialize a reinforcement learning policy. - - :param session: The session context. - :type session: PrimaiteSession - :param agents: The agents to train. - :type agents: List[RLAgent] - """ - self.session: "PrimaiteSession" = session - """Reference to the session.""" - - @abstractmethod - def learn(self, n_episodes: int, timesteps_per_episode: int) -> None: - """Train the agent.""" - pass - - @abstractmethod - def eval(self, n_episodes: int, timesteps_per_episode: int, deterministic: bool) -> None: - """Evaluate the agent.""" - pass - - @abstractmethod - def save(self, save_path: Path) -> None: - """Save the agent.""" - pass - - @abstractmethod - def load(self) -> None: - """Load agent from a file.""" - pass - - def close(self) -> None: - """Close the agent.""" - pass - - @classmethod - def from_config(cls, config: "TrainingOptions", session: "PrimaiteSession") -> "PolicyABC": - """ - Create an RL policy from a config by calling the relevant subclass's from_config method. - - Subclasses should not call super().from_config(), they should just handle creation form config. - """ - # Assume that basically the contents of training_config are passed into here. - # I should really define a config schema class using pydantic. - - PolicyType = cls._registry[config.rl_framework] - return PolicyType.from_config(config=config, session=session) diff --git a/src/primaite/session/policy/rllib.py b/src/primaite/session/policy/rllib.py deleted file mode 100644 index ca69a2a8..00000000 --- a/src/primaite/session/policy/rllib.py +++ /dev/null @@ -1,111 +0,0 @@ -from pathlib import Path -from typing import Literal, Optional, TYPE_CHECKING - -from primaite.session.environment import PrimaiteRayEnv, PrimaiteRayMARLEnv -from primaite.session.policy.policy import PolicyABC - -if TYPE_CHECKING: - from primaite.session.session import PrimaiteSession, TrainingOptions - -import ray -from ray import air, tune -from ray.rllib.algorithms import ppo -from ray.rllib.algorithms.ppo import PPOConfig - -from primaite import getLogger - -_LOGGER = getLogger(__name__) - - -class RaySingleAgentPolicy(PolicyABC, identifier="RLLIB_single_agent"): - """Single agent RL policy using Ray RLLib.""" - - def __init__(self, session: "PrimaiteSession", algorithm: Literal["PPO", "A2C"], seed: Optional[int] = None): - super().__init__(session=session) - - self.config = { - "env": PrimaiteRayEnv, - "env_config": {"game": session.game}, - "disable_env_checking": True, - "num_rollout_workers": 0, - } - - ray.shutdown() - ray.init() - - def learn(self, n_episodes: int, timesteps_per_episode: int) -> None: - """Train the agent.""" - self.config["training_iterations"] = n_episodes * timesteps_per_episode - self.config["train_batch_size"] = 128 - self._algo = ppo.PPO(config=self.config) - _LOGGER.info("Starting RLLIB training session") - self._algo.train() - - def eval(self, n_episodes: int, deterministic: bool) -> None: - """Evaluate the agent.""" - for ep in range(n_episodes): - obs, info = self.session.env.reset() - for step in range(self.session.game.options.max_episode_length): - action = self._algo.compute_single_action(observation=obs, explore=False) - obs, rew, term, trunc, info = self.session.env.step(action) - - def save(self, save_path: Path) -> None: - """Save the policy to a file.""" - self._algo.save(save_path) - - def load(self, model_path: Path) -> None: - """Load policy parameters from a file.""" - raise NotImplementedError - - @classmethod - def from_config(cls, config: "TrainingOptions", session: "PrimaiteSession") -> "RaySingleAgentPolicy": - """Create a policy from a config.""" - return cls(session=session, algorithm=config.rl_algorithm, seed=config.seed) - - -class RayMultiAgentPolicy(PolicyABC, identifier="RLLIB_multi_agent"): - """Mutli agent RL policy using Ray RLLib.""" - - def __init__(self, session: "PrimaiteSession", algorithm: Literal["PPO"], seed: Optional[int] = None): - """Initialise multi agent policy wrapper.""" - super().__init__(session=session) - - self.config = ( - PPOConfig() - .environment(env=PrimaiteRayMARLEnv, env_config={"game": session.game}) - .rollouts(num_rollout_workers=0) - .multi_agent( - policies={agent.agent_name for agent in session.game.rl_agents}, - policy_mapping_fn=lambda agent_id, episode, worker, **kw: agent_id, - ) - .training(train_batch_size=128) - ) - - def learn(self, n_episodes: int, timesteps_per_episode: int) -> None: - """Train the agent.""" - checkpoint_freq = self.session.io_manager.settings.checkpoint_interval - tune.Tuner( - "PPO", - run_config=air.RunConfig( - stop={"training_iteration": n_episodes * timesteps_per_episode}, - checkpoint_config=air.CheckpointConfig(checkpoint_frequency=checkpoint_freq), - ), - param_space=self.config, - ).fit() - - def load(self, model_path: Path) -> None: - """Load policy parameters from a file.""" - return NotImplemented - - def eval(self, n_episodes: int, deterministic: bool) -> None: - """Evaluate trained policy.""" - return NotImplemented - - def save(self, save_path: Path) -> None: - """Save policy parameters to a file.""" - return NotImplemented - - @classmethod - def from_config(cls, config: "TrainingOptions", session: "PrimaiteSession") -> "RayMultiAgentPolicy": - """Create policy from config.""" - return cls(session=session, algorithm=config.rl_algorithm, seed=config.seed) diff --git a/src/primaite/session/policy/sb3.py b/src/primaite/session/policy/sb3.py deleted file mode 100644 index 6220371d..00000000 --- a/src/primaite/session/policy/sb3.py +++ /dev/null @@ -1,79 +0,0 @@ -"""Stable baselines 3 policy.""" -from pathlib import Path -from typing import Literal, Optional, Type, TYPE_CHECKING, Union - -from stable_baselines3 import A2C, PPO -from stable_baselines3.a2c import MlpPolicy as A2C_MLP -from stable_baselines3.common.callbacks import CheckpointCallback -from stable_baselines3.common.evaluation import evaluate_policy -from stable_baselines3.ppo import MlpPolicy as PPO_MLP - -from primaite.session.policy.policy import PolicyABC - -if TYPE_CHECKING: - from primaite.session.session import PrimaiteSession, TrainingOptions - - -class SB3Policy(PolicyABC, identifier="SB3"): - """Single agent RL policy using stable baselines 3.""" - - def __init__(self, session: "PrimaiteSession", algorithm: Literal["PPO", "A2C"], seed: Optional[int] = None): - """Initialize a stable baselines 3 policy.""" - super().__init__(session=session) - - self._agent_class: Type[Union[PPO, A2C]] - if algorithm == "PPO": - self._agent_class = PPO - policy = PPO_MLP - elif algorithm == "A2C": - self._agent_class = A2C - policy = A2C_MLP - else: - raise ValueError(f"Unknown algorithm `{algorithm}` for stable_baselines3 policy") - self._agent = self._agent_class( - policy=policy, - env=self.session.env, - n_steps=128, # this is not the number of steps in an episode, but the number of steps in a batch - seed=seed, - ) - - def learn(self, n_episodes: int, timesteps_per_episode: int) -> None: - """Train the agent.""" - if self.session.save_checkpoints: - checkpoint_callback = CheckpointCallback( - save_freq=timesteps_per_episode * self.session.checkpoint_interval, - save_path=self.session.io_manager.generate_model_save_path("sb3"), - name_prefix="sb3_model", - ) - else: - checkpoint_callback = None - self._agent.learn(total_timesteps=n_episodes * timesteps_per_episode, callback=checkpoint_callback) - - def eval(self, n_episodes: int, deterministic: bool) -> None: - """Evaluate the agent.""" - _ = evaluate_policy( - self._agent, - self.session.env, - n_eval_episodes=n_episodes, - deterministic=deterministic, - return_episode_rewards=True, - ) - - def save(self, save_path: Path) -> None: - """ - Save the current policy parameters. - - Warning: The recommended way to save model checkpoints is to use a callback within the `learn()` method. Please - refer to https://stable-baselines3.readthedocs.io/en/master/guide/callbacks.html for more information. - Therefore, this method is only used to save the final model. - """ - self._agent.save(save_path) - - def load(self, model_path: Path) -> None: - """Load agent from a checkpoint.""" - self._agent = self._agent_class.load(model_path, env=self.session.env) - - @classmethod - def from_config(cls, config: "TrainingOptions", session: "PrimaiteSession") -> "SB3Policy": - """Create an agent from config file.""" - return cls(session=session, algorithm=config.rl_algorithm, seed=config.seed) diff --git a/src/primaite/session/session.py b/src/primaite/session/session.py deleted file mode 100644 index 9c935ae3..00000000 --- a/src/primaite/session/session.py +++ /dev/null @@ -1,119 +0,0 @@ -# raise DeprecationWarning("This module is deprecated") -from enum import Enum -from pathlib import Path -from typing import Dict, List, Literal, Optional, Union - -from pydantic import BaseModel, ConfigDict - -from primaite.session.environment import PrimaiteGymEnv, PrimaiteRayEnv, PrimaiteRayMARLEnv -from primaite.session.io import PrimaiteIO - -# from primaite.game.game import PrimaiteGame -from primaite.session.policy.policy import PolicyABC - - -class TrainingOptions(BaseModel): - """Options for training the RL agent.""" - - model_config = ConfigDict(extra="forbid") - - rl_framework: Literal["SB3", "RLLIB_single_agent", "RLLIB_multi_agent"] - rl_algorithm: Literal["PPO", "A2C"] - n_learn_episodes: int - n_eval_episodes: Optional[int] = None - max_steps_per_episode: int - # checkpoint_freq: Optional[int] = None - deterministic_eval: bool - seed: Optional[int] - n_agents: int - agent_references: List[str] - - -class SessionMode(Enum): - """Helper to keep track of the current session mode.""" - - TRAIN = "train" - EVAL = "eval" - MANUAL = "manual" - - -class PrimaiteSession: - """The main entrypoint for PrimAITE sessions, this manages a simulation, policy training, and environments.""" - - def __init__(self, game_cfg: Dict): - """Initialise PrimaiteSession object.""" - self.training_options: TrainingOptions - """Options specific to agent training.""" - - self.mode: SessionMode = SessionMode.MANUAL - """Current session mode.""" - - self.env: Union[PrimaiteGymEnv, PrimaiteRayEnv, PrimaiteRayMARLEnv] - """The environment that the RL algorithm can consume.""" - - self.policy: PolicyABC - """The reinforcement learning policy.""" - - self.io_manager: Optional["PrimaiteIO"] = None - """IO manager for the session.""" - - self.game_cfg: Dict = game_cfg - """Primaite Game object for managing main simulation loop and agents.""" - - self.save_checkpoints: bool = False - """Whether to save checkpoints.""" - - self.checkpoint_interval: int = 10 - """If save_checkpoints is true, checkpoints will be saved every checkpoint_interval episodes.""" - - def start_session(self) -> None: - """Commence the training/eval session.""" - print("Starting Primaite Session") - self.mode = SessionMode.TRAIN - n_learn_episodes = self.training_options.n_learn_episodes - n_eval_episodes = self.training_options.n_eval_episodes - max_steps_per_episode = self.training_options.max_steps_per_episode - - deterministic_eval = self.training_options.deterministic_eval - self.policy.learn( - n_episodes=n_learn_episodes, - timesteps_per_episode=max_steps_per_episode, - ) - self.save_models() - - self.mode = SessionMode.EVAL - if n_eval_episodes > 0: - self.policy.eval(n_episodes=n_eval_episodes, deterministic=deterministic_eval) - - self.mode = SessionMode.MANUAL - - def save_models(self) -> None: - """Save the RL models.""" - save_path = self.io_manager.generate_model_save_path("temp_model_name") - self.policy.save(save_path) - - @classmethod - def from_config(cls, cfg: Dict, agent_load_path: Optional[str] = None) -> "PrimaiteSession": - """Create a PrimaiteSession object from a config dictionary.""" - # READ IO SETTINGS (this sets the global session path as well) # TODO: GLOBAL SIDE EFFECTS... - io_manager = PrimaiteIO.from_config(cfg.get("io_settings", {})) - - sess = cls(game_cfg=cfg) - sess.io_manager = io_manager - sess.training_options = TrainingOptions(**cfg["training_config"]) - sess.save_checkpoints = cfg.get("io_settings", {}).get("save_checkpoints") - sess.checkpoint_interval = cfg.get("io_settings", {}).get("checkpoint_interval") - - # CREATE ENVIRONMENT - if sess.training_options.rl_framework == "RLLIB_single_agent": - sess.env = PrimaiteRayEnv(env_config=cfg) - elif sess.training_options.rl_framework == "RLLIB_multi_agent": - sess.env = PrimaiteRayMARLEnv(env_config=cfg) - elif sess.training_options.rl_framework == "SB3": - sess.env = PrimaiteGymEnv(game_config=cfg) - - sess.policy = PolicyABC.from_config(sess.training_options, session=sess) - if agent_load_path: - sess.policy.load(Path(agent_load_path)) - - return sess diff --git a/src/primaite/simulator/network/airspace.py b/src/primaite/simulator/network/airspace.py index a8343675..abda587e 100644 --- a/src/primaite/simulator/network/airspace.py +++ b/src/primaite/simulator/network/airspace.py @@ -271,7 +271,7 @@ class IPWirelessNetworkInterface(WirelessNetworkInterface, Layer3Interface, ABC) # Update the state with information from Layer3Interface state.update(Layer3Interface.describe_state(self)) - state["frequency"] = self.frequency + state["frequency"] = self.frequency.value return state diff --git a/src/primaite/utils/session_metadata_parser.py b/src/primaite/utils/session_metadata_parser.py index 2548a8b6..083d55ba 100644 --- a/src/primaite/utils/session_metadata_parser.py +++ b/src/primaite/utils/session_metadata_parser.py @@ -1,3 +1,7 @@ +# flake8: noqa +raise DeprecationWarning( + "Benchmarking depends on deprecated functionality and it has not been updated to primaite v3 yet." +) # © Crown-owned copyright 2023, Defence Science and Technology Laboratory UK import json from pathlib import Path diff --git a/src/primaite/utils/session_output_reader.py b/src/primaite/utils/session_output_reader.py index 30febff1..322b3b8d 100644 --- a/src/primaite/utils/session_output_reader.py +++ b/src/primaite/utils/session_output_reader.py @@ -1,3 +1,7 @@ +# flake8: noqa +raise DeprecationWarning( + "Benchmarking depends on deprecated functionality and it has not been updated to primaite v3 yet." +) # © Crown-owned copyright 2023, Defence Science and Technology Laboratory UK from pathlib import Path from typing import Any, Dict, Tuple, Union diff --git a/src/primaite/utils/session_output_writer.py b/src/primaite/utils/session_output_writer.py index 0eb18038..9253147a 100644 --- a/src/primaite/utils/session_output_writer.py +++ b/src/primaite/utils/session_output_writer.py @@ -1,3 +1,7 @@ +# flake8: noqa +raise DeprecationWarning( + "Benchmarking depends on deprecated functionality and it has not been updated to primaite v3 yet." +) # © Crown-owned copyright 2023, Defence Science and Technology Laboratory UK import csv from logging import Logger diff --git a/tests/assets/configs/bad_primaite_session.yaml b/tests/assets/configs/bad_primaite_session.yaml index 18b86bf3..231c69ab 100644 --- a/tests/assets/configs/bad_primaite_session.yaml +++ b/tests/assets/configs/bad_primaite_session.yaml @@ -1,12 +1,3 @@ -training_config: - rl_framework: SB3 - rl_algorithm: PPO - se3ed: 333 # Purposeful typo to check that error is raised with bad configuration. - n_learn_steps: 2560 - n_eval_episodes: 5 - - - game: ports: - ARP diff --git a/tests/assets/configs/eval_only_primaite_session.yaml b/tests/assets/configs/eval_only_primaite_session.yaml index eab0720a..4cf0e68c 100644 --- a/tests/assets/configs/eval_only_primaite_session.yaml +++ b/tests/assets/configs/eval_only_primaite_session.yaml @@ -1,16 +1,3 @@ -training_config: - rl_framework: SB3 - rl_algorithm: PPO - seed: 333 - n_learn_episodes: 0 - n_eval_episodes: 5 - max_steps_per_episode: 128 - deterministic_eval: false - n_agents: 1 - agent_references: - - defender - - game: ports: - ARP diff --git a/tests/assets/configs/firewall_actions_network.yaml b/tests/assets/configs/firewall_actions_network.yaml index fdf29599..fd5b1bf8 100644 --- a/tests/assets/configs/firewall_actions_network.yaml +++ b/tests/assets/configs/firewall_actions_network.yaml @@ -30,18 +30,6 @@ # | external_computer |------| switch_3 |------| external_server | # ----------------------- -------------- --------------------- # -training_config: - rl_framework: SB3 - rl_algorithm: PPO - seed: 333 - n_learn_episodes: 1 - n_eval_episodes: 5 - max_steps_per_episode: 128 - deterministic_eval: false - n_agents: 1 - agent_references: - - defender - io_settings: save_step_metadata: false save_pcap_logs: true diff --git a/tests/assets/configs/multi_agent_session.yaml b/tests/assets/configs/multi_agent_session.yaml index 0b0685c0..0c89bef4 100644 --- a/tests/assets/configs/multi_agent_session.yaml +++ b/tests/assets/configs/multi_agent_session.yaml @@ -1,21 +1,3 @@ -training_config: - rl_framework: RLLIB_multi_agent - rl_algorithm: PPO - seed: 333 - n_learn_episodes: 2 - n_eval_episodes: 1 - max_steps_per_episode: 128 - deterministic_eval: false - n_agents: 1 - agent_references: #not used :( - - defender1 - - defender2 - -io_settings: - save_checkpoints: true - checkpoint_interval: 5 - - game: max_episode_length: 128 ports: @@ -31,11 +13,12 @@ game: agents: - ref: client_2_green_user team: GREEN - type: ProbabilisticAgent + type: PeriodicAgent observation_space: null action_space: action_list: - type: DONOTHING + - type: NODE_APPLICATION_EXECUTE options: nodes: @@ -901,86 +884,6 @@ agents: options: target_router_nodename: router_1 position: 9 - 38: - action: "HOST_NIC_DISABLE" - options: - node_id: 0 - nic_id: 0 - 39: - action: "HOST_NIC_ENABLE" - options: - node_id: 0 - nic_id: 0 - 40: - action: "HOST_NIC_DISABLE" - options: - node_id: 1 - nic_id: 0 - 41: - action: "HOST_NIC_ENABLE" - options: - node_id: 1 - nic_id: 0 - 42: - action: "HOST_NIC_DISABLE" - options: - node_id: 2 - nic_id: 0 - 43: - action: "HOST_NIC_ENABLE" - options: - node_id: 2 - nic_id: 0 - 44: - action: "HOST_NIC_DISABLE" - options: - node_id: 3 - nic_id: 0 - 45: - action: "HOST_NIC_ENABLE" - options: - node_id: 3 - nic_id: 0 - 46: - action: "HOST_NIC_DISABLE" - options: - node_id: 4 - nic_id: 0 - 47: - action: "HOST_NIC_ENABLE" - options: - node_id: 4 - nic_id: 0 - 48: - action: "HOST_NIC_DISABLE" - options: - node_id: 4 - nic_id: 1 - 49: - action: "HOST_NIC_ENABLE" - options: - node_id: 4 - nic_id: 1 - 50: - action: "HOST_NIC_DISABLE" - options: - node_id: 5 - nic_id: 0 - 51: - action: "HOST_NIC_ENABLE" - options: - node_id: 5 - nic_id: 0 - 52: - action: "HOST_NIC_DISABLE" - options: - node_id: 6 - nic_id: 0 - 53: - action: "HOST_NIC_ENABLE" - options: - node_id: 6 - nic_id: 0 options: diff --git a/tests/assets/configs/shared_rewards.yaml b/tests/assets/configs/shared_rewards.yaml index c5ba06b1..c90e1cc2 100644 --- a/tests/assets/configs/shared_rewards.yaml +++ b/tests/assets/configs/shared_rewards.yaml @@ -1,15 +1,3 @@ -training_config: - rl_framework: SB3 - rl_algorithm: PPO - seed: 333 - n_learn_episodes: 1 - n_eval_episodes: 5 - max_steps_per_episode: 128 - deterministic_eval: false - n_agents: 1 - agent_references: - - defender - io_settings: save_agent_actions: false save_step_metadata: false diff --git a/tests/assets/configs/test_application_install.yaml b/tests/assets/configs/test_application_install.yaml index d1fed272..87402f73 100644 --- a/tests/assets/configs/test_application_install.yaml +++ b/tests/assets/configs/test_application_install.yaml @@ -1,15 +1,3 @@ -training_config: - rl_framework: SB3 - rl_algorithm: PPO - seed: 333 - n_learn_episodes: 1 - n_eval_episodes: 5 - max_steps_per_episode: 128 - deterministic_eval: false - n_agents: 1 - agent_references: - - defender - io_settings: save_agent_actions: true save_step_metadata: false diff --git a/tests/assets/configs/test_primaite_session.yaml b/tests/assets/configs/test_primaite_session.yaml index 490e99d4..f41ef475 100644 --- a/tests/assets/configs/test_primaite_session.yaml +++ b/tests/assets/configs/test_primaite_session.yaml @@ -1,15 +1,3 @@ -training_config: - rl_framework: SB3 - rl_algorithm: PPO - seed: 333 - n_learn_episodes: 10 - n_eval_episodes: 5 - max_steps_per_episode: 128 - deterministic_eval: false - n_agents: 1 - agent_references: - - defender - io_settings: save_agent_actions: true save_step_metadata: true @@ -568,7 +556,7 @@ agents: agent_settings: - # ... + flatten_obs: true diff --git a/tests/assets/configs/train_only_primaite_session.yaml b/tests/assets/configs/train_only_primaite_session.yaml deleted file mode 100644 index 3de2c80a..00000000 --- a/tests/assets/configs/train_only_primaite_session.yaml +++ /dev/null @@ -1,737 +0,0 @@ -training_config: - rl_framework: SB3 - rl_algorithm: PPO - seed: 333 - n_learn_episodes: 10 - n_eval_episodes: 0 - max_steps_per_episode: 128 - deterministic_eval: false - n_agents: 1 - agent_references: - - defender - - -game: - ports: - - ARP - - DNS - - HTTP - - POSTGRES_SERVER - protocols: - - ICMP - - TCP - - UDP - -agents: - - ref: client_2_green_user - team: GREEN - type: ProbabilisticAgent - observation_space: null - action_space: - action_list: - - type: DONOTHING - # - # - type: NODE_LOGON - # - type: NODE_LOGOFF - # - type: NODE_APPLICATION_EXECUTE - # options: - # execution_definition: - # target_address: arcd.com - action_map: - 0: - action: DONOTHING - options: {} - options: - nodes: - - node_name: client_2 - max_folders_per_node: 1 - max_files_per_folder: 1 - max_services_per_node: 1 - max_nics_per_node: 2 - max_acl_rules: 10 - - reward_function: - reward_components: - - type: DUMMY - - agent_settings: # options specific to this particular agent type, basically args of __init__(self) - start_settings: - start_step: 25 - frequency: 20 - variance: 5 - - - ref: data_manipulation_attacker - team: RED - type: RedDatabaseCorruptingAgent - - observation_space: null - - action_space: - action_list: - - type: DONOTHING - - type: NODE_APPLICATION_EXECUTE - - type: NODE_FILE_DELETE - - type: NODE_FILE_CORRUPT - - type: NODE_OS_SCAN - action_map: - 0: - action: DONOTHING - options: {} - 1: - action: NODE_APPLICATION_EXECUTE - options: - node_id: 0 - application_id: 0 - options: - nodes: - - node_name: client_1 - applications: - - application_name: DataManipulationBot - max_folders_per_node: 1 - max_files_per_folder: 1 - max_services_per_node: 1 - - reward_function: - reward_components: - - type: DUMMY - - agent_settings: # options specific to this particular agent type, basically args of __init__(self) - start_settings: - start_step: 25 - frequency: 20 - variance: 5 - - - ref: defender - team: BLUE - type: ProxyAgent - - observation_space: - type: CUSTOM - options: - components: - - type: NODES - label: NODES - options: - hosts: - - hostname: domain_controller - - hostname: web_server - services: - - service_name: WebServer - - hostname: database_server - folders: - - folder_name: database - files: - - file_name: database.db - - hostname: backup_server - - hostname: security_suite - - hostname: client_1 - - hostname: client_2 - num_services: 1 - num_applications: 0 - num_folders: 1 - num_files: 1 - num_nics: 2 - include_num_access: false - include_nmne: true - routers: - - hostname: router_1 - num_ports: 0 - ip_list: - - 192.168.1.10 - - 192.168.1.12 - - 192.168.1.14 - - 192.168.1.16 - - 192.168.1.110 - - 192.168.10.21 - - 192.168.10.22 - - 192.168.10.110 - wildcard_list: - - 0.0.0.1 - port_list: - - 80 - - 5432 - protocol_list: - - ICMP - - TCP - - UDP - num_rules: 10 - - - type: LINKS - label: LINKS - options: - link_references: - - router_1:eth-1<->switch_1:eth-8 - - router_1:eth-2<->switch_2:eth-8 - - switch_1:eth-1<->domain_controller:eth-1 - - switch_1:eth-2<->web_server:eth-1 - - switch_1:eth-3<->database_server:eth-1 - - switch_1:eth-4<->backup_server:eth-1 - - switch_1:eth-7<->security_suite:eth-1 - - switch_2:eth-1<->client_1:eth-1 - - switch_2:eth-2<->client_2:eth-1 - - switch_2:eth-7<->security_suite:eth-2 - - type: "NONE" - label: ICS - options: {} - - action_space: - action_list: - - type: DONOTHING - - type: NODE_SERVICE_SCAN - - type: NODE_SERVICE_STOP - - type: NODE_SERVICE_START - - type: NODE_SERVICE_PAUSE - - type: NODE_SERVICE_RESUME - - type: NODE_SERVICE_RESTART - - type: NODE_SERVICE_DISABLE - - type: NODE_SERVICE_ENABLE - - type: NODE_SERVICE_FIX - - type: NODE_FILE_SCAN - - type: NODE_FILE_CHECKHASH - - type: NODE_FILE_DELETE - - type: NODE_FILE_REPAIR - - type: NODE_FILE_RESTORE - - type: NODE_FOLDER_SCAN - - type: NODE_FOLDER_CHECKHASH - - type: NODE_FOLDER_REPAIR - - type: NODE_FOLDER_RESTORE - - type: NODE_OS_SCAN - - type: NODE_SHUTDOWN - - type: NODE_STARTUP - - type: NODE_RESET - - type: ROUTER_ACL_ADDRULE - - type: ROUTER_ACL_REMOVERULE - - type: HOST_NIC_ENABLE - - type: HOST_NIC_DISABLE - - action_map: - 0: - action: DONOTHING - options: {} - # scan webapp service - 1: - action: NODE_SERVICE_SCAN - options: - node_id: 1 - service_id: 0 - # stop webapp service - 2: - action: NODE_SERVICE_STOP - options: - node_id: 1 - service_id: 0 - # start webapp service - 3: - action: "NODE_SERVICE_START" - options: - node_id: 1 - service_id: 0 - 4: - action: "NODE_SERVICE_PAUSE" - options: - node_id: 1 - service_id: 0 - 5: - action: "NODE_SERVICE_RESUME" - options: - node_id: 1 - service_id: 0 - 6: - action: "NODE_SERVICE_RESTART" - options: - node_id: 1 - service_id: 0 - 7: - action: "NODE_SERVICE_DISABLE" - options: - node_id: 1 - service_id: 0 - 8: - action: "NODE_SERVICE_ENABLE" - options: - node_id: 1 - service_id: 0 - 9: # check database.db file - action: "NODE_FILE_SCAN" - options: - node_id: 2 - folder_id: 1 - file_id: 0 - 10: - action: "NODE_FILE_CHECKHASH" - options: - node_id: 2 - folder_id: 1 - file_id: 0 - 11: - action: "NODE_FILE_DELETE" - options: - node_id: 2 - folder_id: 1 - file_id: 0 - 12: - action: "NODE_FILE_REPAIR" - options: - node_id: 2 - folder_id: 1 - file_id: 0 - 13: - action: "NODE_SERVICE_FIX" - options: - node_id: 2 - service_id: 0 - 14: - action: "NODE_FOLDER_SCAN" - options: - node_id: 2 - folder_id: 1 - 15: - action: "NODE_FOLDER_CHECKHASH" - options: - node_id: 2 - folder_id: 1 - 16: - action: "NODE_FOLDER_REPAIR" - options: - node_id: 2 - folder_id: 1 - 17: - action: "NODE_FOLDER_RESTORE" - options: - node_id: 2 - folder_id: 1 - 18: - action: "NODE_OS_SCAN" - options: - node_id: 2 - 19: # shutdown client 1 - action: "NODE_SHUTDOWN" - options: - node_id: 5 - 20: - action: "NODE_STARTUP" - options: - node_id: 5 - 21: - action: "NODE_RESET" - options: - node_id: 5 - 22: # "ACL: ADDRULE - Block outgoing traffic from client 1" (not supported in Primaite) - action: "ROUTER_ACL_ADDRULE" - options: - target_router_nodename: router_1 - position: 1 - permission: 2 - source_ip_id: 7 # client 1 - dest_ip_id: 1 # ALL - source_port_id: 1 - dest_port_id: 1 - protocol_id: 1 - source_wildcard_id: 0 - dest_wildcard_id: 0 - 23: # "ACL: ADDRULE - Block outgoing traffic from client 2" (not supported in Primaite) - action: "ROUTER_ACL_ADDRULE" - options: - target_router_nodename: router_1 - position: 2 - permission: 2 - source_ip_id: 8 # client 2 - dest_ip_id: 1 # ALL - source_port_id: 1 - dest_port_id: 1 - protocol_id: 1 - source_wildcard_id: 0 - dest_wildcard_id: 0 - 24: # block tcp traffic from client 1 to web app - action: "ROUTER_ACL_ADDRULE" - options: - target_router_nodename: router_1 - position: 3 - permission: 2 - source_ip_id: 7 # client 1 - dest_ip_id: 3 # web server - source_port_id: 1 - dest_port_id: 1 - protocol_id: 3 - source_wildcard_id: 0 - dest_wildcard_id: 0 - 25: # block tcp traffic from client 2 to web app - action: "ROUTER_ACL_ADDRULE" - options: - target_router_nodename: router_1 - position: 4 - permission: 2 - source_ip_id: 8 # client 2 - dest_ip_id: 3 # web server - source_port_id: 1 - dest_port_id: 1 - protocol_id: 3 - source_wildcard_id: 0 - dest_wildcard_id: 0 - 26: - action: "ROUTER_ACL_ADDRULE" - options: - target_router_nodename: router_1 - position: 5 - permission: 2 - source_ip_id: 7 # client 1 - dest_ip_id: 4 # database - source_port_id: 1 - dest_port_id: 1 - protocol_id: 3 - source_wildcard_id: 0 - dest_wildcard_id: 0 - 27: - action: "ROUTER_ACL_ADDRULE" - options: - target_router_nodename: router_1 - position: 6 - permission: 2 - source_ip_id: 8 # client 2 - dest_ip_id: 4 # database - source_port_id: 1 - dest_port_id: 1 - protocol_id: 3 - source_wildcard_id: 0 - dest_wildcard_id: 0 - 28: - action: "ROUTER_ACL_REMOVERULE" - options: - target_router_nodename: router_1 - position: 0 - 29: - action: "ROUTER_ACL_REMOVERULE" - options: - target_router_nodename: router_1 - position: 1 - 30: - action: "ROUTER_ACL_REMOVERULE" - options: - target_router_nodename: router_1 - position: 2 - 31: - action: "ROUTER_ACL_REMOVERULE" - options: - target_router_nodename: router_1 - position: 3 - 32: - action: "ROUTER_ACL_REMOVERULE" - options: - target_router_nodename: router_1 - position: 4 - 33: - action: "ROUTER_ACL_REMOVERULE" - options: - target_router_nodename: router_1 - position: 5 - 34: - action: "ROUTER_ACL_REMOVERULE" - options: - target_router_nodename: router_1 - position: 6 - 35: - action: "ROUTER_ACL_REMOVERULE" - options: - target_router_nodename: router_1 - position: 7 - 36: - action: "ROUTER_ACL_REMOVERULE" - options: - target_router_nodename: router_1 - position: 8 - 37: - action: "ROUTER_ACL_REMOVERULE" - options: - target_router_nodename: router_1 - position: 9 - 38: - action: "HOST_NIC_DISABLE" - options: - node_id: 0 - nic_id: 0 - 39: - action: "HOST_NIC_ENABLE" - options: - node_id: 0 - nic_id: 0 - 40: - action: "HOST_NIC_DISABLE" - options: - node_id: 1 - nic_id: 0 - 41: - action: "HOST_NIC_ENABLE" - options: - node_id: 1 - nic_id: 0 - 42: - action: "HOST_NIC_DISABLE" - options: - node_id: 2 - nic_id: 0 - 43: - action: "HOST_NIC_ENABLE" - options: - node_id: 2 - nic_id: 0 - 44: - action: "HOST_NIC_DISABLE" - options: - node_id: 3 - nic_id: 0 - 45: - action: "HOST_NIC_ENABLE" - options: - node_id: 3 - nic_id: 0 - 46: - action: "HOST_NIC_DISABLE" - options: - node_id: 4 - nic_id: 0 - 47: - action: "HOST_NIC_ENABLE" - options: - node_id: 4 - nic_id: 0 - 48: - action: "HOST_NIC_DISABLE" - options: - node_id: 4 - nic_id: 1 - 49: - action: "HOST_NIC_ENABLE" - options: - node_id: 4 - nic_id: 1 - 50: - action: "HOST_NIC_DISABLE" - options: - node_id: 5 - nic_id: 0 - 51: - action: "HOST_NIC_ENABLE" - options: - node_id: 5 - nic_id: 0 - 52: - action: "HOST_NIC_DISABLE" - options: - node_id: 6 - nic_id: 0 - 53: - action: "HOST_NIC_ENABLE" - options: - node_id: 6 - nic_id: 0 - - - options: - nodes: - - node_name: domain_controller - - node_name: web_server - - node_name: database_server - - node_name: backup_server - - node_name: security_suite - - node_name: client_1 - - node_name: client_2 - max_folders_per_node: 2 - max_files_per_folder: 2 - max_services_per_node: 2 - max_nics_per_node: 8 - max_acl_rules: 10 - ip_list: - - 192.168.1.10 - - 192.168.1.12 - - 192.168.1.14 - - 192.168.1.16 - - 192.168.1.110 - - 192.168.10.21 - - 192.168.10.22 - - 192.168.10.110 - - reward_function: - reward_components: - - type: DATABASE_FILE_INTEGRITY - weight: 0.5 - options: - node_hostname: database_server - folder_name: database - file_name: database.db - - - - type: WEB_SERVER_404_PENALTY - weight: 0.5 - options: - node_hostname: web_server - service_name: web_service - - - agent_settings: - # ... - - - - - -simulation: - network: - nodes: - - - type: router - hostname: router_1 - num_ports: 5 - ports: - 1: - ip_address: 192.168.1.1 - subnet_mask: 255.255.255.0 - 2: - ip_address: 192.168.1.1 - subnet_mask: 255.255.255.0 - acl: - 0: - action: PERMIT - src_port: POSTGRES_SERVER - dst_port: POSTGRES_SERVER - 1: - action: PERMIT - src_port: DNS - dst_port: DNS - 22: - action: PERMIT - src_port: ARP - dst_port: ARP - 23: - action: PERMIT - protocol: ICMP - - - type: switch - hostname: switch_1 - num_ports: 8 - - - type: switch - hostname: switch_2 - num_ports: 8 - - - type: server - hostname: domain_controller - ip_address: 192.168.1.10 - subnet_mask: 255.255.255.0 - default_gateway: 192.168.1.1 - services: - - type: DNSServer - options: - domain_mapping: - arcd.com: 192.168.1.12 # web server - - - type: server - hostname: web_server - ip_address: 192.168.1.12 - subnet_mask: 255.255.255.0 - default_gateway: 192.168.1.1 - dns_server: 192.168.1.10 - services: - - type: WebServer - applications: - - type: DatabaseClient - options: - db_server_ip: 192.168.1.14 - - - - type: server - hostname: database_server - ip_address: 192.168.1.14 - subnet_mask: 255.255.255.0 - default_gateway: 192.168.1.1 - dns_server: 192.168.1.10 - services: - - type: DatabaseService - - - type: server - hostname: backup_server - ip_address: 192.168.1.16 - subnet_mask: 255.255.255.0 - default_gateway: 192.168.1.1 - dns_server: 192.168.1.10 - services: - - type: FTPServer - - - type: server - hostname: security_suite - ip_address: 192.168.1.110 - subnet_mask: 255.255.255.0 - default_gateway: 192.168.1.1 - dns_server: 192.168.1.10 - network_interfaces: - 2: # unfortunately this number is currently meaningless, they're just added in order and take up the next available slot - ip_address: 192.168.10.110 - subnet_mask: 255.255.255.0 - - - type: computer - hostname: client_1 - ip_address: 192.168.10.21 - subnet_mask: 255.255.255.0 - default_gateway: 192.168.10.1 - dns_server: 192.168.1.10 - applications: - - type: DataManipulationBot - options: - port_scan_p_of_success: 0.1 - data_manipulation_p_of_success: 0.1 - payload: "DELETE" - server_ip: 192.168.1.14 - services: - - type: DNSClient - - - type: computer - hostname: client_2 - ip_address: 192.168.10.22 - subnet_mask: 255.255.255.0 - default_gateway: 192.168.10.1 - dns_server: 192.168.1.10 - applications: - - type: WebBrowser - services: - - type: DNSClient - - links: - - endpoint_a_hostname: router_1 - endpoint_a_port: 1 - endpoint_b_hostname: switch_1 - endpoint_b_port: 8 - - endpoint_a_hostname: router_1 - endpoint_a_port: 2 - endpoint_b_hostname: switch_2 - endpoint_b_port: 8 - - endpoint_a_hostname: switch_1 - endpoint_a_port: 1 - endpoint_b_hostname: domain_controller - endpoint_b_port: 1 - - endpoint_a_hostname: switch_1 - endpoint_a_port: 2 - endpoint_b_hostname: web_server - endpoint_b_port: 1 - - endpoint_a_hostname: switch_1 - endpoint_a_port: 3 - endpoint_b_hostname: database_server - endpoint_b_port: 1 - - endpoint_a_hostname: switch_1 - endpoint_a_port: 4 - endpoint_b_hostname: backup_server - endpoint_b_port: 1 - - endpoint_a_hostname: switch_1 - endpoint_a_port: 7 - endpoint_b_hostname: security_suite - endpoint_b_port: 1 - - endpoint_a_hostname: switch_2 - endpoint_a_port: 1 - endpoint_b_hostname: client_1 - endpoint_b_port: 1 - - endpoint_a_hostname: switch_2 - endpoint_a_port: 2 - endpoint_b_hostname: client_2 - endpoint_b_port: 1 - - endpoint_a_hostname: switch_2 - endpoint_a_port: 7 - endpoint_b_hostname: security_suite - endpoint_b_port: 2 diff --git a/tests/conftest.py b/tests/conftest.py index 018dcb70..7de2bfde 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -13,7 +13,6 @@ from primaite.game.agent.interface import AbstractAgent from primaite.game.agent.observations.observation_manager import NestedObservation, ObservationManager from primaite.game.agent.rewards import RewardFunction from primaite.game.game import PrimaiteGame -from primaite.session.session import PrimaiteSession from primaite.simulator import SIM_OUTPUT from primaite.simulator.file_system.file_system import FileSystem from primaite.simulator.network.container import Network @@ -121,38 +120,6 @@ def file_system() -> FileSystem: return computer.file_system -# PrimAITE v2 stuff -class TempPrimaiteSession(PrimaiteSession): - """ - A temporary PrimaiteSession class. - - Uses context manager for deletion of files upon exit. - """ - - @classmethod - def from_config(cls, config_path: Union[str, Path]) -> "TempPrimaiteSession": - """Create a temporary PrimaiteSession object from a config file.""" - config_path = Path(config_path) - with open(config_path, "r") as f: - config = yaml.safe_load(f) - - return super().from_config(cfg=config) - - def __enter__(self): - return self - - def __exit__(self, type, value, tb): - pass - - -@pytest.fixture -def temp_primaite_session(request, monkeypatch) -> TempPrimaiteSession: - """Create a temporary PrimaiteSession object.""" - monkeypatch.setattr(PRIMAITE_PATHS, "user_sessions_path", temp_user_sessions_path()) - config_path = request.param[0] - return TempPrimaiteSession.from_config(config_path=config_path) - - @pytest.fixture(scope="function") def client_server() -> Tuple[Computer, Server]: network = Network() diff --git a/tests/e2e_integration_tests/environments/test_rllib_multi_agent_environment.py b/tests/e2e_integration_tests/environments/test_rllib_multi_agent_environment.py index 84897f9a..712a16c4 100644 --- a/tests/e2e_integration_tests/environments/test_rllib_multi_agent_environment.py +++ b/tests/e2e_integration_tests/environments/test_rllib_multi_agent_environment.py @@ -1,33 +1,28 @@ -import pytest import ray import yaml from ray import air, tune from ray.rllib.algorithms.ppo import PPOConfig -from primaite.config.load import data_manipulation_config_path -from primaite.game.game import PrimaiteGame from primaite.session.environment import PrimaiteRayMARLEnv +from tests import TEST_ASSETS_ROOT + +MULTI_AGENT_PATH = TEST_ASSETS_ROOT / "configs/multi_agent_session.yaml" -@pytest.mark.skip(reason="Slow, reenable later") def test_rllib_multi_agent_compatibility(): """Test that the PrimaiteRayEnv class can be used with a multi agent RLLIB system.""" - with open(data_manipulation_config_path(), "r") as f: + with open(MULTI_AGENT_PATH, "r") as f: cfg = yaml.safe_load(f) - game = PrimaiteGame.from_config(cfg) - - ray.shutdown() ray.init() - env_config = {"game": game} config = ( PPOConfig() - .environment(env=PrimaiteRayMARLEnv, env_config={"game": game}) + .environment(env=PrimaiteRayMARLEnv, env_config=cfg) .rollouts(num_rollout_workers=0) .multi_agent( - policies={agent.agent_name for agent in game.rl_agents}, + policies={agent["ref"] for agent in cfg["agents"]}, policy_mapping_fn=lambda agent_id, episode, worker, **kw: agent_id, ) .training(train_batch_size=128) diff --git a/tests/e2e_integration_tests/test_environment.py b/tests/e2e_integration_tests/test_environment.py new file mode 100644 index 00000000..673e1dc4 --- /dev/null +++ b/tests/e2e_integration_tests/test_environment.py @@ -0,0 +1,91 @@ +import pydantic +import pytest +import yaml +from gymnasium.core import ObsType +from numpy import ndarray + +from primaite.session.environment import PrimaiteGymEnv, PrimaiteRayMARLEnv +from primaite.simulator.network.hardware.nodes.host.server import Printer +from primaite.simulator.network.hardware.nodes.network.wireless_router import WirelessRouter +from tests import TEST_ASSETS_ROOT + +CFG_PATH = TEST_ASSETS_ROOT / "configs/test_primaite_session.yaml" +TRAINING_ONLY_PATH = TEST_ASSETS_ROOT / "configs/train_only_primaite_session.yaml" +EVAL_ONLY_PATH = TEST_ASSETS_ROOT / "configs/eval_only_primaite_session.yaml" +MISCONFIGURED_PATH = TEST_ASSETS_ROOT / "configs/bad_primaite_session.yaml" +MULTI_AGENT_PATH = TEST_ASSETS_ROOT / "configs/multi_agent_session.yaml" + + +class TestPrimaiteEnvironment: + def test_creating_env(self): + """Check that environment loads correctly from config and it can be reset.""" + with open(CFG_PATH, "r") as f: + cfg = yaml.safe_load(f) + env = PrimaiteGymEnv(game_config=cfg) + + def env_checks(): + assert env is not None + assert env.game.simulation + assert len(env.game.agents) == 3 + assert len(env.game.rl_agents) == 1 + + assert env.game.simulation.network + assert len(env.game.simulation.network.nodes) == 12 + wireless = env.game.simulation.network.get_node_by_hostname("router_2") + assert isinstance(wireless, WirelessRouter) + printer = env.game.simulation.network.get_node_by_hostname("HP_LaserJet_Pro_4102fdn_printer") + assert isinstance(printer, Printer) + + env_checks() + env.reset() + env_checks() + + def test_step_env(self): + """Make sure you can go all the way through the session without errors.""" + with open(CFG_PATH, "r") as f: + cfg = yaml.safe_load(f) + env = PrimaiteGymEnv(game_config=cfg) + + assert (num_actions := len(env.agent.action_manager.action_map)) == 54 + # run every action and make sure there's no crash + for act in range(num_actions): + env.step(act) + # try running action number outside the action map to check that it fails. + with pytest.raises(KeyError): + env.step(num_actions) + + obs, rew, trunc, term, info = env.step(0) + assert isinstance(obs, ndarray) + + def test_multi_agent_env(self): + """Check that we can run a training session with a multi agent system.""" + with open(MULTI_AGENT_PATH, "r") as f: + cfg = yaml.safe_load(f) + env = PrimaiteRayMARLEnv(env_config=cfg) + + assert set(env._agent_ids) == {"defender1", "defender2"} + + assert len(env.agents) == 2 + defender1 = env.agents["defender1"] + defender2 = env.agents["defender2"] + assert (num_actions_1 := len(defender1.action_manager.action_map)) == 54 + assert (num_actions_2 := len(defender2.action_manager.action_map)) == 38 + + # ensure we can run all valid actions without error + for act_1 in range(num_actions_1): + env.step({"defender1": act_1, "defender2": 0}) + for act_2 in range(num_actions_2): + env.step({"defender1": 0, "defender2": act_2}) + + # ensure we get error when taking an invalid action + with pytest.raises(KeyError): + env.step({"defender1": num_actions_1, "defender2": 0}) + with pytest.raises(KeyError): + env.step({"defender1": 0, "defender2": num_actions_2}) + + def test_error_thrown_on_bad_configuration(self): + """Make sure we throw an error when the config is bad.""" + with open(MISCONFIGURED_PATH, "r") as f: + cfg = yaml.safe_load(f) + with pytest.raises(pydantic.ValidationError): + env = PrimaiteGymEnv(game_config=cfg) diff --git a/tests/e2e_integration_tests/test_primaite_session.py b/tests/e2e_integration_tests/test_primaite_session.py deleted file mode 100644 index d115f255..00000000 --- a/tests/e2e_integration_tests/test_primaite_session.py +++ /dev/null @@ -1,109 +0,0 @@ -import pydantic -import pytest - -from primaite.simulator.network.hardware.nodes.host.server import Printer -from primaite.simulator.network.hardware.nodes.network.wireless_router import WirelessRouter -from tests import TEST_ASSETS_ROOT -from tests.conftest import TempPrimaiteSession - -CFG_PATH = TEST_ASSETS_ROOT / "configs/test_primaite_session.yaml" -TRAINING_ONLY_PATH = TEST_ASSETS_ROOT / "configs/train_only_primaite_session.yaml" -EVAL_ONLY_PATH = TEST_ASSETS_ROOT / "configs/eval_only_primaite_session.yaml" -MISCONFIGURED_PATH = TEST_ASSETS_ROOT / "configs/bad_primaite_session.yaml" -MULTI_AGENT_PATH = TEST_ASSETS_ROOT / "configs/multi_agent_session.yaml" - - -@pytest.mark.skip(reason="Session is not being maintained and will be removed in the subsequent beta release.") -class TestPrimaiteSession: - @pytest.mark.skip(reason="Session is not being maintained and will be removed in the subsequent beta release.") - @pytest.mark.parametrize("temp_primaite_session", [[CFG_PATH]], indirect=True) - def test_creating_session(self, temp_primaite_session): - """Check that creating a session from config works.""" - with temp_primaite_session as session: - if not isinstance(session, TempPrimaiteSession): - raise AssertionError - - assert session is not None - assert session.env.game.simulation - assert len(session.env.game.agents) == 3 - assert len(session.env.game.rl_agents) == 1 - - assert session.policy - assert session.env - - assert session.env.game.simulation.network - assert len(session.env.game.simulation.network.nodes) == 12 - wireless = session.env.game.simulation.network.get_node_by_hostname("router_2") - assert isinstance(wireless, WirelessRouter) - printer = session.env.game.simulation.network.get_node_by_hostname("HP_LaserJet_Pro_4102fdn_printer") - assert isinstance(printer, Printer) - - @pytest.mark.skip(reason="Session is not being maintained and will be removed in the subsequent beta release.") - @pytest.mark.parametrize("temp_primaite_session", [[CFG_PATH]], indirect=True) - def test_start_session(self, temp_primaite_session): - """Make sure you can go all the way through the session without errors.""" - with temp_primaite_session as session: - session: TempPrimaiteSession - session.start_session() - - session_path = session.io_manager.session_path - assert session_path.exists() - print(list(session_path.glob("*"))) - checkpoint_dir = session_path / "checkpoints" / "sb3_final" - assert checkpoint_dir.exists() - checkpoint_1 = checkpoint_dir / "sb3_model_640_steps.zip" - checkpoint_2 = checkpoint_dir / "sb3_model_1280_steps.zip" - checkpoint_3 = checkpoint_dir / "sb3_model_1920_steps.zip" - assert checkpoint_1.exists() - assert checkpoint_2.exists() - assert not checkpoint_3.exists() - - @pytest.mark.skip(reason="Session is not being maintained and will be removed in the subsequent beta release.") - @pytest.mark.parametrize("temp_primaite_session", [[TRAINING_ONLY_PATH]], indirect=True) - def test_training_only_session(self, temp_primaite_session): - """Check that you can run a training-only session.""" - with temp_primaite_session as session: - session: TempPrimaiteSession - session.start_session() - # TODO: include checks that the model was trained, e.g. that the loss changed and checkpoints were saved? - - @pytest.mark.skip(reason="Session is not being maintained and will be removed in the subsequent beta release.") - @pytest.mark.parametrize("temp_primaite_session", [[EVAL_ONLY_PATH]], indirect=True) - def test_eval_only_session(self, temp_primaite_session): - """Check that you can load a model and run an eval-only session.""" - with temp_primaite_session as session: - session: TempPrimaiteSession - session.start_session() - # TODO: include checks that the model was loaded and that the eval-only session ran - - @pytest.mark.skip(reason="Session is not being maintained and will be removed in the subsequent beta release.") - @pytest.mark.skip(reason="Slow, reenable later") - @pytest.mark.parametrize("temp_primaite_session", [[MULTI_AGENT_PATH]], indirect=True) - def test_multi_agent_session(self, temp_primaite_session): - """Check that we can run a training session with a multi agent system.""" - with temp_primaite_session as session: - session.start_session() - - @pytest.mark.skip(reason="Session is not being maintained and will be removed in the subsequent beta release.") - def test_error_thrown_on_bad_configuration(self): - with pytest.raises(pydantic.ValidationError): - session = TempPrimaiteSession.from_config(MISCONFIGURED_PATH) - - @pytest.mark.skip(reason="Session is not being maintained and will be removed in the subsequent beta release.") - @pytest.mark.skip( - reason="Currently software cannot be dynamically created/destroyed during simulation. Therefore, " - "reset doesn't implement software restore." - ) - @pytest.mark.parametrize("temp_primaite_session", [[CFG_PATH]], indirect=True) - def test_session_sim_reset(self, temp_primaite_session): - with temp_primaite_session as session: - session: TempPrimaiteSession - client_1 = session.game.simulation.network.get_node_by_hostname("client_1") - client_1.software_manager.uninstall("DataManipulationBot") - - assert "DataManipulationBot" not in client_1.software_manager.software - - session.game.reset() - client_1 = session.game.simulation.network.get_node_by_hostname("client_1") - - assert "DataManipulationBot" in client_1.software_manager.software From 7c0a7702c490c8fa9bb7abe7a3d78bf18bb449f9 Mon Sep 17 00:00:00 2001 From: Marek Wolan Date: Tue, 16 Apr 2024 11:39:13 +0100 Subject: [PATCH 110/124] #2374 update changelog --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d95b6315..d30ae5e2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,9 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## 3.0.0b9 +- Removed deprecated `PrimaiteSession` class. + ## [Unreleased] - Made requests fail to reach their target if the node is off - Added responses to requests From db56eea4ce569addeee401501db09d8c90681ecc Mon Sep 17 00:00:00 2001 From: Marek Wolan Date: Tue, 16 Apr 2024 13:20:07 +0100 Subject: [PATCH 111/124] #2374 Update readme and minor fix to yaml --- README.md | 36 ++++++++++++------- .../_package_data/data_manipulation_marl.yaml | 2 +- 2 files changed, 25 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 7dfe15bd..2265538a 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ PrimAITE presents the following features: ## Getting Started with PrimAITE -### 💫 Install & Run +### 💫 Installation **PrimAITE** is designed to be OS-agnostic, and thus should work on most variations/distros of Linux, Windows, and MacOS. Currently, the PrimAITE wheel can only be installed from GitHub. This may change in the future with release to PyPi. @@ -47,11 +47,6 @@ pip install https://github.com/Autonomous-Resilient-Cyber-Defence/PrimAITE/relea primaite setup ``` -**Run:** - -``` bash -primaite session -``` #### Unix @@ -75,12 +70,6 @@ pip install https://github.com/Autonomous-Resilient-Cyber-Defence/PrimAITE/relea primaite setup ``` -**Run:** - -``` bash -primaite session -``` - ### Developer Install from Source @@ -125,6 +114,29 @@ python3 -m pip install -e .[dev] primaite setup ``` +### Running PrimAITE + +Use the provided jupyter notebooks as a starting point to try running PrimAITE. They are automatically copied to your PrimAITE notebook folder when you run `primaite setup`. + +#### 1. Activate the virtual environment + +##### Windows (Powershell) +```powershell +.\venv\Scripts\activate +``` + +##### Unix +```bash +source venv/bin/activate +``` + +#### 2. Open jupyter notebook + +```bash +python -m jupyter notebook +``` +Then, click the URL provided by the jupyter command to open the jupyter application in your browser. You can also open notebooks in your IDE if supported. + ## 📚 Building documentation The PrimAITE documentation can be built with the following commands: diff --git a/src/primaite/config/_package_data/data_manipulation_marl.yaml b/src/primaite/config/_package_data/data_manipulation_marl.yaml index cb94a128..359d7c55 100644 --- a/src/primaite/config/_package_data/data_manipulation_marl.yaml +++ b/src/primaite/config/_package_data/data_manipulation_marl.yaml @@ -1458,7 +1458,7 @@ simulation: options: db_server_ip: 192.168.1.14 services: - - ty DNSClient + - type: DNSClient From 4903c77f6513bf46c32686c32fe71cf390d93ea2 Mon Sep 17 00:00:00 2001 From: Nick Todd Date: Tue, 16 Apr 2024 14:17:58 +0100 Subject: [PATCH 112/124] #2455: Add missing source_wildcard_id and dest_wildcard_id data. --- .../_package_data/data_manipulation_marl.yaml | 26 +++++++++---------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/src/primaite/config/_package_data/data_manipulation_marl.yaml b/src/primaite/config/_package_data/data_manipulation_marl.yaml index 6c9ac64e..45779036 100644 --- a/src/primaite/config/_package_data/data_manipulation_marl.yaml +++ b/src/primaite/config/_package_data/data_manipulation_marl.yaml @@ -1,17 +1,3 @@ -training_config: - rl_framework: RLLIB_multi_agent - rl_algorithm: PPO - seed: 333 - n_learn_episodes: 1 - n_eval_episodes: 5 - max_steps_per_episode: 128 - deterministic_eval: false - n_agents: 2 - agent_references: - - defender_1 - - defender_2 - - io_settings: save_agent_actions: true save_step_metadata: false @@ -1075,6 +1061,8 @@ agents: source_port_id: 1 dest_port_id: 1 protocol_id: 1 + source_wildcard_id: 0 + dest_wildcard_id: 0 47: # old action num: 23 # "ACL: ADDRULE - Block outgoing traffic from client 2" action: "ROUTER_ACL_ADDRULE" options: @@ -1086,6 +1074,8 @@ agents: source_port_id: 1 dest_port_id: 1 protocol_id: 1 + source_wildcard_id: 0 + dest_wildcard_id: 0 48: # old action num: 24 # block tcp traffic from client 1 to web app action: "ROUTER_ACL_ADDRULE" options: @@ -1097,6 +1087,8 @@ agents: source_port_id: 1 dest_port_id: 1 protocol_id: 3 + source_wildcard_id: 0 + dest_wildcard_id: 0 49: # old action num: 25 # block tcp traffic from client 2 to web app action: "ROUTER_ACL_ADDRULE" options: @@ -1108,6 +1100,8 @@ agents: source_port_id: 1 dest_port_id: 1 protocol_id: 3 + source_wildcard_id: 0 + dest_wildcard_id: 0 50: # old action num: 26 action: "ROUTER_ACL_ADDRULE" options: @@ -1119,6 +1113,8 @@ agents: source_port_id: 1 dest_port_id: 1 protocol_id: 3 + source_wildcard_id: 0 + dest_wildcard_id: 0 51: # old action num: 27 action: "ROUTER_ACL_ADDRULE" options: @@ -1130,6 +1126,8 @@ agents: source_port_id: 1 dest_port_id: 1 protocol_id: 3 + source_wildcard_id: 0 + dest_wildcard_id: 0 52: # old action num: 28 action: "ROUTER_ACL_REMOVERULE" options: From 750cc98703105f6571c9313345ebd993cf5bd5bc Mon Sep 17 00:00:00 2001 From: Charlie Crane Date: Tue, 16 Apr 2024 16:52:36 +0100 Subject: [PATCH 113/124] #2453 - Actioning review comments --- .../simulator/_package_data/create-simulation_demo.ipynb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/primaite/simulator/_package_data/create-simulation_demo.ipynb b/src/primaite/simulator/_package_data/create-simulation_demo.ipynb index 937e9831..06ecd4be 100644 --- a/src/primaite/simulator/_package_data/create-simulation_demo.ipynb +++ b/src/primaite/simulator/_package_data/create-simulation_demo.ipynb @@ -6,7 +6,7 @@ "source": [ "# Build a simulation using the Python API\n", "\n", - "Currently, this notbook manipulates the simulation by directly placing objects inside of the attributes of the network and domain. It should be refactored when proper methods exist for adding these objects.\n" + "Currently, this notebook manipulates the simulation by directly placing objects inside of the attributes of the network and domain. It should be refactored when proper methods exist for adding these objects.\n" ] }, { @@ -261,7 +261,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.10.12" + "version": "3.10.11" } }, "nbformat": 4, From 999044a4441497abafdf8511e2cdd75a1f42ce0d Mon Sep 17 00:00:00 2001 From: Charlie Crane Date: Wed, 17 Apr 2024 10:44:44 +0100 Subject: [PATCH 114/124] 2453 - removal of notebook metadata --- .../simulator/_package_data/network_simulator_demo.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/primaite/simulator/_package_data/network_simulator_demo.ipynb b/src/primaite/simulator/_package_data/network_simulator_demo.ipynb index 462ee625..7f4cf3b1 100644 --- a/src/primaite/simulator/_package_data/network_simulator_demo.ipynb +++ b/src/primaite/simulator/_package_data/network_simulator_demo.ipynb @@ -466,7 +466,7 @@ "source": [ "## Advanced Network Usage\n", "\n", - "We can now use the Network to perform some more advaced things." + "We can now use the Network to perform some more advanced things." ] }, { From 49be3b36391fa95a61205a387445a7b5fc92c561 Mon Sep 17 00:00:00 2001 From: Charlie Crane Date: Thu, 18 Apr 2024 10:23:26 +0100 Subject: [PATCH 115/124] #2453 - Updates to Training-an-SB3-agent.ipynb following review --- src/primaite/notebooks/Training-an-SB3-Agent.ipynb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/primaite/notebooks/Training-an-SB3-Agent.ipynb b/src/primaite/notebooks/Training-an-SB3-Agent.ipynb index 8d6789ee..8e18c5c1 100644 --- a/src/primaite/notebooks/Training-an-SB3-Agent.ipynb +++ b/src/primaite/notebooks/Training-an-SB3-Agent.ipynb @@ -48,9 +48,9 @@ "from stable_baselines3 import PPO\n", "\n", "EPISODE_LEN = 128\n", - "NO_STEPS = EPISODE_LEN * 10\n", - "BATCH_SIZE = EPISODE_LEN * 10\n", - "TOTAL_TIMESTEPS = 5e3 * EPISODE_LEN\n", + "NUM_EPISODES = 10\n", + "NO_STEPS = EPISODE_LEN * NUM_EPISODES\n", + "BATCH_SIZE = 32\n", "LEARNING_RATE = 3e-4" ] }, @@ -69,7 +69,7 @@ "metadata": {}, "outputs": [], "source": [ - "model.learn(total_timesteps=TOTAL_TIMESTEPS)\n" + "model.learn(total_timesteps=NO_STEPS)\n" ] }, { From bb88d43b90e0eec249c7af6815dabe9718b8a987 Mon Sep 17 00:00:00 2001 From: Charlie Crane Date: Thu, 18 Apr 2024 13:50:47 +0100 Subject: [PATCH 116/124] #2453 - Updating with some explanation to improve the readability of the notebook --- .../notebooks/Training-an-SB3-Agent.ipynb | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/src/primaite/notebooks/Training-an-SB3-Agent.ipynb b/src/primaite/notebooks/Training-an-SB3-Agent.ipynb index 8e18c5c1..59fd46c4 100644 --- a/src/primaite/notebooks/Training-an-SB3-Agent.ipynb +++ b/src/primaite/notebooks/Training-an-SB3-Agent.ipynb @@ -1,5 +1,16 @@ { "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Training an SB3 Agent\n", + "\n", + "This notebook will demonstrate how to use primaite to create and train a PPO agent.\n", + "\n", + "#### First, import `PrimaiteGymEnv` and read our config file" + ] + }, { "cell_type": "code", "execution_count": null, @@ -69,7 +80,8 @@ "metadata": {}, "outputs": [], "source": [ - "model.learn(total_timesteps=NO_STEPS)\n" + "model.learn(total_timesteps=NO_STEPS)\n", + "model.save(\"PrimAITE-PPO-example-agent\")" ] }, { @@ -78,7 +90,7 @@ "metadata": {}, "outputs": [], "source": [ - "model.save(\"PrimAITE-v3.0.0b7-PPO\")" + "model.save(\"PrimAITE-PPO-example-agent\")" ] }, { @@ -88,7 +100,7 @@ "outputs": [], "source": [ "eval_model = PPO(\"MlpPolicy\", gym)\n", - "eval_model = PPO.load(\"PrimAITE-v3.0.0b7-PPO\", gym)" + "eval_model = PPO.load(\"PrimAITE-PPO-example-agent\", gym)" ] }, { From abf94fc4bb23e56e53ad3066b17b0067e3dbdd18 Mon Sep 17 00:00:00 2001 From: Charlie Crane Date: Thu, 18 Apr 2024 13:52:43 +0100 Subject: [PATCH 117/124] #2453 - Committing additional explanations to notebook --- .../notebooks/Training-an-SB3-Agent.ipynb | 60 ++++++++++++++++--- 1 file changed, 53 insertions(+), 7 deletions(-) diff --git a/src/primaite/notebooks/Training-an-SB3-Agent.ipynb b/src/primaite/notebooks/Training-an-SB3-Agent.ipynb index 59fd46c4..140df1b8 100644 --- a/src/primaite/notebooks/Training-an-SB3-Agent.ipynb +++ b/src/primaite/notebooks/Training-an-SB3-Agent.ipynb @@ -6,9 +6,14 @@ "source": [ "# Training an SB3 Agent\n", "\n", - "This notebook will demonstrate how to use primaite to create and train a PPO agent.\n", - "\n", - "#### First, import `PrimaiteGymEnv` and read our config file" + "This notebook will demonstrate how to use primaite to create and train a PPO agent, using a pre-defined configuration file." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#### First, we import the inital packages and read in our configuration file." ] }, { @@ -38,7 +43,14 @@ "outputs": [], "source": [ "with open(data_manipulation_config_path(), 'r') as f:\n", - " cfg = yaml.safe_load(f)\n" + " cfg = yaml.safe_load(f)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Using the given configuration, we generate the environment our agent will train in." ] }, { @@ -50,6 +62,13 @@ "gym = PrimaiteGymEnv(game_config=cfg)" ] }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Lets define training parameters for the agent." + ] + }, { "cell_type": "code", "execution_count": null, @@ -71,7 +90,14 @@ "metadata": {}, "outputs": [], "source": [ - "model = PPO('MlpPolicy', gym, learning_rate=LEARNING_RATE, n_steps=NO_STEPS, batch_size=BATCH_SIZE, verbose=0, tensorboard_log=\"./PPO_UC2/\")\n" + "model = PPO('MlpPolicy', gym, learning_rate=LEARNING_RATE, n_steps=NO_STEPS, batch_size=BATCH_SIZE, verbose=0, tensorboard_log=\"./PPO_UC2/\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "With the agent configured, let's train for our defined number of episodes." ] }, { @@ -80,8 +106,14 @@ "metadata": {}, "outputs": [], "source": [ - "model.learn(total_timesteps=NO_STEPS)\n", - "model.save(\"PrimAITE-PPO-example-agent\")" + "model.learn(total_timesteps=NO_STEPS)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Next, let's save the agent to a zip file that can be used in future evaluation." ] }, { @@ -93,6 +125,13 @@ "model.save(\"PrimAITE-PPO-example-agent\")" ] }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Now, we load the saved agent and run it in evaluation mode." + ] + }, { "cell_type": "code", "execution_count": null, @@ -103,6 +142,13 @@ "eval_model = PPO.load(\"PrimAITE-PPO-example-agent\", gym)" ] }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Finally, evaluate the agent." + ] + }, { "cell_type": "code", "execution_count": null, From 9334b1e79b1de1c0f47f8399d4c5b29f3b95c41a Mon Sep 17 00:00:00 2001 From: Nick Todd Date: Fri, 19 Apr 2024 11:07:32 +0100 Subject: [PATCH 118/124] #2455: Add NICObservation.ConfigSchema to NIC list. --- src/primaite/game/agent/observations/host_observations.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/primaite/game/agent/observations/host_observations.py b/src/primaite/game/agent/observations/host_observations.py index b15ede9a..c9c73e16 100644 --- a/src/primaite/game/agent/observations/host_observations.py +++ b/src/primaite/game/agent/observations/host_observations.py @@ -227,6 +227,11 @@ class HostObservation(AbstractObservation, identifier="HOST"): applications = [ApplicationObservation.from_config(config=c, parent_where=where) for c in config.applications] folders = [FolderObservation.from_config(config=c, parent_where=where) for c in config.folders] nics = [NICObservation.from_config(config=c, parent_where=where) for c in config.network_interfaces] + count = 1 + while len(nics) < config.num_nics: + nic_config = NICObservation.ConfigSchema(nic_num=count, include_nmne=config.include_nmne) + nics.append(NICObservation.from_config(config=nic_config, parent_where=where)) + count += 1 return cls( where=where, From a7dae6e373c91f254104a1ee98c1f9739d13bf88 Mon Sep 17 00:00:00 2001 From: Chris McCarthy Date: Mon, 22 Apr 2024 08:49:08 +0100 Subject: [PATCH 119/124] #2511 - Upgraded pydantic to version 2.7.0. Added ipywidgets to the dependencies (for #2300) --- CHANGELOG.md | 2 ++ pyproject.toml | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d30ae5e2..fab36bd8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## 3.0.0b9 - Removed deprecated `PrimaiteSession` class. +- Upgraded pydantic to version 2.7.0 +- Added ipywidgets to the dependencies ## [Unreleased] - Made requests fail to reach their target if the node is off diff --git a/pyproject.toml b/pyproject.toml index 19b5b7fa..7a6383b6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -38,8 +38,9 @@ dependencies = [ "stable-baselines3[extra]==2.1.0", "tensorflow==2.12.0", "typer[all]==0.9.0", - "pydantic==2.1.1", - "ray[rllib] == 2.8.0, < 3" + "pydantic==2.7.0", + "ray[rllib] == 2.8.0", + "ipywidgets" ] [tool.setuptools.dynamic] From 6726a2da3789c6f14f17f4179af7a13ba8f13d26 Mon Sep 17 00:00:00 2001 From: Nick Todd Date: Mon, 22 Apr 2024 14:09:12 +0100 Subject: [PATCH 120/124] #2245: Add comment --- src/primaite/game/agent/observations/host_observations.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/primaite/game/agent/observations/host_observations.py b/src/primaite/game/agent/observations/host_observations.py index c9c73e16..02c0d17f 100644 --- a/src/primaite/game/agent/observations/host_observations.py +++ b/src/primaite/game/agent/observations/host_observations.py @@ -227,6 +227,8 @@ class HostObservation(AbstractObservation, identifier="HOST"): applications = [ApplicationObservation.from_config(config=c, parent_where=where) for c in config.applications] folders = [FolderObservation.from_config(config=c, parent_where=where) for c in config.folders] nics = [NICObservation.from_config(config=c, parent_where=where) for c in config.network_interfaces] + # If list of network interfaces is not defined, assume we want to + # monitor the first N interfaces. Network interface numbering starts at 1. count = 1 while len(nics) < config.num_nics: nic_config = NICObservation.ConfigSchema(nic_num=count, include_nmne=config.include_nmne) From 6060cbbc5babee998e9b4b1fdf0561896ff36c2c Mon Sep 17 00:00:00 2001 From: Chris McCarthy Date: Tue, 23 Apr 2024 09:04:17 +0100 Subject: [PATCH 121/124] #2511 - Put the ray rlllib dep back to "ray[rllib] == 2.8.0, < 3" --- pyproject.toml | 2 +- src/primaite/game/agent/observations/observations.py | 4 ++-- src/primaite/game/agent/rewards.py | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 7a6383b6..9d0bc3a6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -39,7 +39,7 @@ dependencies = [ "tensorflow==2.12.0", "typer[all]==0.9.0", "pydantic==2.7.0", - "ray[rllib] == 2.8.0", + "ray[rllib] == 2.8.0, < 3", "ipywidgets" ] diff --git a/src/primaite/game/agent/observations/observations.py b/src/primaite/game/agent/observations/observations.py index 0d6ff2a3..518fdf9f 100644 --- a/src/primaite/game/agent/observations/observations.py +++ b/src/primaite/game/agent/observations/observations.py @@ -1,6 +1,6 @@ """Manages the observation space for the agent.""" from abc import ABC, abstractmethod -from typing import Any, Dict, Iterable, Type +from typing import Any, Dict, Iterable, Type, Optional, Union from gymnasium import spaces from gymnasium.core import ObsType @@ -9,7 +9,7 @@ from pydantic import BaseModel, ConfigDict from primaite import getLogger _LOGGER = getLogger(__name__) -WhereType = Iterable[str | int] | None +WhereType = Optional[Iterable[Union[str, int]]] class AbstractObservation(ABC): diff --git a/src/primaite/game/agent/rewards.py b/src/primaite/game/agent/rewards.py index 726afaa4..0222bfcc 100644 --- a/src/primaite/game/agent/rewards.py +++ b/src/primaite/game/agent/rewards.py @@ -26,7 +26,7 @@ the structure: ``` """ from abc import abstractmethod -from typing import Callable, Dict, Iterable, List, Optional, Tuple, Type, TYPE_CHECKING +from typing import Callable, Dict, Iterable, List, Optional, Tuple, Type, TYPE_CHECKING, Union from typing_extensions import Never @@ -37,7 +37,7 @@ if TYPE_CHECKING: from primaite.game.agent.interface import AgentActionHistoryItem _LOGGER = getLogger(__name__) -WhereType = Iterable[str | int] | None +WhereType = Optional[Iterable[Union[str, int]]] class AbstractReward: From 2b19c8c91dbcfc34a53cc8cafd124d0de4e953ab Mon Sep 17 00:00:00 2001 From: Marek Wolan Date: Tue, 23 Apr 2024 09:51:56 +0100 Subject: [PATCH 122/124] #2551 upgrade ray to >2.9 and resolve logging error in db client --- pyproject.toml | 2 +- src/primaite/simulator/system/applications/database_client.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 9d0bc3a6..333132bc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -39,7 +39,7 @@ dependencies = [ "tensorflow==2.12.0", "typer[all]==0.9.0", "pydantic==2.7.0", - "ray[rllib] == 2.8.0, < 3", + "ray[rllib] >= 2.9, < 3", "ipywidgets" ] diff --git a/src/primaite/simulator/system/applications/database_client.py b/src/primaite/simulator/system/applications/database_client.py index d304c200..e21846a3 100644 --- a/src/primaite/simulator/system/applications/database_client.py +++ b/src/primaite/simulator/system/applications/database_client.py @@ -236,7 +236,7 @@ class DatabaseClient(Application): if not connection_id: msg = "Cannot run sql query, could not establish connection with the server." - self.parent.sys_log(msg) + self.parent.sys_log.error(msg) return False uuid = str(uuid4()) From 1eca20157bb7d25689a9b56bb07ebf9e7806107f Mon Sep 17 00:00:00 2001 From: Marek Wolan Date: Tue, 23 Apr 2024 09:04:49 +0000 Subject: [PATCH 123/124] Updated CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index fab36bd8..d6932739 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## 3.0.0b9 - Removed deprecated `PrimaiteSession` class. - Upgraded pydantic to version 2.7.0 +- Upgraded Ray to version >= 2.9 - Added ipywidgets to the dependencies ## [Unreleased] From 8e008b6d24398c289e23cf55457a05cbf72a5194 Mon Sep 17 00:00:00 2001 From: Marek Wolan Date: Tue, 23 Apr 2024 13:54:56 +0100 Subject: [PATCH 124/124] #2511 Appease isort pre commit hook --- src/primaite/game/agent/observations/observations.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/primaite/game/agent/observations/observations.py b/src/primaite/game/agent/observations/observations.py index 518fdf9f..1ba87a30 100644 --- a/src/primaite/game/agent/observations/observations.py +++ b/src/primaite/game/agent/observations/observations.py @@ -1,6 +1,6 @@ """Manages the observation space for the agent.""" from abc import ABC, abstractmethod -from typing import Any, Dict, Iterable, Type, Optional, Union +from typing import Any, Dict, Iterable, Optional, Type, Union from gymnasium import spaces from gymnasium.core import ObsType