diff --git a/envs/monkey_zoo/blackbox/gcp_test_machine_list.py b/envs/monkey_zoo/blackbox/gcp_test_machine_list.py
index 9aa5ef41f..ffbd21c90 100644
--- a/envs/monkey_zoo/blackbox/gcp_test_machine_list.py
+++ b/envs/monkey_zoo/blackbox/gcp_test_machine_list.py
@@ -11,6 +11,7 @@ GCP_TEST_MACHINE_LIST = {
"tunneling-10",
"tunneling-11",
"tunneling-12",
+ "tunneling-13",
"zerologon-25",
],
"europe-west1-b": [
@@ -52,7 +53,6 @@ DEPTH_3_A = {
"tunneling-9",
"tunneling-10",
"tunneling-11",
- "tunneling-12",
"mimikatz-15",
],
"europe-west1-b": [
@@ -63,6 +63,16 @@ DEPTH_3_A = {
],
}
+DEPTH_4_A = {
+ "europe-west1-b": [
+ "tunneling-9",
+ "tunneling-10",
+ "tunneling-12",
+ "tunneling-13",
+ ],
+}
+
+
POWERSHELL_EXPLOITER_REUSE = {
"europe-west1-b": [
"powershell-3-46",
@@ -88,6 +98,7 @@ GCP_SINGLE_TEST_LIST = {
"test_depth_2_a": DEPTH_2_A,
"test_depth_1_a": DEPTH_1_A,
"test_depth_3_a": DEPTH_3_A,
+ "test_depth_4_a": DEPTH_4_A,
"test_powershell_exploiter_credentials_reuse": POWERSHELL_EXPLOITER_REUSE,
"test_zerologon_exploiter": ZEROLOGON,
"test_wmi_and_mimikatz_exploiters": WMI_AND_MIMIKATZ,
diff --git a/envs/monkey_zoo/blackbox/test_blackbox.py b/envs/monkey_zoo/blackbox/test_blackbox.py
index 16ee4c0be..be8f4fe2c 100644
--- a/envs/monkey_zoo/blackbox/test_blackbox.py
+++ b/envs/monkey_zoo/blackbox/test_blackbox.py
@@ -18,6 +18,7 @@ from envs.monkey_zoo.blackbox.test_configurations import (
wmi_mimikatz_test_configuration,
zerologon_test_configuration,
)
+from envs.monkey_zoo.blackbox.test_configurations.depth_4_a import depth_4_a_test_configuration
from envs.monkey_zoo.blackbox.test_configurations.test_configuration import TestConfiguration
from envs.monkey_zoo.blackbox.tests.exploitation import ExploitationTest
from envs.monkey_zoo.blackbox.utils.gcp_machine_handlers import (
@@ -123,6 +124,11 @@ class TestMonkeyBlackbox:
island_client, depth_3_a_test_configuration, "Depth3A test suite"
)
+ def test_depth_4_a(self, island_client):
+ TestMonkeyBlackbox.run_exploitation_test(
+ island_client, depth_4_a_test_configuration, "Depth4A test suite"
+ )
+
# Not grouped because can only be ran on windows
@pytest.mark.skip_powershell_reuse
def test_powershell_exploiter_credentials_reuse(self, island_client):
diff --git a/envs/monkey_zoo/blackbox/test_configurations/depth_3_a.py b/envs/monkey_zoo/blackbox/test_configurations/depth_3_a.py
index 0a39a5e59..049521858 100644
--- a/envs/monkey_zoo/blackbox/test_configurations/depth_3_a.py
+++ b/envs/monkey_zoo/blackbox/test_configurations/depth_3_a.py
@@ -16,7 +16,7 @@ from .utils import (
# Tests:
# Powershell (10.2.3.45, 10.2.3.46, 10.2.3.47, 10.2.3.48)
-# Tunneling (SSH brute force) (10.2.2.9, 10.2.1.10, 10.2.0.12, 10.2.0.11)
+# Tunneling through grandparent agent (SSH brute force) (10.2.2.9, 10.2.1.10, 10.2.0.11)
# WMI pass the hash (10.2.2.15)
@@ -38,7 +38,6 @@ def _add_subnets(agent_configuration: AgentConfiguration) -> AgentConfiguration:
"10.2.3.47",
"10.2.3.48",
"10.2.1.10",
- "10.2.0.12",
"10.2.0.11",
"10.2.2.15",
]
@@ -62,7 +61,6 @@ CREDENTIALS = (
Credentials(None, Password("Passw0rd!")),
Credentials(None, Password("3Q=(Ge(+&w]*")),
Credentials(None, Password("`))jU7L(w}")),
- Credentials(None, Password("t67TC5ZDmz")),
Credentials(None, NTHash("d0f0132b308a0c4e5d1029cc06f48692")),
Credentials(None, NTHash("5da0889ea2081aa79f6852294cba4a5e")),
Credentials(None, NTHash("50c9987a6bf1ac59398df9f911122c9b")),
diff --git a/envs/monkey_zoo/blackbox/test_configurations/depth_4_a.py b/envs/monkey_zoo/blackbox/test_configurations/depth_4_a.py
new file mode 100644
index 000000000..83e9dc785
--- /dev/null
+++ b/envs/monkey_zoo/blackbox/test_configurations/depth_4_a.py
@@ -0,0 +1,65 @@
+import dataclasses
+
+from common.agent_configuration import AgentConfiguration, PluginConfiguration
+from common.credentials import Credentials, Password, Username
+
+from .noop import noop_test_configuration
+from .utils import (
+ add_exploiters,
+ add_subnets,
+ add_tcp_ports,
+ replace_agent_configuration,
+ replace_propagation_credentials,
+ set_keep_tunnel_open_time,
+ set_maximum_depth,
+)
+
+# Tests:
+# Tunneling (SSH brute force) (10.2.2.9, 10.2.1.10, 10.2.0.12, 10.2.0.13)
+
+
+def _add_exploiters(agent_configuration: AgentConfiguration) -> AgentConfiguration:
+ brute_force = [
+ PluginConfiguration(name="SSHExploiter", options={}),
+ PluginConfiguration(name="WmiExploiter", options={"smb_download_timeout": 30}),
+ ]
+
+ return add_exploiters(agent_configuration, brute_force=brute_force, vulnerability=[])
+
+
+def _add_subnets(agent_configuration: AgentConfiguration) -> AgentConfiguration:
+ subnets = [
+ "10.2.2.9",
+ "10.2.1.10",
+ "10.2.0.12",
+ "10.2.2.13",
+ ]
+ return add_subnets(agent_configuration, subnets)
+
+
+def _add_tcp_ports(agent_configuration: AgentConfiguration) -> AgentConfiguration:
+ ports = [22, 135, 5985, 5986]
+ return add_tcp_ports(agent_configuration, ports)
+
+
+test_agent_configuration = set_maximum_depth(noop_test_configuration.agent_configuration, 4)
+test_agent_configuration = set_keep_tunnel_open_time(test_agent_configuration, 20)
+test_agent_configuration = _add_exploiters(test_agent_configuration)
+test_agent_configuration = _add_subnets(test_agent_configuration)
+test_agent_configuration = _add_tcp_ports(test_agent_configuration)
+
+CREDENTIALS = (
+ Credentials(Username("m0nk3y"), None),
+ Credentials(None, Password("3Q=(Ge(+&w]*")),
+ Credentials(None, Password("`))jU7L(w}")),
+ Credentials(None, Password("prM2qsroTI")),
+ Credentials(None, Password("t67TC5ZDmz")),
+)
+
+depth_4_a_test_configuration = dataclasses.replace(noop_test_configuration)
+replace_agent_configuration(
+ test_configuration=depth_4_a_test_configuration, agent_configuration=test_agent_configuration
+)
+replace_propagation_credentials(
+ test_configuration=depth_4_a_test_configuration, propagation_credentials=CREDENTIALS
+)
diff --git a/envs/monkey_zoo/docs/fullDocs.md b/envs/monkey_zoo/docs/fullDocs.md
index 077ccfc59..b08a89bfc 100644
--- a/envs/monkey_zoo/docs/fullDocs.md
+++ b/envs/monkey_zoo/docs/fullDocs.md
@@ -303,7 +303,7 @@ Update all requirements using deployment script:
Nr. 13 Tunneling M5 +(10.2.0.13) |
+(Exploitable) | +
---|---|
OS: | +Ubuntu 18 x64 | +
Default service’s port: | +22 | +
Root password: | +prM2qsroTI | +
Server’s config: | +Configured to disable traffic from/to 10.2.0.10 and 10.2.0.11(via ufw and iptables) | +
Notes: | +Accessible only through Nr.12 | +