forked from p15670423/monkey
BB: Extract powershell cred re-use into a separate test
Credential re-use only applies to windows island, that's why it's separate
This commit is contained in:
parent
b20de39ce0
commit
43d38d90e0
|
@ -11,7 +11,6 @@ class Depth1A(ConfigTemplate):
|
||||||
# Log4shell (10.2.3.55, 10.2.3.56, 10.2.3.49, 10.2.3.50, 10.2.3.51, 10.2.3.52)
|
# Log4shell (10.2.3.55, 10.2.3.56, 10.2.3.49, 10.2.3.50, 10.2.3.51, 10.2.3.52)
|
||||||
# MSSQL (10.2.2.16)
|
# MSSQL (10.2.2.16)
|
||||||
# SMB mimikatz password stealing and brute force (10.2.2.14 and 10.2.2.15)
|
# SMB mimikatz password stealing and brute force (10.2.2.14 and 10.2.2.15)
|
||||||
# Powershell credential reuse (powershell login with empty password) (10.2.3.46)
|
|
||||||
config_values.update(
|
config_values.update(
|
||||||
{
|
{
|
||||||
"basic.exploiters.exploiter_classes": [
|
"basic.exploiters.exploiter_classes": [
|
||||||
|
@ -20,7 +19,6 @@ class Depth1A(ConfigTemplate):
|
||||||
"MSSQLExploiter",
|
"MSSQLExploiter",
|
||||||
"SmbExploiter",
|
"SmbExploiter",
|
||||||
"SSHExploiter",
|
"SSHExploiter",
|
||||||
"PowerShellExploiter",
|
|
||||||
],
|
],
|
||||||
"basic_network.scope.subnet_scan_list": [
|
"basic_network.scope.subnet_scan_list": [
|
||||||
"10.2.2.2",
|
"10.2.2.2",
|
||||||
|
@ -34,7 +32,6 @@ class Depth1A(ConfigTemplate):
|
||||||
"10.2.2.16",
|
"10.2.2.16",
|
||||||
"10.2.2.14",
|
"10.2.2.14",
|
||||||
"10.2.2.15",
|
"10.2.2.15",
|
||||||
"10.2.3.46",
|
|
||||||
],
|
],
|
||||||
"basic.credentials.exploit_password_list": ["Ivrrw5zEzs", "Xk8VDTsC"],
|
"basic.credentials.exploit_password_list": ["Ivrrw5zEzs", "Xk8VDTsC"],
|
||||||
"basic.credentials.exploit_user_list": ["m0nk3y"],
|
"basic.credentials.exploit_user_list": ["m0nk3y"],
|
||||||
|
|
|
@ -11,6 +11,9 @@ from envs.monkey_zoo.blackbox.config_templates.config_template import ConfigTemp
|
||||||
from envs.monkey_zoo.blackbox.config_templates.grouped.depth_1_a import Depth1A
|
from envs.monkey_zoo.blackbox.config_templates.grouped.depth_1_a import Depth1A
|
||||||
from envs.monkey_zoo.blackbox.config_templates.grouped.depth_2_a import Depth2A
|
from envs.monkey_zoo.blackbox.config_templates.grouped.depth_2_a import Depth2A
|
||||||
from envs.monkey_zoo.blackbox.config_templates.grouped.depth_3_a import Depth3A
|
from envs.monkey_zoo.blackbox.config_templates.grouped.depth_3_a import Depth3A
|
||||||
|
from envs.monkey_zoo.blackbox.config_templates.single_tests.powershell_credentials_reuse import (
|
||||||
|
PowerShellCredentialsReuse,
|
||||||
|
)
|
||||||
from envs.monkey_zoo.blackbox.config_templates.single_tests.smb_pth import SmbPth
|
from envs.monkey_zoo.blackbox.config_templates.single_tests.smb_pth import SmbPth
|
||||||
from envs.monkey_zoo.blackbox.config_templates.single_tests.wmi_mimikatz import WmiMimikatz
|
from envs.monkey_zoo.blackbox.config_templates.single_tests.wmi_mimikatz import WmiMimikatz
|
||||||
from envs.monkey_zoo.blackbox.config_templates.single_tests.zerologon import Zerologon
|
from envs.monkey_zoo.blackbox.config_templates.single_tests.zerologon import Zerologon
|
||||||
|
@ -116,6 +119,15 @@ class TestMonkeyBlackbox:
|
||||||
def test_depth_3_a(self, island_client):
|
def test_depth_3_a(self, island_client):
|
||||||
TestMonkeyBlackbox.run_exploitation_test(island_client, Depth3A, "Depth4A test suite")
|
TestMonkeyBlackbox.run_exploitation_test(island_client, Depth3A, "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):
|
||||||
|
TestMonkeyBlackbox.run_exploitation_test(
|
||||||
|
island_client,
|
||||||
|
PowerShellCredentialsReuse,
|
||||||
|
"PowerShell_Remoting_exploiter_credentials_reuse",
|
||||||
|
)
|
||||||
|
|
||||||
# Not grouped because it's slow
|
# Not grouped because it's slow
|
||||||
def test_zerologon_exploiter(self, island_client):
|
def test_zerologon_exploiter(self, island_client):
|
||||||
test_name = "Zerologon_exploiter"
|
test_name = "Zerologon_exploiter"
|
||||||
|
|
|
@ -6,6 +6,9 @@ from envs.monkey_zoo.blackbox.config_templates.config_template import ConfigTemp
|
||||||
from envs.monkey_zoo.blackbox.config_templates.grouped.depth_1_a import Depth1A
|
from envs.monkey_zoo.blackbox.config_templates.grouped.depth_1_a import Depth1A
|
||||||
from envs.monkey_zoo.blackbox.config_templates.grouped.depth_2_a import Depth2A
|
from envs.monkey_zoo.blackbox.config_templates.grouped.depth_2_a import Depth2A
|
||||||
from envs.monkey_zoo.blackbox.config_templates.grouped.depth_3_a import Depth3A
|
from envs.monkey_zoo.blackbox.config_templates.grouped.depth_3_a import Depth3A
|
||||||
|
from envs.monkey_zoo.blackbox.config_templates.single_tests.powershell_credentials_reuse import (
|
||||||
|
PowerShellCredentialsReuse,
|
||||||
|
)
|
||||||
from envs.monkey_zoo.blackbox.config_templates.single_tests.smb_pth import SmbPth
|
from envs.monkey_zoo.blackbox.config_templates.single_tests.smb_pth import SmbPth
|
||||||
from envs.monkey_zoo.blackbox.config_templates.single_tests.wmi_mimikatz import WmiMimikatz
|
from envs.monkey_zoo.blackbox.config_templates.single_tests.wmi_mimikatz import WmiMimikatz
|
||||||
from envs.monkey_zoo.blackbox.config_templates.single_tests.zerologon import Zerologon
|
from envs.monkey_zoo.blackbox.config_templates.single_tests.zerologon import Zerologon
|
||||||
|
@ -25,8 +28,15 @@ parser.add_argument(
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
island_client = MonkeyIslandClient(args.island_ip)
|
island_client = MonkeyIslandClient(args.island_ip)
|
||||||
|
|
||||||
|
CONFIG_TEMPLATES = [
|
||||||
CONFIG_TEMPLATES = [Depth1A, Depth2A, Depth3A, Zerologon, SmbPth, WmiMimikatz]
|
Depth1A,
|
||||||
|
Depth2A,
|
||||||
|
Depth3A,
|
||||||
|
Zerologon,
|
||||||
|
SmbPth,
|
||||||
|
WmiMimikatz,
|
||||||
|
PowerShellCredentialsReuse,
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
def generate_templates():
|
def generate_templates():
|
||||||
|
|
Loading…
Reference in New Issue