forked from p15670423/monkey
BB: Fix some minor configuration issue in CredentialsReuse
This commit is contained in:
parent
a2b8fceb28
commit
3af38d7841
|
@ -10,7 +10,7 @@ from envs.monkey_zoo.blackbox.island_client.monkey_island_client import MonkeyIs
|
|||
from envs.monkey_zoo.blackbox.island_client.test_configuration_parser import get_target_ips
|
||||
from envs.monkey_zoo.blackbox.log_handlers.test_logs_handler import TestLogsHandler
|
||||
from envs.monkey_zoo.blackbox.test_configurations import (
|
||||
credential_reuse_ssh_key_test_configuration,
|
||||
credentials_reuse_ssh_key_test_configuration,
|
||||
depth_1_a_test_configuration,
|
||||
depth_2_a_test_configuration,
|
||||
depth_3_a_test_configuration,
|
||||
|
@ -166,7 +166,7 @@ class TestMonkeyBlackbox:
|
|||
|
||||
def test_credentials_reuse_ssh_key(self, island_client):
|
||||
TestMonkeyBlackbox.run_exploitation_test(
|
||||
island_client, credential_reuse_ssh_key_test_configuration, "Credentials_Reuse_SSH_Key"
|
||||
island_client, credentials_reuse_ssh_key_test_configuration, "Credentials_Reuse_SSH_Key"
|
||||
)
|
||||
|
||||
# Not grouped because conflicts with SMB.
|
||||
|
|
|
@ -7,4 +7,4 @@ from .powershell_credentials_reuse import powershell_credentials_reuse_test_conf
|
|||
from .smb_pth import smb_pth_test_configuration
|
||||
from .wmi_mimikatz import wmi_mimikatz_test_configuration
|
||||
from .zerologon import zerologon_test_configuration
|
||||
from .credential_reuse_ssh_key import credential_reuse_ssh_key_test_configuration
|
||||
from .credentials_reuse_ssh_key import credentials_reuse_ssh_key_test_configuration
|
||||
|
|
|
@ -10,6 +10,8 @@ from .utils import (
|
|||
add_subnets,
|
||||
add_tcp_ports,
|
||||
replace_agent_configuration,
|
||||
replace_propagation_credentials,
|
||||
set_keep_tunnel_open_time,
|
||||
set_maximum_depth,
|
||||
)
|
||||
|
||||
|
@ -45,7 +47,8 @@ def _add_tcp_ports(agent_configuration: AgentConfiguration) -> AgentConfiguratio
|
|||
return add_tcp_ports(agent_configuration, ports)
|
||||
|
||||
|
||||
test_agent_configuration = set_maximum_depth(noop_test_configuration.agent_configuration, 1)
|
||||
test_agent_configuration = set_maximum_depth(noop_test_configuration.agent_configuration, 3)
|
||||
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_credential_collectors(test_agent_configuration)
|
||||
|
@ -57,8 +60,12 @@ CREDENTIALS = (
|
|||
Credentials(identity=None, secret=Password(password="5BuYHeVl")),
|
||||
)
|
||||
|
||||
credential_reuse_ssh_key_test_configuration = dataclasses.replace(noop_test_configuration)
|
||||
credentials_reuse_ssh_key_test_configuration = dataclasses.replace(noop_test_configuration)
|
||||
replace_agent_configuration(
|
||||
test_configuration=credential_reuse_ssh_key_test_configuration,
|
||||
test_configuration=credentials_reuse_ssh_key_test_configuration,
|
||||
agent_configuration=test_agent_configuration,
|
||||
)
|
||||
replace_propagation_credentials(
|
||||
test_configuration=credentials_reuse_ssh_key_test_configuration,
|
||||
propagation_credentials=CREDENTIALS,
|
||||
)
|
Loading…
Reference in New Issue