Splunk Attack Range W/ Docker & AWS

“The Attack Range is a detection development platform, which solves three main challenges in detection engineering. First, the user is able to build quickly a small lab infrastructure as close as possible to a production environment. Second, the Attack Range performs attack simulation using different engines such as Atomic Red Team or Caldera in order to generate real attack data. Third, it integrates seamlessly into any Continuous Integration / Continuous Delivery (CI/CD) pipeline to automate the detection rule testing process.” — Splunk Attack Range GitHub.

So the Attack Range in a nutshell is a way to spin up an environment where you can emulate a threat actor (Red side) and then look at detecting it with the newly generated telemetry in Splunk (Blue side). The threats can be emulated in 3 ways:

  • MITRE Caldera (GUI included, yay!)
  • Atomic Red Team (CLI via Python on the Docker container, super easy to use)
  • Kali Linux box (Provided in the lab)

I’m using Windows, so I’m going to download Docker Desktop: https://www.docker.com/products/docker-desktop

Splunk provide a link to the container page, this is here:

Run the following command in an administrative Powershell:

Once you’ve done that, the Docker ‘image’ should then show up on Docker Desktop:

You can now run the image as a container by clicking ‘Run’ next to it.

I’m not going to break down the steps for making an AWS IAM with Programmatic Access here, it’s found at:

Once you’ve created the credentials, you then hop into the container via shell by going to Docker Desktop and clicking the CLI icon next to the running container. Once you’re in, you then need to run

Running this command will then take you through the steps to add the Access Key and Secret you created in the AWS IAM steps provided above.

Read before beginning:

You need to subscribe on AWS marketplace to two Operating Systems, go to the AWS Marketplace, search & subscribe for these two:

  • ‘CentOS 7 (x86_64) — with Updates HVM’
  • ‘Kali Linux’

Running the below command (has to be python3) with the argument ‘configure’ will take you through the configuration wizard.

NOTE: Set your master password as something memorable, the wizard will generate one but it’s better to make one yourself. This is the password used to login to your CALDERA GUI and Splunk. Your username will default to “admin”.

NOTE: You need to know what your preferred AWS region is, when in the console you can look in the top right for a region list, I opted for ‘eu-west-1'.

NOTE: I opted to deploy: Windows DC, Windows Server and Kali. I left Zeek, Phantom and Windows client out. Extra configuration is required for Windows client and Phantom, Zeek gave me some errors but I didn’t require Zeek for this lab.

Once configured, the wizard will finish, you can then run the same command, this time with the ‘build’ argument.

This command will automatically provision the lab for you, it’ll take around 20 minutes so grab a brew! ☕

Splunk is accessible via the Splunk servers IP:8000

MITRE CALDERA GUI is accessible via the Splunk servers IP:8888

You can find instructions to run the Atomic Red Team tests at the Splunk attack range repo, an example is:

You simply change out the T1003.001 (Tactic number and Technique number) for any others in the Atomic Red Team library, don’t forget to substitute “ar-win-dc-default-username-33048” for whatever target machine name is in your lab.

To ‘stop’ the lab, run the command

To ‘destroy’ the lab, run the command

Happy hunting!

Twitter: @mikecybersec