Update actions
This commit is contained in:
@@ -238,99 +238,196 @@ agents:
|
|||||||
3:
|
3:
|
||||||
action: "NODE_SERVICE_START"
|
action: "NODE_SERVICE_START"
|
||||||
options:
|
options:
|
||||||
node_id: 1
|
node_id: 1
|
||||||
service_id: 0
|
service_id: 0
|
||||||
4:
|
4:
|
||||||
action: "NODE_SERVICE_PAUSE"
|
action: "NODE_SERVICE_PAUSE"
|
||||||
options:
|
options:
|
||||||
node_id: 1
|
node_id: 1
|
||||||
service_id: 0
|
service_id: 0
|
||||||
5:
|
5:
|
||||||
action: "NODE_SERVICE_RESUME"
|
action: "NODE_SERVICE_RESUME"
|
||||||
options:
|
options:
|
||||||
node_id: 1
|
node_id: 1
|
||||||
service_id: 0
|
service_id: 0
|
||||||
6:
|
6:
|
||||||
action: "NODE_SERVICE_RESTART"
|
action: "NODE_SERVICE_RESTART"
|
||||||
options:
|
options:
|
||||||
node_id: 1
|
node_id: 1
|
||||||
service_id: 0
|
service_id: 0
|
||||||
7:
|
7:
|
||||||
action: "NODE_SERVICE_DISABLE"
|
action: "NODE_SERVICE_DISABLE"
|
||||||
options:
|
options:
|
||||||
node_id: 1
|
node_id: 1
|
||||||
service_id: 0
|
service_id: 0
|
||||||
8:
|
8:
|
||||||
action: "NODE_SERVICE_ENABLE"
|
action: "NODE_SERVICE_ENABLE"
|
||||||
options:
|
options:
|
||||||
node_id: 1
|
node_id: 1
|
||||||
service_id: 0
|
service_id: 0
|
||||||
9: # check database.db file
|
9: # check database.db file
|
||||||
action: "NODE_FILE_SCAN"
|
action: "NODE_FILE_SCAN"
|
||||||
options:
|
options:
|
||||||
node_id: 2
|
node_id: 2
|
||||||
folder_id: 0
|
folder_id: 0
|
||||||
file_id: 0
|
file_id: 0
|
||||||
10:
|
10:
|
||||||
action: "NODE_FILE_CHECKHASH"
|
action: "NODE_FILE_CHECKHASH"
|
||||||
options:
|
options:
|
||||||
node_id: 2
|
node_id: 2
|
||||||
folder_id: 0
|
folder_id: 0
|
||||||
file_id: 0
|
file_id: 0
|
||||||
11:
|
11:
|
||||||
action: "NODE_FILE_DELETE"
|
action: "NODE_FILE_DELETE"
|
||||||
options:
|
options:
|
||||||
node_id: 2
|
node_id: 2
|
||||||
folder_id: 0
|
folder_id: 0
|
||||||
file_id: 0
|
file_id: 0
|
||||||
12:
|
12:
|
||||||
action: "NODE_FILE_REPAIR"
|
action: "NODE_FILE_REPAIR"
|
||||||
options:
|
options:
|
||||||
node_id: 2
|
node_id: 2
|
||||||
folder_id: 0
|
folder_id: 0
|
||||||
file_id: 0
|
file_id: 0
|
||||||
13:
|
13:
|
||||||
action: "NODE_SERVICE_PATCH"
|
action: "NODE_SERVICE_PATCH"
|
||||||
options:
|
options:
|
||||||
node_id: 2
|
node_id: 2
|
||||||
service_id: 0
|
service_id: 0
|
||||||
14:
|
14:
|
||||||
action: "NODE_FOLDER_SCAN"
|
action: "NODE_FOLDER_SCAN"
|
||||||
options:
|
options:
|
||||||
node_id: 2
|
node_id: 2
|
||||||
folder_id: 0
|
folder_id: 0
|
||||||
15:
|
15:
|
||||||
action: "NODE_FOLDER_CHECKHASH"
|
action: "NODE_FOLDER_CHECKHASH"
|
||||||
options:
|
options:
|
||||||
node_id: 2
|
node_id: 2
|
||||||
folder_id: 0
|
folder_id: 0
|
||||||
16:
|
16:
|
||||||
action: "NODE_FOLDER_REPAIR"
|
action: "NODE_FOLDER_REPAIR"
|
||||||
options:
|
options:
|
||||||
node_id: 2
|
node_id: 2
|
||||||
folder_id: 0
|
folder_id: 0
|
||||||
17:
|
17:
|
||||||
action: "NODE_FOLDER_RESTORE"
|
action: "NODE_FOLDER_RESTORE"
|
||||||
options:
|
options:
|
||||||
node_id: 2
|
node_id: 2
|
||||||
folder_id: 0
|
folder_id: 0
|
||||||
18:
|
18:
|
||||||
action: "NODE_OS_SCAN"
|
action: "NODE_OS_SCAN"
|
||||||
options:
|
options:
|
||||||
node_id: 2
|
node_id: 0
|
||||||
19: # shutdown client 1
|
19:
|
||||||
action: "NODE_SHUTDOWN"
|
action: "NODE_SHUTDOWN"
|
||||||
options:
|
options:
|
||||||
node_id: 5
|
node_id: 0
|
||||||
20:
|
20:
|
||||||
action: "NODE_STARTUP"
|
action: NODE_STARTUP
|
||||||
options:
|
options:
|
||||||
node_id: 5
|
node_id: 0
|
||||||
21:
|
21:
|
||||||
action: "NODE_RESET"
|
action: NODE_RESET
|
||||||
options:
|
options:
|
||||||
node_id: 5
|
node_id: 0
|
||||||
22: # "ACL: ADDRULE - Block outgoing traffic from client 1"
|
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"
|
action: "NETWORK_ACL_ADDRULE"
|
||||||
options:
|
options:
|
||||||
position: 1
|
position: 1
|
||||||
@@ -340,7 +437,7 @@ agents:
|
|||||||
source_port_id: 1
|
source_port_id: 1
|
||||||
dest_port_id: 1
|
dest_port_id: 1
|
||||||
protocol_id: 1
|
protocol_id: 1
|
||||||
23: # "ACL: ADDRULE - Block outgoing traffic from client 2"
|
47: # old action num: 23 # "ACL: ADDRULE - Block outgoing traffic from client 2"
|
||||||
action: "NETWORK_ACL_ADDRULE"
|
action: "NETWORK_ACL_ADDRULE"
|
||||||
options:
|
options:
|
||||||
position: 2
|
position: 2
|
||||||
@@ -350,7 +447,7 @@ agents:
|
|||||||
source_port_id: 1
|
source_port_id: 1
|
||||||
dest_port_id: 1
|
dest_port_id: 1
|
||||||
protocol_id: 1
|
protocol_id: 1
|
||||||
24: # block tcp traffic from client 1 to web app
|
48: # old action num: 24 # block tcp traffic from client 1 to web app
|
||||||
action: "NETWORK_ACL_ADDRULE"
|
action: "NETWORK_ACL_ADDRULE"
|
||||||
options:
|
options:
|
||||||
position: 3
|
position: 3
|
||||||
@@ -360,7 +457,7 @@ agents:
|
|||||||
source_port_id: 1
|
source_port_id: 1
|
||||||
dest_port_id: 1
|
dest_port_id: 1
|
||||||
protocol_id: 3
|
protocol_id: 3
|
||||||
25: # block tcp traffic from client 2 to web app
|
49: # old action num: 25 # block tcp traffic from client 2 to web app
|
||||||
action: "NETWORK_ACL_ADDRULE"
|
action: "NETWORK_ACL_ADDRULE"
|
||||||
options:
|
options:
|
||||||
position: 4
|
position: 4
|
||||||
@@ -370,7 +467,7 @@ agents:
|
|||||||
source_port_id: 1
|
source_port_id: 1
|
||||||
dest_port_id: 1
|
dest_port_id: 1
|
||||||
protocol_id: 3
|
protocol_id: 3
|
||||||
26:
|
50: # old action num: 26
|
||||||
action: "NETWORK_ACL_ADDRULE"
|
action: "NETWORK_ACL_ADDRULE"
|
||||||
options:
|
options:
|
||||||
position: 5
|
position: 5
|
||||||
@@ -380,7 +477,7 @@ agents:
|
|||||||
source_port_id: 1
|
source_port_id: 1
|
||||||
dest_port_id: 1
|
dest_port_id: 1
|
||||||
protocol_id: 3
|
protocol_id: 3
|
||||||
27:
|
51: # old action num: 27
|
||||||
action: "NETWORK_ACL_ADDRULE"
|
action: "NETWORK_ACL_ADDRULE"
|
||||||
options:
|
options:
|
||||||
position: 6
|
position: 6
|
||||||
@@ -390,128 +487,129 @@ agents:
|
|||||||
source_port_id: 1
|
source_port_id: 1
|
||||||
dest_port_id: 1
|
dest_port_id: 1
|
||||||
protocol_id: 3
|
protocol_id: 3
|
||||||
28:
|
52: # old action num: 28
|
||||||
action: "NETWORK_ACL_REMOVERULE"
|
action: "NETWORK_ACL_REMOVERULE"
|
||||||
options:
|
options:
|
||||||
position: 0
|
position: 0
|
||||||
29:
|
53: # old action num: 29
|
||||||
action: "NETWORK_ACL_REMOVERULE"
|
action: "NETWORK_ACL_REMOVERULE"
|
||||||
options:
|
options:
|
||||||
position: 1
|
position: 1
|
||||||
30:
|
54: # old action num: 30
|
||||||
action: "NETWORK_ACL_REMOVERULE"
|
action: "NETWORK_ACL_REMOVERULE"
|
||||||
options:
|
options:
|
||||||
position: 2
|
position: 2
|
||||||
31:
|
55: # old action num: 31
|
||||||
action: "NETWORK_ACL_REMOVERULE"
|
action: "NETWORK_ACL_REMOVERULE"
|
||||||
options:
|
options:
|
||||||
position: 3
|
position: 3
|
||||||
32:
|
56: # old action num: 32
|
||||||
action: "NETWORK_ACL_REMOVERULE"
|
action: "NETWORK_ACL_REMOVERULE"
|
||||||
options:
|
options:
|
||||||
position: 4
|
position: 4
|
||||||
33:
|
57: # old action num: 33
|
||||||
action: "NETWORK_ACL_REMOVERULE"
|
action: "NETWORK_ACL_REMOVERULE"
|
||||||
options:
|
options:
|
||||||
position: 5
|
position: 5
|
||||||
34:
|
58: # old action num: 34
|
||||||
action: "NETWORK_ACL_REMOVERULE"
|
action: "NETWORK_ACL_REMOVERULE"
|
||||||
options:
|
options:
|
||||||
position: 6
|
position: 6
|
||||||
35:
|
59: # old action num: 35
|
||||||
action: "NETWORK_ACL_REMOVERULE"
|
action: "NETWORK_ACL_REMOVERULE"
|
||||||
options:
|
options:
|
||||||
position: 7
|
position: 7
|
||||||
36:
|
60: # old action num: 36
|
||||||
action: "NETWORK_ACL_REMOVERULE"
|
action: "NETWORK_ACL_REMOVERULE"
|
||||||
options:
|
options:
|
||||||
position: 8
|
position: 8
|
||||||
37:
|
61: # old action num: 37
|
||||||
action: "NETWORK_ACL_REMOVERULE"
|
action: "NETWORK_ACL_REMOVERULE"
|
||||||
options:
|
options:
|
||||||
position: 9
|
position: 9
|
||||||
38:
|
62: # old action num: 38
|
||||||
action: "NETWORK_NIC_DISABLE"
|
action: "NETWORK_NIC_DISABLE"
|
||||||
options:
|
options:
|
||||||
node_id: 0
|
node_id: 0
|
||||||
nic_id: 0
|
nic_id: 0
|
||||||
39:
|
63: # old action num: 39
|
||||||
action: "NETWORK_NIC_ENABLE"
|
action: "NETWORK_NIC_ENABLE"
|
||||||
options:
|
options:
|
||||||
node_id: 0
|
node_id: 0
|
||||||
nic_id: 0
|
nic_id: 0
|
||||||
40:
|
64: # old action num: 40
|
||||||
action: "NETWORK_NIC_DISABLE"
|
action: "NETWORK_NIC_DISABLE"
|
||||||
options:
|
options:
|
||||||
node_id: 1
|
node_id: 1
|
||||||
nic_id: 0
|
nic_id: 0
|
||||||
41:
|
65: # old action num: 41
|
||||||
action: "NETWORK_NIC_ENABLE"
|
action: "NETWORK_NIC_ENABLE"
|
||||||
options:
|
options:
|
||||||
node_id: 1
|
node_id: 1
|
||||||
nic_id: 0
|
nic_id: 0
|
||||||
42:
|
66: # old action num: 42
|
||||||
action: "NETWORK_NIC_DISABLE"
|
action: "NETWORK_NIC_DISABLE"
|
||||||
options:
|
options:
|
||||||
node_id: 2
|
node_id: 2
|
||||||
nic_id: 0
|
nic_id: 0
|
||||||
43:
|
67: # old action num: 43
|
||||||
action: "NETWORK_NIC_ENABLE"
|
action: "NETWORK_NIC_ENABLE"
|
||||||
options:
|
options:
|
||||||
node_id: 2
|
node_id: 2
|
||||||
nic_id: 0
|
nic_id: 0
|
||||||
44:
|
68: # old action num: 44
|
||||||
action: "NETWORK_NIC_DISABLE"
|
action: "NETWORK_NIC_DISABLE"
|
||||||
options:
|
options:
|
||||||
node_id: 3
|
node_id: 3
|
||||||
nic_id: 0
|
nic_id: 0
|
||||||
45:
|
69: # old action num: 45
|
||||||
action: "NETWORK_NIC_ENABLE"
|
action: "NETWORK_NIC_ENABLE"
|
||||||
options:
|
options:
|
||||||
node_id: 3
|
node_id: 3
|
||||||
nic_id: 0
|
nic_id: 0
|
||||||
46:
|
70: # old action num: 46
|
||||||
action: "NETWORK_NIC_DISABLE"
|
action: "NETWORK_NIC_DISABLE"
|
||||||
options:
|
options:
|
||||||
node_id: 4
|
node_id: 4
|
||||||
nic_id: 0
|
nic_id: 0
|
||||||
47:
|
71: # old action num: 47
|
||||||
action: "NETWORK_NIC_ENABLE"
|
action: "NETWORK_NIC_ENABLE"
|
||||||
options:
|
options:
|
||||||
node_id: 4
|
node_id: 4
|
||||||
nic_id: 0
|
nic_id: 0
|
||||||
48:
|
72: # old action num: 48
|
||||||
action: "NETWORK_NIC_DISABLE"
|
action: "NETWORK_NIC_DISABLE"
|
||||||
options:
|
options:
|
||||||
node_id: 4
|
node_id: 4
|
||||||
nic_id: 1
|
nic_id: 1
|
||||||
49:
|
73: # old action num: 49
|
||||||
action: "NETWORK_NIC_ENABLE"
|
action: "NETWORK_NIC_ENABLE"
|
||||||
options:
|
options:
|
||||||
node_id: 4
|
node_id: 4
|
||||||
nic_id: 1
|
nic_id: 1
|
||||||
50:
|
74: # old action num: 50
|
||||||
action: "NETWORK_NIC_DISABLE"
|
action: "NETWORK_NIC_DISABLE"
|
||||||
options:
|
options:
|
||||||
node_id: 5
|
node_id: 5
|
||||||
nic_id: 0
|
nic_id: 0
|
||||||
51:
|
75: # old action num: 51
|
||||||
action: "NETWORK_NIC_ENABLE"
|
action: "NETWORK_NIC_ENABLE"
|
||||||
options:
|
options:
|
||||||
node_id: 5
|
node_id: 5
|
||||||
nic_id: 0
|
nic_id: 0
|
||||||
52:
|
76: # old action num: 52
|
||||||
action: "NETWORK_NIC_DISABLE"
|
action: "NETWORK_NIC_DISABLE"
|
||||||
options:
|
options:
|
||||||
node_id: 6
|
node_id: 6
|
||||||
nic_id: 0
|
nic_id: 0
|
||||||
53:
|
77: # old action num: 53
|
||||||
action: "NETWORK_NIC_ENABLE"
|
action: "NETWORK_NIC_ENABLE"
|
||||||
options:
|
options:
|
||||||
node_id: 6
|
node_id: 6
|
||||||
nic_id: 0
|
nic_id: 0
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
options:
|
options:
|
||||||
nodes:
|
nodes:
|
||||||
- node_name: domain_controller
|
- node_name: domain_controller
|
||||||
|
|||||||
@@ -301,17 +301,17 @@
|
|||||||
"- `1`: Scan the web service - this refreshes the health status in the observation space\n",
|
"- `1`: Scan the web service - this refreshes the health status in the observation space\n",
|
||||||
"- `9`: Scan the database file - this refreshes the health status of the database file\n",
|
"- `9`: Scan the database file - this refreshes the health status of the database file\n",
|
||||||
"- `13`: Patch the database service - This triggers the database to restore data from the backup server\n",
|
"- `13`: Patch the database service - This triggers the database to restore data from the backup server\n",
|
||||||
"- `19`: Shut down client 1\n",
|
"- `39`: Shut down client 1\n",
|
||||||
"- `20`: Start up client 1\n",
|
"- `40`: Start up client 1\n",
|
||||||
"- `22`: Block outgoing traffic from client 1\n",
|
"- `46`: Block outgoing traffic from client 1\n",
|
||||||
"- `23`: Block outgoing traffic from client 2\n",
|
"- `47`: Block outgoing traffic from client 2\n",
|
||||||
"- `26`: Block TCP traffic from client 1 to the database node\n",
|
"- `50`: Block TCP traffic from client 1 to the database node\n",
|
||||||
"- `27`: Block TCP traffic from client 2 to the database node\n",
|
"- `51`: Block TCP traffic from client 2 to the database node\n",
|
||||||
"- `28-37`: Remove ACL rules 1-10\n",
|
"- `52-61`: Remove ACL rules 1-10\n",
|
||||||
"- `42`: Disconnect client 1 from the network\n",
|
"- `66`: Disconnect client 1 from the network\n",
|
||||||
"- `43`: Reconnect client 1 to the network\n",
|
"- `67`: Reconnect client 1 to the network\n",
|
||||||
"- `44`: Disconnect client 2 from the network\n",
|
"- `68`: Disconnect client 2 from the network\n",
|
||||||
"- `45`: Reconnect client 2 to the network\n",
|
"- `69`: Reconnect client 2 to the network\n",
|
||||||
"\n",
|
"\n",
|
||||||
"The other actions will either have no effect or will negatively impact the network, so the blue agent should avoid taking them."
|
"The other actions will either have no effect or will negatively impact the network, so the blue agent should avoid taking them."
|
||||||
]
|
]
|
||||||
@@ -541,10 +541,10 @@
|
|||||||
"env.step(13) # Patch the database\n",
|
"env.step(13) # Patch the database\n",
|
||||||
"print(f\"step: {env.game.step_counter}, Red action: {info['agent_actions']['data_manipulation_attacker'][0]}, Blue reward:{reward}\" )\n",
|
"print(f\"step: {env.game.step_counter}, Red action: {info['agent_actions']['data_manipulation_attacker'][0]}, Blue reward:{reward}\" )\n",
|
||||||
"\n",
|
"\n",
|
||||||
"env.step(26) # Block client 1\n",
|
"env.step(50) # Block client 1\n",
|
||||||
"print(f\"step: {env.game.step_counter}, Red action: {info['agent_actions']['data_manipulation_attacker'][0]}, Blue reward:{reward}\" )\n",
|
"print(f\"step: {env.game.step_counter}, Red action: {info['agent_actions']['data_manipulation_attacker'][0]}, Blue reward:{reward}\" )\n",
|
||||||
"\n",
|
"\n",
|
||||||
"env.step(27) # Block client 2\n",
|
"env.step(51) # Block client 2\n",
|
||||||
"print(f\"step: {env.game.step_counter}, Red action: {info['agent_actions']['data_manipulation_attacker'][0]}, Blue reward:{reward}\" )\n",
|
"print(f\"step: {env.game.step_counter}, Red action: {info['agent_actions']['data_manipulation_attacker'][0]}, Blue reward:{reward}\" )\n",
|
||||||
"\n",
|
"\n",
|
||||||
"for step in range(30):\n",
|
"for step in range(30):\n",
|
||||||
|
|||||||
Reference in New Issue
Block a user