asc.xhack.students_c2 role – Deploy a per-student command-and-control (C2) server

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.students_c2.

Entry point main – Deploy a per-student command-and-control (C2) server

New in asc.xhack 1.0.0

Synopsis

  • Deploys one command-and-control server per student in a dedicated subnet, used to attack the eXtreme Hacking lab infrastructure.

  • Cobalt Strike is installed when a licence is provided, and any malleable C2 profiles placed in the project’s files/profiles directory are copied onto the host.

Parameters

Parameter

Comments

students_c2_config

dictionary

Configuration options for the `students_c2` role.

c2_tools

list / elements=string

C2 tooling to install on the VM

cobaltstrike requires cobaltstrike_license to be set

Choices:

  • "cobaltstrike"

  • "stage1"

Default: []

cobaltstrike_license

string

Cobalt Strike license key - the student id is appended to it per VM

enabled

boolean

Whether to enable the role

Choices:

  • false ← (default)

  • true

monitor

boolean

Whether to enable monitoring of the VM

Choices:

  • false ← (default)

  • true

vm_size

string

Size of the VM to deploy (Azure VM size)

Default: "Standard_B2as_v2"

vm_suffix

string

Suffix to append to the VM name

Default: "c2"

Authors

  • Ignace De Cock