T1568.002
Dynamic Resolution: Domain Generation Algorithms
Description from ATT&CK
Adversaries may make use of Domain Generation Algorithms (DGAs) to dynamically identify a destination domain for command and control traffic rather than relying on a list of static IP addresses or domains. This has the advantage of making it much harder for defenders to block, track, or take over the command and control channel, as there potentially could be thousands of domains that malware can check for instructions.(Citation: Cybereason Dissecting DGAs)(Citation: Cisco Umbrella DGA)(Citation: Unit 42 DGA Feb 2019)
DGAs can take the form of apparently random or “gibberish” strings (ex: istgmxdejdnxuyla.ru) when they construct domain names by generating each letter. Alternatively, some DGAs employ whole words as the unit by concatenating words together instead of letters (ex: cityjulydish.net). Many DGAs are time-based, generating a different domain for each time period (hourly, daily, monthly, etc). Others incorporate a seed value as well to make predicting future domains more difficult for defenders.(Citation: Cybereason Dissecting DGAs)(Citation: Cisco Umbrella DGA)(Citation: Talos CCleanup 2017)(Citation: Akamai DGA Mitigation)
Adversaries may use DGAs for the purpose of Fallback Channels. When contact is lost with the primary command and control server malware may employ a DGA as a means to reestablishing command and control.(Citation: Talos CCleanup 2017)(Citation: FireEye POSHSPY April 2017)(Citation: ESET Sednit 2017 Activity)
Atomic Tests
Atomic Test #1: DGA Simulation (Python)
Simulates Domain Generation Algorithm (DGA) traffic by generating pseudo-random domains based on the current date and querying them using dig. This is designed to trigger DNS analytics and NGIDS.
Supported Platforms: Linux
auto_generated_guid: cc367493-3a00-4c4a-a685-16b73339167c
Inputs
| Name | Description | Type | Default Value |
|---|---|---|---|
| python_script_path | Full path to the DGA python script | string | PathToAtomicsFolder/T1568.002/src/T1568.002.py |
Attack Commands: Run with bash!
python3 "#{python_script_path}"Dependencies: Run with bash!
Description: #{python_script_path} must exist on system.
Check Prereq Commands
if [ -f "#{python_script_path}" ]; then exit 0; else exit 1; fiGet Prereq Commands
mkdir -p "$(dirname "#{python_script_path}")"
curl -sL "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1568.002/src/T1568.002.py" -o "#{python_script_path}"Description: Python 3 must be installed to run the script.
Check Prereq Commands
which python3Get Prereq Commands
sudo apt-get update && sudo apt-get install -y python3Atomic test(s) for this technique last updated: 2026-04-24 07:25:50 UTC