From cf48189a072195094bbbfdda92b85a9fac9d776b Mon Sep 17 00:00:00 2001 From: Shreya Malviya Date: Thu, 15 Sep 2022 14:00:14 +0530 Subject: [PATCH] BB: Use keyword parameters when creating Username/Password/NTHash objects --- .../blackbox/test_configurations/depth_1_a.py | 6 +++--- .../blackbox/test_configurations/depth_2_a.py | 4 ++-- .../blackbox/test_configurations/depth_3_a.py | 16 ++++++++-------- .../blackbox/test_configurations/depth_4_a.py | 10 +++++----- .../blackbox/test_configurations/smb_pth.py | 16 ++++++++-------- .../blackbox/test_configurations/wmi_mimikatz.py | 10 +++++----- 6 files changed, 31 insertions(+), 31 deletions(-) diff --git a/envs/monkey_zoo/blackbox/test_configurations/depth_1_a.py b/envs/monkey_zoo/blackbox/test_configurations/depth_1_a.py index bbdb23e85..daeaba2dd 100644 --- a/envs/monkey_zoo/blackbox/test_configurations/depth_1_a.py +++ b/envs/monkey_zoo/blackbox/test_configurations/depth_1_a.py @@ -87,9 +87,9 @@ test_agent_configuration = _add_credential_collectors(test_agent_configuration) test_agent_configuration = _add_http_ports(test_agent_configuration) CREDENTIALS = ( - Credentials(identity=Username("m0nk3y"), secret=None), - Credentials(identity=None, secret=Password("Ivrrw5zEzs")), - Credentials(identity=None, secret=Password("Xk8VDTsC")), + Credentials(identity=Username(username="m0nk3y"), secret=None), + Credentials(identity=None, secret=Password(password="Ivrrw5zEzs")), + Credentials(identity=None, secret=Password(password="Xk8VDTsC")), ) depth_1_a_test_configuration = dataclasses.replace(noop_test_configuration) diff --git a/envs/monkey_zoo/blackbox/test_configurations/depth_2_a.py b/envs/monkey_zoo/blackbox/test_configurations/depth_2_a.py index 459695010..550b7bc02 100644 --- a/envs/monkey_zoo/blackbox/test_configurations/depth_2_a.py +++ b/envs/monkey_zoo/blackbox/test_configurations/depth_2_a.py @@ -42,8 +42,8 @@ test_agent_configuration = _add_subnets(test_agent_configuration) test_agent_configuration = _add_tcp_ports(test_agent_configuration) CREDENTIALS = ( - Credentials(identity=Username("m0nk3y"), secret=None), - Credentials(identity=None, secret=Password("^NgDvY59~8")), + Credentials(identity=Username(username="m0nk3y"), secret=None), + Credentials(identity=None, secret=Password(password="^NgDvY59~8")), ) depth_2_a_test_configuration = dataclasses.replace(noop_test_configuration) 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 6153086e4..d390b2262 100644 --- a/envs/monkey_zoo/blackbox/test_configurations/depth_3_a.py +++ b/envs/monkey_zoo/blackbox/test_configurations/depth_3_a.py @@ -56,14 +56,14 @@ test_agent_configuration = _add_subnets(test_agent_configuration) test_agent_configuration = _add_tcp_ports(test_agent_configuration) CREDENTIALS = ( - Credentials(identity=Username("m0nk3y"), secret=None), - Credentials(identity=Username("m0nk3y-user"), secret=None), - Credentials(identity=None, secret=Password("Passw0rd!")), - Credentials(identity=None, secret=Password("3Q=(Ge(+&w]*")), - Credentials(identity=None, secret=Password("`))jU7L(w}")), - Credentials(identity=None, secret=NTHash("d0f0132b308a0c4e5d1029cc06f48692")), - Credentials(identity=None, secret=NTHash("5da0889ea2081aa79f6852294cba4a5e")), - Credentials(identity=None, secret=NTHash("50c9987a6bf1ac59398df9f911122c9b")), + Credentials(identity=Username(username="m0nk3y"), secret=None), + Credentials(identity=Username(username="m0nk3y-user"), secret=None), + Credentials(identity=None, secret=Password(password="Passw0rd!")), + Credentials(identity=None, secret=Password(password="3Q=(Ge(+&w]*")), + Credentials(identity=None, secret=Password(password="`))jU7L(w}")), + Credentials(identity=None, secret=NTHash(nt_hash="d0f0132b308a0c4e5d1029cc06f48692")), + Credentials(identity=None, secret=NTHash(nt_hash="5da0889ea2081aa79f6852294cba4a5e")), + Credentials(identity=None, secret=NTHash(nt_hash="50c9987a6bf1ac59398df9f911122c9b")), ) depth_3_a_test_configuration = dataclasses.replace(noop_test_configuration) diff --git a/envs/monkey_zoo/blackbox/test_configurations/depth_4_a.py b/envs/monkey_zoo/blackbox/test_configurations/depth_4_a.py index 7cbacd13b..d4ab4e512 100644 --- a/envs/monkey_zoo/blackbox/test_configurations/depth_4_a.py +++ b/envs/monkey_zoo/blackbox/test_configurations/depth_4_a.py @@ -49,11 +49,11 @@ test_agent_configuration = _add_subnets(test_agent_configuration) test_agent_configuration = _add_tcp_ports(test_agent_configuration) CREDENTIALS = ( - Credentials(identity=Username("m0nk3y"), secret=None), - Credentials(identity=None, secret=Password("3Q=(Ge(+&w]*")), - Credentials(identity=None, secret=Password("`))jU7L(w}")), - Credentials(identity=None, secret=Password("prM2qsroTI")), - Credentials(identity=None, secret=Password("t67TC5ZDmz")), + Credentials(identity=Username(username="m0nk3y"), secret=None), + Credentials(identity=None, secret=Password(password="3Q=(Ge(+&w]*")), + Credentials(identity=None, secret=Password(password="`))jU7L(w}")), + Credentials(identity=None, secret=Password(password="prM2qsroTI")), + Credentials(identity=None, secret=Password(password="t67TC5ZDmz")), ) depth_4_a_test_configuration = dataclasses.replace(noop_test_configuration) diff --git a/envs/monkey_zoo/blackbox/test_configurations/smb_pth.py b/envs/monkey_zoo/blackbox/test_configurations/smb_pth.py index bf8d80f10..bebccd081 100644 --- a/envs/monkey_zoo/blackbox/test_configurations/smb_pth.py +++ b/envs/monkey_zoo/blackbox/test_configurations/smb_pth.py @@ -42,14 +42,14 @@ test_agent_configuration = _add_subnets(test_agent_configuration) test_agent_configuration = _add_tcp_ports(test_agent_configuration) CREDENTIALS = ( - Credentials(identity=Username("Administrator"), secret=None), - Credentials(identity=Username("m0nk3y"), secret=None), - Credentials(identity=Username("user"), secret=None), - Credentials(identity=None, secret=Password("Ivrrw5zEzs")), - Credentials(identity=None, secret=Password("Password1!")), - Credentials(identity=None, secret=NTHash("d0f0132b308a0c4e5d1029cc06f48692")), - Credentials(identity=None, secret=NTHash("5da0889ea2081aa79f6852294cba4a5e")), - Credentials(identity=None, secret=NTHash("50c9987a6bf1ac59398df9f911122c9b")), + Credentials(identity=Username(username="Administrator"), secret=None), + Credentials(identity=Username(username="m0nk3y"), secret=None), + Credentials(identity=Username(username="user"), secret=None), + Credentials(identity=None, secret=Password(password="Ivrrw5zEzs")), + Credentials(identity=None, secret=Password(password="Password1!")), + Credentials(identity=None, secret=NTHash(nt_hash="d0f0132b308a0c4e5d1029cc06f48692")), + Credentials(identity=None, secret=NTHash(nt_hash="5da0889ea2081aa79f6852294cba4a5e")), + Credentials(identity=None, secret=NTHash(nt_hash="50c9987a6bf1ac59398df9f911122c9b")), ) smb_pth_test_configuration = dataclasses.replace(noop_test_configuration) diff --git a/envs/monkey_zoo/blackbox/test_configurations/wmi_mimikatz.py b/envs/monkey_zoo/blackbox/test_configurations/wmi_mimikatz.py index add637378..90874f1a0 100644 --- a/envs/monkey_zoo/blackbox/test_configurations/wmi_mimikatz.py +++ b/envs/monkey_zoo/blackbox/test_configurations/wmi_mimikatz.py @@ -50,11 +50,11 @@ test_agent_configuration = _add_tcp_ports(test_agent_configuration) test_agent_configuration = _add_credential_collectors(test_agent_configuration) CREDENTIALS = ( - Credentials(identity=Username("Administrator"), secret=None), - Credentials(identity=Username("m0nk3y"), secret=None), - Credentials(identity=Username("user"), secret=None), - Credentials(identity=None, secret=Password("Ivrrw5zEzs")), - Credentials(identity=None, secret=Password("Password1!")), + Credentials(identity=Username(username="Administrator"), secret=None), + Credentials(identity=Username(username="m0nk3y"), secret=None), + Credentials(identity=Username(username="user"), secret=None), + Credentials(identity=None, secret=Password(password="Ivrrw5zEzs")), + Credentials(identity=None, secret=Password(password="Password1!")), ) wmi_mimikatz_test_configuration = dataclasses.replace(noop_test_configuration)