From 34b0830c776d481c666d266c353b7556e0de34dd Mon Sep 17 00:00:00 2001 From: Mike Salvatore Date: Mon, 8 Mar 2021 09:42:48 -0500 Subject: [PATCH] zoo: add drupal exploiter blackbox test --- envs/monkey_zoo/blackbox/island_configs/drupal.py | 13 +++++++++++++ envs/monkey_zoo/blackbox/test_blackbox.py | 7 ++++++- 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 envs/monkey_zoo/blackbox/island_configs/drupal.py diff --git a/envs/monkey_zoo/blackbox/island_configs/drupal.py b/envs/monkey_zoo/blackbox/island_configs/drupal.py new file mode 100644 index 000000000..da2b41ac6 --- /dev/null +++ b/envs/monkey_zoo/blackbox/island_configs/drupal.py @@ -0,0 +1,13 @@ +from copy import copy + +from envs.monkey_zoo.blackbox.island_configs.base_template import BaseTemplate + + +class Drupal(BaseTemplate): + config_values = copy(BaseTemplate.config_values) + + config_values.update({ + "internal.classes.finger_classes": ["PingScanner", "HTTPFinger"], + "basic.exploiters.exploiter_classes": ["DrupalExploiter"], + "basic_network.scope.subnet_scan_list": ["10.2.2.28"] + }) diff --git a/envs/monkey_zoo/blackbox/test_blackbox.py b/envs/monkey_zoo/blackbox/test_blackbox.py index b54fa5393..ff2e2cde2 100644 --- a/envs/monkey_zoo/blackbox/test_blackbox.py +++ b/envs/monkey_zoo/blackbox/test_blackbox.py @@ -13,6 +13,7 @@ from envs.monkey_zoo.blackbox.island_client.island_config_parser import \ from envs.monkey_zoo.blackbox.island_client.monkey_island_client import \ MonkeyIslandClient from envs.monkey_zoo.blackbox.island_configs.config_template import ConfigTemplate +from envs.monkey_zoo.blackbox.island_configs.drupal import Drupal from envs.monkey_zoo.blackbox.island_configs.elastic import Elastic from envs.monkey_zoo.blackbox.island_configs.hadoop import Hadoop from envs.monkey_zoo.blackbox.island_configs.mssql import Mssql @@ -46,7 +47,8 @@ DEFAULT_TIMEOUT_SECONDS = 5*60 MACHINE_BOOTUP_WAIT_SECONDS = 30 GCP_TEST_MACHINE_LIST = ['sshkeys-11', 'sshkeys-12', 'elastic-4', 'elastic-5', 'hadoop-2', 'hadoop-3', 'mssql-16', 'mimikatz-14', 'mimikatz-15', 'struts2-23', 'struts2-24', 'tunneling-9', 'tunneling-10', - 'tunneling-11', 'tunneling-12', 'weblogic-18', 'weblogic-19', 'shellshock-8', 'zerologon-25'] + 'tunneling-11', 'tunneling-12', 'weblogic-18', 'weblogic-19', 'shellshock-8', 'zerologon-25', + 'drupal-28'] LOG_DIR_PATH = "./logs" logging.basicConfig(level=logging.INFO) LOGGER = logging.getLogger(__name__) @@ -141,6 +143,9 @@ class TestMonkeyBlackbox: def test_smb_pth(self, island_client): TestMonkeyBlackbox.run_exploitation_test(island_client, SmbPth, "SMB_PTH") + def test_drupal_exploiter(self, island_client): + TestMonkeyBlackbox.run_exploitation_test(island_client, Drupal, "Drupal_exploiter") + def test_elastic_exploiter(self, island_client): TestMonkeyBlackbox.run_exploitation_test(island_client, Elastic, "Elastic_exploiter")