2023-07-17 19:28:43 +01:00
.. only :: comment
2023-07-17 19:57:34 +01:00
Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence.
2023-07-17 19:28:43 +01:00
2023-03-28 17:33:34 +01:00
.. _config:
The Config Files Explained
==========================
PrimAITE uses two configuration files for its operation:
2023-06-07 22:40:16 +01:00
* **The Training Config**
2023-03-28 17:33:34 +01:00
2023-06-07 22:40:16 +01:00
Used to define the top-level settings of the PrimAITE environment, the reward values, and the session that is to be run.
2023-03-28 17:33:34 +01:00
2023-06-07 22:40:16 +01:00
* **The Lay Down Config**
Used to define the low-level settings of a session, including the network laydown, green / red agent information exchange requirements (IERSs) and Access Control Rules.
Environment Config:
***** ***** ***** *** *
The environment config file consists of the following attributes:
2023-03-28 17:33:34 +01:00
**Generic Config Values**
2023-06-13 09:42:54 +01:00
* **agent_framework** [enum]
2023-06-30 09:08:13 +01:00
2023-06-13 09:42:54 +01:00
This identifies the agent framework to be used to instantiate the agent algorithm. Select from one of the following:
* NONE - Where a user developed agent is to be used
* SB3 - Stable Baselines3
* RLLIB - Ray RLlib.
2023-06-20 16:06:55 +01:00
* **agent_identifier**
2023-06-30 09:08:13 +01:00
2023-06-13 09:42:54 +01:00
This identifies the agent to use for the session. Select from one of the following:
* A2C - Advantage Actor Critic
* PPO - Proximal Policy Optimization
* HARDCODED - A custom built deterministic agent
* RANDOM - A Stochastic random agent
2023-03-28 17:33:34 +01:00
2023-07-03 12:18:58 +01:00
* **random_red_agent** [bool]
Determines if the session should be run with a random red agent
2023-06-07 22:40:16 +01:00
* **action_type** [enum]
2023-03-28 17:33:34 +01:00
2023-06-13 09:42:54 +01:00
Determines whether a NODE, ACL, or ANY (combined NODE & ACL) action space format is adopted for the session
2023-03-28 17:33:34 +01:00
2023-07-07 13:52:14 +01:00
* **OBSERVATION_SPACE** [dict]
Allows for user to configure observation space by combining one or more observation components. List of available
components is in :py:mod: `primaite.environment.observations` .
The observation space config item should have a `` components `` key which is a list of components. Each component
config must have a `` name `` key, and can optionally have an `` options `` key. The `` options `` are passed to the
component while it is being initialised.
This example illustrates the correct format for the observation space config item
.. code-block :: yaml
observation_space:
components:
- name: NODE_LINK_TABLE
- name: NODE_STATUSES
- name: LINK_TRAFFIC_LEVELS
2023-07-17 13:44:16 +01:00
- name: ACCESS_CONTROL_LIST
2023-07-07 13:52:14 +01:00
options:
combine_service_traffic : False
quantisation_levels: 99
Currently available components are:
* :py:mod: `NODE_LINK_TABLE<primaite.environment.observations.NodeLinkTable>` this does not accept any additional options
* :py:mod: `NODE_STATUSES<primaite.environment.observations.NodeStatuses>` , this does not accept any additional options
2023-07-17 13:44:16 +01:00
* :py:mod: `ACCESS_CONTROL_LIST<primaite.environment.observations.AccessControlList>` , this does not accept additional options
2023-07-07 13:52:14 +01:00
* :py:mod: `LINK_TRAFFIC_LEVELS<primaite.environment.observations.LinkTrafficLevels>` , this accepts the following options:
* `` combine_service_traffic `` - whether to consider bandwidth use separately for each network protocol or combine them into a single bandwidth reading (boolean)
* `` quantisation_levels `` - how many discrete bandwidth usage levels to use for encoding. This can be an integer equal to or greater than 3.
2023-07-07 14:24:37 +01:00
The other configurable item is `` flatten `` which is false by default. When set to true, the observation space is flattened (turned into a 1-D vector). You should use this if your RL agent does not natively support observation space types like `` gym.Spaces.Tuple `` .
2023-07-07 13:52:14 +01:00
2023-07-11 12:40:25 +01:00
* **num_train_episodes** [int]
2023-03-28 17:33:34 +01:00
2023-07-11 12:40:25 +01:00
This defines the number of episodes that the agent will train for.
2023-03-28 17:33:34 +01:00
2023-06-07 22:40:16 +01:00
2023-07-11 12:40:25 +01:00
* **num_train_steps** [int]
Determines the number of steps to run in each episode of the training session.
* **num_eval_episodes** [int]
This defines the number of episodes that the agent will be evaluated over.
* **num_eval_steps** [int]
Determines the number of steps to run in each episode of the evaluation session.
2023-04-06 11:04:09 +01:00
2023-06-07 22:40:16 +01:00
* **time_delay** [int]
2023-06-13 09:42:54 +01:00
The time delay (in milliseconds) to take between each step when running a GENERIC agent session
2023-06-07 22:40:16 +01:00
* **session_type** [text]
2023-04-06 11:04:09 +01:00
2023-06-13 09:42:54 +01:00
Type of session to be run (TRAINING, EVALUATION, or BOTH)
2023-04-06 11:04:09 +01:00
2023-06-07 22:40:16 +01:00
* **load_agent** [bool]
2023-04-06 11:04:09 +01:00
2023-06-13 09:42:54 +01:00
Determine whether to load an agent from file
2023-04-06 11:04:09 +01:00
2023-06-07 22:40:16 +01:00
* **agent_load_file** [text]
2023-04-06 11:04:09 +01:00
2023-06-13 09:42:54 +01:00
File path and file name of agent if you're loading one in
2023-03-28 17:33:34 +01:00
2023-06-07 22:40:16 +01:00
* **observation_space_high_value** [int]
2023-03-28 17:33:34 +01:00
2023-06-13 09:42:54 +01:00
The high value to use for values in the observation space. This is set to 1000000000 by default, and should not need changing in most cases
2023-03-28 17:33:34 +01:00
2023-07-17 10:08:12 +01:00
* **implicit_acl_rule** [str]
Determines which Explicit rule the ACL list has - two options are: DENY or ALLOW.
* **max_number_acl_rules** [int]
Sets a limit on how many ACL rules there can be in the ACL list throughout the training session.
2023-03-28 17:33:34 +01:00
**Reward-Based Config Values**
2023-06-09 20:31:12 +00:00
Rewards are calculated based on the difference between the current state and reference state (the 'should be' state) of the environment.
2023-07-06 12:56:24 +01:00
* **Generic [all_ok]** [float]
2023-03-28 17:33:34 +01:00
2023-06-13 09:42:54 +01:00
The score to give when the current situation (for a given component) is no different from that expected in the baseline (i.e. as though no blue or red agent actions had been undertaken)
2023-03-28 17:33:34 +01:00
2023-07-06 12:56:24 +01:00
* **Node Hardware State [off_should_be_on]** [float]
2023-03-28 17:33:34 +01:00
2023-06-13 09:42:54 +01:00
The score to give when the node should be on, but is off
2023-03-28 17:33:34 +01:00
2023-07-06 12:56:24 +01:00
* **Node Hardware State [off_should_be_resetting]** [float]
2023-03-28 17:33:34 +01:00
2023-06-13 09:42:54 +01:00
The score to give when the node should be resetting, but is off
2023-03-28 17:33:34 +01:00
2023-07-06 12:56:24 +01:00
* **Node Hardware State [on_should_be_off]** [float]
2023-05-25 11:42:19 +01:00
2023-06-13 09:42:54 +01:00
The score to give when the node should be off, but is on
2023-03-28 17:33:34 +01:00
2023-07-06 12:56:24 +01:00
* **Node Hardware State [on_should_be_resetting]** [float]
2023-05-25 11:42:19 +01:00
2023-06-13 09:42:54 +01:00
The score to give when the node should be resetting, but is on
2023-03-28 17:33:34 +01:00
2023-07-06 12:56:24 +01:00
* **Node Hardware State [resetting_should_be_on]** [float]
2023-05-25 11:42:19 +01:00
2023-06-13 09:42:54 +01:00
The score to give when the node should be on, but is resetting
2023-03-28 17:33:34 +01:00
2023-07-06 12:56:24 +01:00
* **Node Hardware State [resetting_should_be_off]** [float]
2023-05-25 11:42:19 +01:00
2023-06-13 09:42:54 +01:00
The score to give when the node should be off, but is resetting
2023-03-28 17:33:34 +01:00
2023-07-06 12:56:24 +01:00
* **Node Hardware State [resetting]** [float]
2023-05-25 11:42:19 +01:00
2023-06-13 09:42:54 +01:00
The score to give when the node is resetting
2023-04-06 11:04:09 +01:00
2023-07-06 12:56:24 +01:00
* **Node Operating System or Service State [good_should_be_patching]** [float]
2023-05-25 11:42:19 +01:00
2023-06-13 09:42:54 +01:00
The score to give when the state should be patching, but is good
2023-03-28 17:33:34 +01:00
2023-07-06 12:56:24 +01:00
* **Node Operating System or Service State [good_should_be_compromised]** [float]
2023-05-25 11:42:19 +01:00
2023-06-13 09:42:54 +01:00
The score to give when the state should be compromised, but is good
2023-03-28 17:33:34 +01:00
2023-07-06 12:56:24 +01:00
* **Node Operating System or Service State [good_should_be_overwhelmed]** [float]
2023-05-25 11:42:19 +01:00
2023-06-13 09:42:54 +01:00
The score to give when the state should be overwhelmed, but is good
2023-03-28 17:33:34 +01:00
2023-07-06 12:56:24 +01:00
* **Node Operating System or Service State [patching_should_be_good]** [float]
2023-05-25 11:42:19 +01:00
2023-06-13 09:42:54 +01:00
The score to give when the state should be good, but is patching
2023-03-28 17:33:34 +01:00
2023-07-06 12:56:24 +01:00
* **Node Operating System or Service State [patching_should_be_compromised]** [float]
2023-05-25 11:42:19 +01:00
2023-06-13 09:42:54 +01:00
The score to give when the state should be compromised, but is patching
2023-03-28 17:33:34 +01:00
2023-07-06 12:56:24 +01:00
* **Node Operating System or Service State [patching_should_be_overwhelmed]** [float]
2023-05-25 11:42:19 +01:00
2023-06-13 09:42:54 +01:00
The score to give when the state should be overwhelmed, but is patching
2023-03-28 17:33:34 +01:00
2023-07-06 12:56:24 +01:00
* **Node Operating System or Service State [patching]** [float]
2023-05-25 11:42:19 +01:00
2023-06-13 09:42:54 +01:00
The score to give when the state is patching
2023-04-06 11:04:09 +01:00
2023-07-06 12:56:24 +01:00
* **Node Operating System or Service State [compromised_should_be_good]** [float]
2023-05-25 11:42:19 +01:00
2023-06-13 09:42:54 +01:00
The score to give when the state should be good, but is compromised
2023-03-28 17:33:34 +01:00
2023-07-06 12:56:24 +01:00
* **Node Operating System or Service State [compromised_should_be_patching]** [float]
2023-05-25 11:42:19 +01:00
2023-06-13 09:42:54 +01:00
The score to give when the state should be patching, but is compromised
2023-03-28 17:33:34 +01:00
2023-07-06 12:56:24 +01:00
* **Node Operating System or Service State [compromised_should_be_overwhelmed]** [float]
2023-05-25 11:42:19 +01:00
2023-06-13 09:42:54 +01:00
The score to give when the state should be overwhelmed, but is compromised
2023-03-28 17:33:34 +01:00
2023-07-06 12:56:24 +01:00
* **Node Operating System or Service State [compromised]** [float]
2023-05-25 11:42:19 +01:00
2023-06-13 09:42:54 +01:00
The score to give when the state is compromised
2023-03-28 17:33:34 +01:00
2023-07-06 12:56:24 +01:00
* **Node Operating System or Service State [overwhelmed_should_be_good]** [float]
2023-05-25 11:42:19 +01:00
2023-06-13 09:42:54 +01:00
The score to give when the state should be good, but is overwhelmed
2023-03-28 17:33:34 +01:00
2023-07-06 12:56:24 +01:00
* **Node Operating System or Service State [overwhelmed_should_be_patching]** [float]
2023-05-25 11:42:19 +01:00
2023-06-13 09:42:54 +01:00
The score to give when the state should be patching, but is overwhelmed
2023-03-28 17:33:34 +01:00
2023-07-06 12:56:24 +01:00
* **Node Operating System or Service State [overwhelmed_should_be_compromised]** [float]
2023-05-25 11:42:19 +01:00
2023-06-13 09:42:54 +01:00
The score to give when the state should be compromised, but is overwhelmed
2023-03-28 17:33:34 +01:00
2023-07-06 12:56:24 +01:00
* **Node Operating System or Service State [overwhelmed]** [float]
2023-05-25 11:42:19 +01:00
2023-06-13 09:42:54 +01:00
The score to give when the state is overwhelmed
2023-03-28 17:33:34 +01:00
2023-07-06 12:56:24 +01:00
* **Node File System State [good_should_be_repairing]** [float]
2023-04-06 11:04:09 +01:00
The score to give when the state should be repairing, but is good
2023-07-06 12:56:24 +01:00
* **Node File System State [good_should_be_restoring]** [float]
2023-04-06 11:04:09 +01:00
The score to give when the state should be restoring, but is good
2023-07-06 12:56:24 +01:00
* **Node File System State [good_should_be_corrupt]** [float]
2023-04-06 11:04:09 +01:00
The score to give when the state should be corrupt, but is good
2023-07-06 12:56:24 +01:00
* **Node File System State [good_should_be_destroyed]** [float]
2023-04-06 11:04:09 +01:00
The score to give when the state should be destroyed, but is good
2023-07-06 12:56:24 +01:00
* **Node File System State [repairing_should_be_good]** [float]
2023-04-06 11:04:09 +01:00
The score to give when the state should be good, but is repairing
2023-07-06 12:56:24 +01:00
* **Node File System State [repairing_should_be_restoring]** [float]
2023-04-06 11:04:09 +01:00
The score to give when the state should be restoring, but is repairing
2023-07-06 12:56:24 +01:00
* **Node File System State [repairing_should_be_corrupt]** [float]
2023-04-06 11:04:09 +01:00
The score to give when the state should be corrupt, but is repairing
2023-07-06 12:56:24 +01:00
* **Node File System State [repairing_should_be_destroyed]** [float]
2023-04-06 11:04:09 +01:00
The score to give when the state should be destroyed, but is repairing
2023-07-06 12:56:24 +01:00
* **Node File System State [repairing]** [float]
2023-04-06 11:04:09 +01:00
The score to give when the state is repairing
2023-07-06 12:56:24 +01:00
* **Node File System State [restoring_should_be_good]** [float]
2023-04-06 11:04:09 +01:00
The score to give when the state should be good, but is restoring
2023-07-06 12:56:24 +01:00
* **Node File System State [restoring_should_be_repairing]** [float]
2023-04-06 11:04:09 +01:00
The score to give when the state should be repairing, but is restoring
2023-07-06 12:56:24 +01:00
* **Node File System State [restoring_should_be_corrupt]** [float]
2023-04-06 11:04:09 +01:00
The score to give when the state should be corrupt, but is restoring
2023-07-06 12:56:24 +01:00
* **Node File System State [restoring_should_be_destroyed]** [float]
2023-04-06 11:04:09 +01:00
The score to give when the state should be destroyed, but is restoring
2023-07-06 12:56:24 +01:00
* **Node File System State [restoring]** [float]
2023-04-06 11:04:09 +01:00
The score to give when the state is restoring
2023-07-06 12:56:24 +01:00
* **Node File System State [corrupt_should_be_good]** [float]
2023-04-06 11:04:09 +01:00
The score to give when the state should be good, but is corrupt
2023-07-06 12:56:24 +01:00
* **Node File System State [corrupt_should_be_repairing]** [float]
2023-04-06 11:04:09 +01:00
The score to give when the state should be repairing, but is corrupt
2023-07-06 12:56:24 +01:00
* **Node File System State [corrupt_should_be_restoring]** [float]
2023-04-06 11:04:09 +01:00
The score to give when the state should be restoring, but is corrupt
2023-07-06 12:56:24 +01:00
* **Node File System State [corrupt_should_be_destroyed]** [float]
2023-04-06 11:04:09 +01:00
The score to give when the state should be destroyed, but is corrupt
2023-07-06 12:56:24 +01:00
* **Node File System State [corrupt]** [float]
2023-04-06 11:04:09 +01:00
The score to give when the state is corrupt
2023-07-06 12:56:24 +01:00
* **Node File System State [destroyed_should_be_good]** [float]
2023-04-06 11:04:09 +01:00
The score to give when the state should be good, but is destroyed
2023-07-06 12:56:24 +01:00
* **Node File System State [destroyed_should_be_repairing]** [float]
2023-04-06 11:04:09 +01:00
The score to give when the state should be repairing, but is destroyed
2023-07-06 12:56:24 +01:00
* **Node File System State [destroyed_should_be_restoring]** [float]
2023-04-06 11:04:09 +01:00
The score to give when the state should be restoring, but is destroyed
2023-07-06 12:56:24 +01:00
* **Node File System State [destroyed_should_be_corrupt]** [float]
2023-04-06 11:04:09 +01:00
The score to give when the state should be corrupt, but is destroyed
2023-07-06 12:56:24 +01:00
* **Node File System State [destroyed]** [float]
2023-04-06 11:04:09 +01:00
The score to give when the state is destroyed
2023-07-06 12:56:24 +01:00
* **Node File System State [scanning]** [float]
2023-04-06 11:04:09 +01:00
The score to give when the state is scanning
2023-07-06 12:56:24 +01:00
* **IER Status [red_ier_running]** [float]
2023-05-25 11:42:19 +01:00
2023-06-13 09:42:54 +01:00
The score to give when a red agent IER is permitted to run
2023-03-28 17:33:34 +01:00
2023-07-06 12:56:24 +01:00
* **IER Status [green_ier_blocked]** [float]
2023-05-25 11:42:19 +01:00
2023-06-13 09:42:54 +01:00
The score to give when a green agent IER is prevented from running
2023-03-28 17:33:34 +01:00
**Patching / Reset Durations**
2023-06-07 22:40:16 +01:00
* **os_patching_duration** [int]
2023-03-28 17:33:34 +01:00
2023-06-13 09:42:54 +01:00
The number of steps to take when patching an Operating System
2023-03-28 17:33:34 +01:00
2023-06-07 22:40:16 +01:00
* **node_reset_duration** [int]
2023-05-25 11:42:19 +01:00
2023-06-13 09:42:54 +01:00
The number of steps to take when resetting a node's hardware state
2023-03-28 17:33:34 +01:00
2023-06-07 22:40:16 +01:00
* **service_patching_duration** [int]
2023-05-25 11:42:19 +01:00
2023-06-13 09:42:54 +01:00
The number of steps to take when patching a service
2023-03-28 17:33:34 +01:00
2023-06-07 22:40:16 +01:00
* **file_system_repairing_limit** [int]:
2023-04-06 11:04:09 +01:00
2023-06-13 09:42:54 +01:00
The number of steps to take when repairing the file system
2023-04-06 11:04:09 +01:00
2023-06-07 22:40:16 +01:00
* **file_system_restoring_limit** [int]
2023-04-06 11:04:09 +01:00
2023-06-13 09:42:54 +01:00
The number of steps to take when restoring the file system
2023-04-06 11:04:09 +01:00
2023-06-07 22:40:16 +01:00
* **file_system_scanning_limit** [int]
2023-04-06 11:04:09 +01:00
2023-06-13 09:42:54 +01:00
The number of steps to take when scanning the file system
2023-04-06 11:04:09 +01:00
2023-06-20 11:19:05 +01:00
* **deterministic** [bool]
2023-07-06 13:27:44 +01:00
Set to true if the agent evaluation should be deterministic. Default is `` False ``
2023-06-20 11:19:05 +01:00
* **seed** [int]
2023-07-06 13:27:44 +01:00
Seed used in the randomisation in agent training. Default is `` None ``
2023-06-20 11:19:05 +01:00
2023-06-07 22:40:16 +01:00
The Lay Down Config
2023-03-28 17:33:34 +01:00
***** ***** ***** *** *
2023-06-07 22:40:16 +01:00
The lay down config file consists of the following attributes:
2023-03-28 17:33:34 +01:00
2023-06-02 13:23:03 +01:00
2023-03-28 17:33:34 +01:00
* **itemType: STEPS** [int]
2023-05-25 11:42:19 +01:00
2023-06-09 13:11:14 +01:00
* **item_type: PORTS** [int]
2023-05-25 11:42:19 +01:00
2023-06-13 09:42:54 +01:00
Provides a list of ports modelled in this session
2023-03-28 17:33:34 +01:00
2023-06-09 13:11:14 +01:00
* **item_type: SERVICES** [freetext]
2023-05-25 11:42:19 +01:00
2023-06-13 09:42:54 +01:00
Provides a list of services modelled in this session
2023-03-28 17:33:34 +01:00
2023-06-09 13:11:14 +01:00
* **item_type: NODE**
2023-05-25 11:42:19 +01:00
2023-06-13 09:42:54 +01:00
Defines a node included in the system laydown being simulated. It should consist of the following attributes:
2023-03-28 17:33:34 +01:00
* **id** [int]: Unique ID for this YAML item
* **name** [freetext]: Human-readable name of the component
2023-05-25 21:03:11 +01:00
* **node_class** [enum]: Relates to the base type of the node. Can be SERVICE, ACTIVE or PASSIVE. PASSIVE nodes do not have an operating system or services. ACTIVE nodes have an operating system, but no services. SERVICE nodes have both an operating system and one or more services
* **node_type** [enum]: Relates to the component type. Can be one of CCTV, SWITCH, COMPUTER, LINK, MONITOR, PRINTER, LOP, RTU, ACTUATOR or SERVER
2023-03-28 17:33:34 +01:00
* **priority** [enum]: Provides a priority for each node. Can be one of P1, P2, P3, P4 or P5 (which P1 being the highest)
2023-05-25 21:03:11 +01:00
* **hardware_state** [enum]: The initial hardware state of the node. Can be one of ON, OFF or RESETTING
* **ip_address** [IP address]: The IP address of the component in format xxx.xxx.xxx.xxx
* **software_state** [enum]: The intial state of the node operating system. Can be GOOD, PATCHING or COMPROMISED
* **file_system_state** [enum]: The initial state of the node file system. Can be GOOD, CORRUPT, DESTROYED, REPAIRING or RESTORING
2023-03-28 17:33:34 +01:00
* **services** : For each service associated with the node:
* **name** [freetext]: Free-text name of the service, but must match one of the services defined for the system in the services list
* **port** [int]: Integer value of the port related to this service, but must match one of the ports defined for the system in the ports list
* **state** [enum]: The initial state of the service. Can be one of GOOD, PATCHING, COMPROMISED or OVERWHELMED
2023-05-25 11:42:19 +01:00
2023-06-09 13:11:14 +01:00
* **item_type: LINK**
2023-05-25 11:42:19 +01:00
2023-06-13 09:42:54 +01:00
Defines a link included in the system laydown being simulated. It should consist of the following attributes:
2023-03-28 17:33:34 +01:00
* **id** [int]: Unique ID for this YAML item
* **name** [freetext]: Human-readable name of the component
* **bandwidth** [int]: The bandwidth (in bits/s) of the link
* **source** [int]: The ID of the source node
* **destination** [int]: The ID of the destination node
2023-06-09 13:11:14 +01:00
* **item_type: GREEN_IER**
2023-03-28 17:33:34 +01:00
2023-06-13 09:42:54 +01:00
Defines a green agent Information Exchange Requirement (IER). It should consist of:
2023-03-28 17:33:34 +01:00
* **id** [int]: Unique ID for this YAML item
2023-06-09 13:11:14 +01:00
* **start_step** [int]: The start step (in the episode) for this IER to begin
* **end_step** [int]: The end step (in the episode) for this IER to finish
2023-03-28 17:33:34 +01:00
* **load** [int]: The load (in bits/s) for this IER to apply to links
* **protocol** [freetext]: The protocol to apply to the links. This must match a value in the services list
* **port** [int]: The port that the protocol is running on. This must match a value in the ports list
* **source** [int]: The ID of the source node
* **destination** [int]: The ID of the destination node
2023-06-09 13:11:14 +01:00
* **mission_criticality** [enum]: The mission criticality of this IER (with 5 being highest, 1 lowest)
2023-03-28 17:33:34 +01:00
2023-06-09 13:11:14 +01:00
* **item_type: RED_IER**
2023-05-25 11:42:19 +01:00
2023-06-13 09:42:54 +01:00
Defines a red agent Information Exchange Requirement (IER). It should consist of:
2023-03-28 17:33:34 +01:00
* **id** [int]: Unique ID for this YAML item
2023-06-09 13:11:14 +01:00
* **start_step** [int]: The start step (in the episode) for this IER to begin
* **end_step** [int]: The end step (in the episode) for this IER to finish
2023-03-28 17:33:34 +01:00
* **load** [int]: The load (in bits/s) for this IER to apply to links
* **protocol** [freetext]: The protocol to apply to the links. This must match a value in the services list
* **port** [int]: The port that the protocol is running on. This must match a value in the ports list
* **source** [int]: The ID of the source node
* **destination** [int]: The ID of the destination node
2023-06-09 13:11:14 +01:00
* **mission_criticality** [enum]: Not currently used. Default to 0
2023-03-28 17:33:34 +01:00
2023-06-09 13:11:14 +01:00
* **item_type: GREEN_POL**
2023-05-25 11:42:19 +01:00
2023-03-28 17:33:34 +01:00
Defines a green agent pattern-of-life instruction. It should consist of:
* **id** [int]: Unique ID for this YAML item
2023-06-09 13:11:14 +01:00
* **start_step** [int]: The start step (in the episode) for this PoL to begin
* **end_step** [int]: Not currently used. Default to same as start step
2023-04-06 11:04:09 +01:00
* **nodeId** [int]: The ID of the node to apply the PoL to
2023-03-28 17:33:34 +01:00
* **type** [enum]: The type of PoL to apply. Can be one of OPERATING, OS or SERVICE
* **protocol** [freetext]: The protocol to be affected if SERVICE type is chosen. Must match a value in the services list
2023-05-25 21:03:11 +01:00
* **state** [enuum]: The state to apply to the node (which represents the PoL change). Can be one of ON, OFF or RESETTING (for node state) or GOOD, PATCHING or COMPROMISED (for Software State) or GOOD, PATCHING, COMPROMISED or OVERWHELMED (for service state)
2023-03-28 17:33:34 +01:00
2023-06-09 13:11:14 +01:00
* **item_type: RED_POL**
2023-05-25 11:42:19 +01:00
2023-03-28 17:33:34 +01:00
Defines a red agent pattern-of-life instruction. It should consist of:
* **id** [int]: Unique ID for this YAML item
2023-06-09 13:11:14 +01:00
* **start_step** [int]: The start step (in the episode) for this PoL to begin
* **end_step** [int]: Not currently used. Default to same as start step
2023-04-06 11:04:09 +01:00
* **targetNodeId** [int]: The ID of the node to apply the PoL to
* **initiator** [enum]: What initiates the PoL. Can be DIRECT, IER or SERVICE
2023-03-28 17:33:34 +01:00
* **type** [enum]: The type of PoL to apply. Can be one of OPERATING, OS or SERVICE
* **protocol** [freetext]: The protocol to be affected if SERVICE type is chosen. Must match a value in the services list
2023-05-25 21:03:11 +01:00
* **state** [enum]: The state to apply to the node (which represents the PoL change). Can be one of ON, OFF or RESETTING (for node state) or GOOD, PATCHING or COMPROMISED (for Software State) or GOOD, PATCHING, COMPROMISED or OVERWHELMED (for service state) or GOOD, CORRUPT, DESTROYED, REPAIRING or RESTORING (for file system state)
2023-04-06 11:04:09 +01:00
* **sourceNodeId** [int] The ID of the source node containing the service to check (used for SERVICE initiator)
* **sourceNodeService** [freetext]: The service on the source node to check (used for SERVICE initiator). Must match a value in the services list for this node
* **sourceNodeServiceState** [enum]: The state of the source node service to check (used for SERVICE initiator). Can be one of GOOD, PATCHING, COMPROMISED or OVERWHELMED
2023-03-28 17:33:34 +01:00
2023-06-09 13:11:14 +01:00
* **item_type: ACL_RULE**
2023-05-25 11:42:19 +01:00
2023-03-28 17:33:34 +01:00
Defines an initial Access Control List (ACL) rule. It should consist of:
* **id** [int]: Unique ID for this YAML item
* **permission** [enum]: Defines either an allow or deny rule. Value must be either DENY or ALLOW
* **source** [IP address]: Defines the source IP address for the rule in xxx.xxx.xxx.xxx format
* **destination** [IP address]: Defines the destination IP address for the rule in xxx.xxx.xxx.xxx format
* **protocol** [freetext]: Defines the protocol for the rule. Must match a value in the services list
2023-05-25 11:42:19 +01:00
* **port** [int]: Defines the port for the rule. Must match a value in the ports list
2023-07-17 13:00:58 +01:00
* **position** [int]: Defines where to place the ACL rule in the list. Lower index or (higher up in the list) means they are checked first. Index starts at 0 (Python indexes).