asc.xhack.lab_log4j role – Deploy the Log4Shell-vulnerable lab application

Note

This role is part of the asc.xhack collection (version 2.0.0).

It is not included in ansible-core. To check whether it is installed, run ansible-galaxy collection list.

To install it use: git clone git@ssh.dev.azure.com:v3/cloudasc/iac-ansible-collections/xhack $HOME/.ansible/collections/ansible_collections/asc/xhack.

To use it in a playbook, specify: asc.xhack.lab_log4j.

Entry point main – Deploy the Log4Shell-vulnerable lab application

New in asc.xhack 1.0.0

Synopsis

  • Deploys a VM running a web application vulnerable to Log4Shell (CVE-2021-44228), typically used as the entry point into the eXtreme Hacking lab.

Parameters

Parameter

Comments

lab_log4j_base_image

string

added in asc.xhack 2.0.0

Tomcat 9 / JRE 11 base image the vulnerable Log4Shell WAR runs on, pinned by digest.

Default: "tomcat:9-jre11@sha256:e4bacc2c7a8a97aa48c13d698f1eff5f80a31abc4ac87e1c307c12746674e4be"

lab_log4j_build_dir

path

added in asc.xhack 2.0.0

Directory on the VM where the build context and compose project are rendered.

Default: "/opt/log4shell"

lab_log4j_config

dictionary

‘lab_log4j’ role configuration

enabled

boolean

Whether to enable the lab_log4j role

Choices:

  • false ← (default)

  • true

vm_name

string

Name of the VM to deploy

Default: "vmweb01"

vm_size

string

Size of the VM to deploy (Azure VM size)

Default: "Standard_B2as_v2"

Authors

  • Ignace De Cock