attack_range
A tool that allows you to create vulnerable instrumented local or cloud environments to simulate attacks against and collect the data into Splunk
Top Related Projects
Automated Adversary Emulation Platform
Re-play Security Events
Small and highly portable detection tests based on MITRE's ATT&CK.
Quick Overview
Attack Range is an open-source project by Splunk that provides a detection development platform for simulating and testing security detections. It allows security professionals to create controlled environments for testing and improving their detection capabilities against various attack techniques.
Pros
- Offers a flexible and customizable environment for testing security detections
- Supports multiple deployment options (local, cloud, and remote)
- Integrates with popular security tools and frameworks (e.g., Splunk, Atomic Red Team)
- Provides pre-configured scenarios and attack simulations
Cons
- Requires significant system resources for local deployments
- Setup process can be complex for beginners
- Limited documentation for advanced customization
- May require additional licensing for some features or integrations
Getting Started
To get started with Attack Range, follow these steps:
-
Clone the repository:
git clone https://github.com/splunk/attack_range.git cd attack_range
-
Install dependencies:
pip install -r requirements.txt
-
Configure the environment:
cp attack_range.conf.template attack_range.conf # Edit attack_range.conf with your desired settings
-
Deploy the Attack Range:
python attack_range.py build
-
Simulate an attack:
python attack_range.py simulate -t T1003.001
-
Destroy the environment when finished:
python attack_range.py destroy
For more detailed instructions and advanced usage, refer to the project's documentation on GitHub.
Competitor Comparisons
Automated Adversary Emulation Platform
Pros of Caldera
- More comprehensive and flexible adversary emulation platform
- Supports a wider range of operating systems and attack techniques
- Offers a plugin architecture for easy extensibility
Cons of Caldera
- Steeper learning curve and more complex setup process
- Requires more resources to run effectively
- Less focused on specific security product integration
Code Comparison
Attack Range (Ansible playbook snippet):
- name: Install Splunk Universal Forwarder
hosts: windows
tasks:
- name: Download Splunk Universal Forwarder
win_get_url:
url: "{{ splunkforwarder_url }}"
dest: C:\Windows\Temp\splunkforwarder.msi
Caldera (Python plugin example):
class ExamplePlugin(Plugin):
def __init__(self):
super().__init__()
self.name = 'Example'
self.description = 'An example plugin'
self.version = '1.0.0'
async def enable(self):
self.log.debug('Example plugin enabled')
While Attack Range focuses on Splunk-specific deployments and simulations, Caldera provides a more general-purpose framework for adversary emulation. Attack Range uses Ansible for configuration management, whereas Caldera employs a plugin-based architecture for extensibility. Both projects serve different purposes within the security testing and simulation domain.
Re-play Security Events
Pros of Security-Datasets
- Provides a wide variety of pre-generated security datasets for different scenarios
- Includes datasets from multiple data sources and platforms
- Easier to use for those who don't need a full attack simulation environment
Cons of Security-Datasets
- Limited ability to customize or generate new datasets on-demand
- May not cover all specific use cases or emerging threats
- Lacks the interactive, hands-on experience of a live attack range
Code Comparison
Security-Datasets (JSON example):
{
"metadata": {
"title": "Windows Security Event Log",
"description": "Windows security events collected from a domain controller",
"platform": "Windows",
"log_source": "Security"
},
"events": [
{
"EventID": 4624,
"LogonType": 3,
"TargetUserName": "Administrator",
"IpAddress": "192.168.1.100"
}
]
}
Attack Range (Python example):
from attack_range import AttackRange
attack_range = AttackRange()
attack_range.build()
attack_range.simulate(technique="T1078")
attack_range.destroy()
The code examples illustrate the difference in approach: Security-Datasets provides ready-to-use data, while Attack Range offers a programmable environment for simulating attacks and generating data.
Small and highly portable detection tests based on MITRE's ATT&CK.
Pros of Atomic Red Team
- Extensive library of pre-built tests covering a wide range of MITRE ATT&CK techniques
- Easy to execute tests without complex setup or infrastructure requirements
- Active community and frequent updates to keep tests current with evolving threats
Cons of Atomic Red Team
- Limited built-in logging and telemetry collection capabilities
- Lacks integrated analysis and detection tools for evaluating test results
- May require additional tools or scripts for comprehensive environment setup
Code Comparison
Atomic Red Team test execution:
- name: T1003.001 - OS Credential Dumping: LSASS Memory
auto_generated_guid: 0be2230c-9ab3-4ac2-8826-3199b9a0ebf8
executor:
command: |
mimikatz.exe "privilege::debug" "sekurlsa::logonpasswords" "exit"
name: command_prompt
Attack Range deployment:
- name: Configure Attack Range
hosts: localhost
vars:
attack_range_password: mypassword
tasks:
- name: Deploy Attack Range
command: python attack_range.py --action build
Both repositories offer valuable resources for testing and simulating cyber attacks, but they serve different purposes. Atomic Red Team focuses on individual technique execution, while Attack Range provides a more comprehensive environment for end-to-end attack simulation and detection testing.
Pros of detection-rules
- Focuses specifically on detection rules for Elastic Security
- Provides a comprehensive set of pre-built rules for various threat types
- Includes tools for rule testing and validation
Cons of detection-rules
- Limited to Elastic Security ecosystem
- Requires more manual setup and configuration compared to Attack Range
Code Comparison
detection-rules:
from detection_rules import Rule
rule = Rule.create("my_custom_rule")
rule.query = "process.name:malware.exe"
rule.description = "Detect known malware process"
rule.save()
Attack Range:
from attack_range import AttackRange
range = AttackRange()
range.simulate_attack("T1003")
range.collect_data()
range.destroy()
Summary
detection-rules is tailored for Elastic Security users, offering a rich set of pre-built detection rules and tools for rule management. It's ideal for organizations already using Elastic Stack for security monitoring.
Attack Range, on the other hand, provides a more comprehensive environment for simulating attacks and testing various security tools, including Splunk. It's better suited for organizations looking to test and validate their entire security stack against simulated threats.
The choice between the two depends on your specific security tooling and testing requirements.
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual CopilotREADME
Splunk Attack Range âï¸
The Splunk Attack Range is an open-source project maintained by the Splunk Threat Research Team. It builds instrumented cloud (AWS, Azure) and local environments (Virtualbox), simulates attacks, and forwards the data into a Splunk instance. This environment can then be used to develop and test the effectiveness of detections.
Purpose ð¡
The Attack Range is a detection development platform, which solves three main challenges in detection engineering:
- The user is able to quickly build a small lab infrastructure as close as possible to a production environment.
- The Attack Range performs attack simulation using different engines such as Atomic Red Team or Caldera in order to generate real attack data.
- It integrates seamlessly into any Continuous Integration / Continuous Delivery (CI/CD) pipeline to automate the detection rule testing process.
Docs
The Attack Range Documentation can be found here.
Installation ð
Using Docker
Attack Range in AWS:
docker pull splunk/attack_range
docker run -it splunk/attack_range
aws configure
python attack_range.py configure
To install directly on Linux, or MacOS follow these instructions.
Architecture ð¯
The deployment of Attack Range consists of:
- Windows Domain Controller
- Windows Server
- Windows Workstation
- A Kali Machine
- Splunk Server
- Splunk SOAR Server
- Nginx Server
- Linux Server
- Zeek Server
- Snort Server
Which can be added/removed/configured using attack_range.yml.
Logging
The following log sources are collected from the machines:
- Windows Event Logs (
index = win
) - Sysmon Logs (
index = win
) - Powershell Logs (
index = win
) - Aurora EDR (
index = win
) - Sysmon for Linux Logs (
index = unix
) - Nginx logs (
index = proxy
) - Network Logs with Splunk Stream (
index = main
) - Attack Simulation Logs from Atomic Red Team and Caldera (
index = attack
) - Zeek Logs (
index = zeek
) - Snort Logs (
index = snort
)
Running ðââï¸
Attack Range supports different actions:
Configure Attack Range
python attack_range.py configure
Build Attack Range
python attack_range.py build
Show Attack Range Infrastructure
python attack_range.py show
Perform Attack Simulations with Atomic Red Team or PurpleSharp
python attack_range.py simulate -e ART -te T1003.001 -t ar-win-ar-ar-0
python attack_range.py simulate -e PurpleSharp -te T1003.001 -t ar-win-ar-ar-0
Destroy Attack Range
python attack_range.py destroy
Stop Attack Range
python attack_range.py stop
Resume Attack Range
python attack_range.py resume
Dump Log Data from Attack Range
python attack_range.py dump --file_name attack_data/dump.log --search 'index=win' --earliest 2h
Replay Dumps into Attack Range Splunk Server
python attack_range.py replay --file_name attack_data/dump.log --source test --sourcetype test
Features ð
-
- Indexing of Microsoft Event Logs, PowerShell Logs, Sysmon Logs, DNS Logs, ...
- Preconfigured with multiple TAs for field extractions
- Out of the box Splunk detections with Enterprise Security Content Update (ESCU) App
- Preinstalled Machine Learning Toolkit (MLTK)
- pre-indexed BOTS datasets
- Splunk UI available through port 8000 with user admin
- ssh connection over configured ssh key
-
- Splunk Enterprise Security is a premium security solution requiring a paid license.
- Enable or disable Splunk Enterprise Security in attack_range.yml
- Purchase a license, download it and store it in the apps folder to use it.
-
- Splunk SOAR is a Security Orchestration and Automation platform
- For a free development license (100 actions per day) register here
- Enable or disable Splunk SOAR in attack_range.yml
-
Windows Domain Controller & Window Server & Windows 10 Client
- Can be enabled, disabled and configured over attack_range.yml
- Collecting of Microsoft Event Logs, PowerShell Logs, Sysmon Logs, DNS Logs, ...
- Sysmon log collection with customizable Sysmon configuration
- RDP connection over port 3389 with user Administrator
-
- Attack Simulation with Atomic Red Team
- Will be automatically installed on target during first execution of simulate
- Atomic Red Team already uses the new Mitre sub-techniques
-
- Native adversary simulation support with PurpleSharp
- Will be automatically downloaded on target during first execution of simulate
- Supports two parameters -st for comma separated ATT&CK techniques and -sp for a simulation playbook
-
- Preconfigured Kali Linux machine for penetration testing
- ssh connection over configured ssh key
Support ð
Please use the GitHub issue tracker to submit bugs or request features.
If you have questions or need support, you can:
- Join the #security-research room in the Splunk Slack channel
- Post a question to Splunk Answers
- If you are a Splunk Enterprise customer with a valid support entitlement contract and have a Splunk-related question, you can also open a support case on the https://www.splunk.com/ support portal
Contributing ð¥°
We welcome feedback and contributions from the community! Please see our contribution guidelines for more information on how to get involved.
Author
Contributors
- Bhavin Patel
- Rod Soto
- Russ Nolen
- Phil Royer
- Joseph Zadeh
- Rico Valdez
- Dimitris Lambrou
- Dave Herrald
- Ignacio Bermudez Corrales
- Peter Gael
- Josef Kuepker
- Shannon Davis
- Mauricio Velazco
- Teoderick Contreras
- Lou Stella
- Christian Cloutier
- Eric McGinnis
- Micheal Haag
- Gowthamaraj Rajendran
Top Related Projects
Automated Adversary Emulation Platform
Re-play Security Events
Small and highly portable detection tests based on MITRE's ATT&CK.
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual Copilot