From d3c60af960612a2bdfd27359a14cba1f345b4eb2 Mon Sep 17 00:00:00 2001 From: Ilija Lazoroski Date: Fri, 8 Apr 2022 12:14:38 +0200 Subject: [PATCH] BB: Remove Struts2 exploiter --- .../blackbox/config_templates/performance.py | 5 -- .../blackbox/config_templates/struts2.py | 19 ----- .../blackbox/gcp_test_machine_list.py | 2 - envs/monkey_zoo/blackbox/test_blackbox.py | 5 -- .../utils/config_generation_script.py | 2 - envs/monkey_zoo/docs/fullDocs.md | 70 ------------------- envs/monkey_zoo/terraform/images.tf | 8 --- envs/monkey_zoo/terraform/monkey_zoo.tf | 30 -------- 8 files changed, 141 deletions(-) delete mode 100644 envs/monkey_zoo/blackbox/config_templates/struts2.py diff --git a/envs/monkey_zoo/blackbox/config_templates/performance.py b/envs/monkey_zoo/blackbox/config_templates/performance.py index 4eb8a3243..11fcca51b 100644 --- a/envs/monkey_zoo/blackbox/config_templates/performance.py +++ b/envs/monkey_zoo/blackbox/config_templates/performance.py @@ -16,7 +16,6 @@ class Performance(ConfigTemplate): "SmbExploiter", "WmiExploiter", "SSHExploiter", - "Struts2Exploiter", "WebLogicExploiter", "HadoopExploiter", "MSSQLExploiter", @@ -27,8 +26,6 @@ class Performance(ConfigTemplate): "basic_network.network_analysis.inaccessible_subnets": [ "10.2.2.0/30", "10.2.2.8/30", - "10.2.2.24/32", - "10.2.2.23/32", "10.2.2.21/32", "10.2.2.19/32", "10.2.2.18/32", @@ -53,8 +50,6 @@ class Performance(ConfigTemplate): "10.2.2.19", "10.2.2.20", "10.2.2.21", - "10.2.2.23", - "10.2.2.24", "10.2.2.25", "10.2.3.55", "10.2.3.56", diff --git a/envs/monkey_zoo/blackbox/config_templates/struts2.py b/envs/monkey_zoo/blackbox/config_templates/struts2.py deleted file mode 100644 index 3997557b3..000000000 --- a/envs/monkey_zoo/blackbox/config_templates/struts2.py +++ /dev/null @@ -1,19 +0,0 @@ -from copy import copy - -from envs.monkey_zoo.blackbox.config_templates.base_template import BaseTemplate -from envs.monkey_zoo.blackbox.config_templates.config_template import ConfigTemplate - - -class Struts2(ConfigTemplate): - - config_values = copy(BaseTemplate.config_values) - - config_values.update( - { - "basic.exploiters.exploiter_classes": ["Struts2Exploiter"], - "basic_network.scope.depth": 2, - "basic_network.scope.subnet_scan_list": ["10.2.2.23", "10.2.2.24"], - "internal.network.tcp_scanner.HTTP_PORTS": [80, 8080], - "internal.network.tcp_scanner.tcp_target_ports": [80, 8080], - } - ) diff --git a/envs/monkey_zoo/blackbox/gcp_test_machine_list.py b/envs/monkey_zoo/blackbox/gcp_test_machine_list.py index 1b5043e93..07809e24f 100644 --- a/envs/monkey_zoo/blackbox/gcp_test_machine_list.py +++ b/envs/monkey_zoo/blackbox/gcp_test_machine_list.py @@ -7,8 +7,6 @@ GCP_TEST_MACHINE_LIST = { "mssql-16", "mimikatz-14", "mimikatz-15", - "struts2-23", - "struts2-24", "tunneling-9", "tunneling-10", "tunneling-11", diff --git a/envs/monkey_zoo/blackbox/test_blackbox.py b/envs/monkey_zoo/blackbox/test_blackbox.py index 3227694f6..78e77b4c0 100644 --- a/envs/monkey_zoo/blackbox/test_blackbox.py +++ b/envs/monkey_zoo/blackbox/test_blackbox.py @@ -22,7 +22,6 @@ from envs.monkey_zoo.blackbox.config_templates.powershell_credentials_reuse impo from envs.monkey_zoo.blackbox.config_templates.smb_mimikatz import SmbMimikatz from envs.monkey_zoo.blackbox.config_templates.smb_pth import SmbPth from envs.monkey_zoo.blackbox.config_templates.ssh import Ssh -from envs.monkey_zoo.blackbox.config_templates.struts2 import Struts2 from envs.monkey_zoo.blackbox.config_templates.tunneling import Tunneling from envs.monkey_zoo.blackbox.config_templates.weblogic import Weblogic from envs.monkey_zoo.blackbox.config_templates.wmi_mimikatz import WmiMimikatz @@ -190,10 +189,6 @@ class TestMonkeyBlackbox: def test_drupal_exploiter(self, island_client): TestMonkeyBlackbox.run_exploitation_test(island_client, Drupal, "Drupal_exploiter") - @pytest.mark.skip(reason="Struts2 exploiter is deprecated") - def test_struts_exploiter(self, island_client): - TestMonkeyBlackbox.run_exploitation_test(island_client, Struts2, "Struts2_exploiter") - @pytest.mark.skip(reason="Weblogic exploiter is deprecated") def test_weblogic_exploiter(self, island_client): TestMonkeyBlackbox.run_exploitation_test(island_client, Weblogic, "Weblogic_exploiter") diff --git a/envs/monkey_zoo/blackbox/utils/config_generation_script.py b/envs/monkey_zoo/blackbox/utils/config_generation_script.py index 1bb66a080..a5521e584 100644 --- a/envs/monkey_zoo/blackbox/utils/config_generation_script.py +++ b/envs/monkey_zoo/blackbox/utils/config_generation_script.py @@ -14,7 +14,6 @@ from envs.monkey_zoo.blackbox.config_templates.powershell import PowerShell from envs.monkey_zoo.blackbox.config_templates.smb_mimikatz import SmbMimikatz from envs.monkey_zoo.blackbox.config_templates.smb_pth import SmbPth from envs.monkey_zoo.blackbox.config_templates.ssh import Ssh -from envs.monkey_zoo.blackbox.config_templates.struts2 import Struts2 from envs.monkey_zoo.blackbox.config_templates.tunneling import Tunneling from envs.monkey_zoo.blackbox.config_templates.weblogic import Weblogic from envs.monkey_zoo.blackbox.config_templates.wmi_mimikatz import WmiMimikatz @@ -45,7 +44,6 @@ CONFIG_TEMPLATES = [ SmbMimikatz, SmbPth, Ssh, - Struts2, Tunneling, Weblogic, WmiMimikatz, diff --git a/envs/monkey_zoo/docs/fullDocs.md b/envs/monkey_zoo/docs/fullDocs.md index fa786dee6..032d6ef8d 100644 --- a/envs/monkey_zoo/docs/fullDocs.md +++ b/envs/monkey_zoo/docs/fullDocs.md @@ -22,8 +22,6 @@ This document describes Infection Monkey’s test network, how to deploy and use [Nr. 19 WebLogic](#_Toc526517181)
[Nr. 21 Scan](#_Toc526517196)
[Nr. 22 Scan](#_Toc526517197)
-[Nr. 23 Struts2](#_Toc536021476)
-[Nr. 24 Struts2](#_Toc536021477)
[Nr. 25 Zerologon](#_Toc536021478)
[Nr. 3-45 Powershell](#_Toc536021479)
[Nr. 3-46 Powershell](#_Toc536021480)
@@ -776,74 +774,6 @@ Update all requirements using deployment script:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Nr. 23 Struts2

-

(10.2.2.23)

(Vulnerable)
OS:Ubuntu 16.04.05 x64
Software:

JDK,

-

struts2 2.3.15.1,

-

tomcat 9.0.0.M9

Default server’s port:8080
Server’s config:Default
Notes:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Nr. 24 Struts2

-

(10.2.2.24)

(Vulnerable)
OS:Windows 10 x64
Software:

JDK,

-

struts2 2.3.15.1,

-

tomcat 9.0.0.M9

Default server’s port:8080
Server’s config:Default
Notes:
- diff --git a/envs/monkey_zoo/terraform/images.tf b/envs/monkey_zoo/terraform/images.tf index f74f0b7d9..67610ef6c 100644 --- a/envs/monkey_zoo/terraform/images.tf +++ b/envs/monkey_zoo/terraform/images.tf @@ -99,14 +99,6 @@ data "google_compute_image" "scan-22" { name = "scan-22" project = local.monkeyzoo_project } -data "google_compute_image" "struts2-23" { - name = "struts2-23" - project = local.monkeyzoo_project -} -data "google_compute_image" "struts2-24" { - name = "struts2-24" - project = local.monkeyzoo_project -} data "google_compute_image" "zerologon-25" { name = "zerologon-25" project = local.monkeyzoo_project diff --git a/envs/monkey_zoo/terraform/monkey_zoo.tf b/envs/monkey_zoo/terraform/monkey_zoo.tf index 73ea338b3..a5ea82d06 100644 --- a/envs/monkey_zoo/terraform/monkey_zoo.tf +++ b/envs/monkey_zoo/terraform/monkey_zoo.tf @@ -480,36 +480,6 @@ resource "google_compute_instance_from_template" "scan-22" { } } -resource "google_compute_instance_from_template" "struts2-23" { - name = "${local.resource_prefix}struts2-23" - source_instance_template = local.default_ubuntu - boot_disk{ - initialize_params { - image = data.google_compute_image.struts2-23.self_link - } - auto_delete = true - } - network_interface { - subnetwork="${local.resource_prefix}monkeyzoo-main" - network_ip="10.2.2.23" - } -} - -resource "google_compute_instance_from_template" "struts2-24" { - name = "${local.resource_prefix}struts2-24" - source_instance_template = local.default_windows - boot_disk{ - initialize_params { - image = data.google_compute_image.struts2-24.self_link - } - auto_delete = true - } - network_interface { - subnetwork="${local.resource_prefix}monkeyzoo-main" - network_ip="10.2.2.24" - } -} - resource "google_compute_instance_from_template" "zerologon-25" { name = "${local.resource_prefix}zerologon-25" source_instance_template = local.default_windows