From aef7beedb3e1cd124923d9e6548f35a619416e50 Mon Sep 17 00:00:00 2001 From: vakarisz Date: Thu, 13 Jan 2022 12:37:22 +0200 Subject: [PATCH] Zoo: add logstash machines that test log4shell --- envs/monkey_zoo/docs/fullDocs.md | 60 +++++++++++++++++++++++++ envs/monkey_zoo/terraform/images.tf | 8 ++++ envs/monkey_zoo/terraform/monkey_zoo.tf | 30 +++++++++++++ 3 files changed, 98 insertions(+) diff --git a/envs/monkey_zoo/docs/fullDocs.md b/envs/monkey_zoo/docs/fullDocs.md index 71a373843..01328eb03 100644 --- a/envs/monkey_zoo/docs/fullDocs.md +++ b/envs/monkey_zoo/docs/fullDocs.md @@ -1314,6 +1314,66 @@ Update all requirements using deployment script:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +

Nr. 3-55 Log4j Logstash

+

(10.2.3.55)

(Vulnerable)
OS:Ubuntu 18.04LTS
Software:Logstash 5.5.0Java 1.8.0
Default server’s port:9600
Notes:User: logstash
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +

Nr. 3-56 Log4j-logstash

+

(10.2.3.56)

(Vulnerable)
OS:Windows Server 2016 x64
Software:Logstash 5.5.0Java 1.8.0
Default server’s port:9600
Notes:User: m0nk3y, Password: 7;@K"kPTM
+ + diff --git a/envs/monkey_zoo/terraform/images.tf b/envs/monkey_zoo/terraform/images.tf index b5a2fbee7..d32b964a5 100644 --- a/envs/monkey_zoo/terraform/images.tf +++ b/envs/monkey_zoo/terraform/images.tf @@ -93,6 +93,14 @@ data "google_compute_image" "log4j-solr-50" { name = "log4j-solr-50" project = local.monkeyzoo_project } +data "google_compute_image" "log4j-logstash-55" { + name = "log4j-logstash-55" + project = local.monkeyzoo_project +} +data "google_compute_image" "log4j-logstash-56" { + name = "log4j-logstash-56" + project = local.monkeyzoo_project +} data "google_compute_image" "weblogic-18" { name = "weblogic-18" project = local.monkeyzoo_project diff --git a/envs/monkey_zoo/terraform/monkey_zoo.tf b/envs/monkey_zoo/terraform/monkey_zoo.tf index c545af20c..cefc78af5 100644 --- a/envs/monkey_zoo/terraform/monkey_zoo.tf +++ b/envs/monkey_zoo/terraform/monkey_zoo.tf @@ -448,6 +448,36 @@ resource "google_compute_instance_from_template" "log4j-tomcat-52" { } } +resource "google_compute_instance_from_template" "log4j-logstash-55" { + name = "${local.resource_prefix}log4j-logstash-55" + source_instance_template = local.default_linux + boot_disk{ + initialize_params { + image = data.google_compute_image.log4j-logstash-55.self_link + } + auto_delete = true + } + network_interface { + subnetwork="${local.resource_prefix}monkeyzoo-main" + network_ip="10.2.3.55" + } +} + +resource "google_compute_instance_from_template" "log4j-logstash-56" { + name = "${local.resource_prefix}log4j-logstash-56" + source_instance_template = local.default_windows + boot_disk{ + initialize_params { + image = data.google_compute_image.log4j-logstash-56.self_link + } + auto_delete = true + } + network_interface { + subnetwork="${local.resource_prefix}monkeyzoo-main" + network_ip="10.2.3.56" + } +} + /* We need to alter monkey's behavior for this to upload 32-bit monkey instead of 64-bit (not yet developed) resource "google_compute_instance_from_template" "upgrader-17" { name = "${local.resource_prefix}upgrader-17"