Potential DGA Activity

A population analysis machine learning job detected potential DGA (domain generation algorithm) activity. Such activity is often used by malware command and control (C2) channels. This machine learning job looks for a source IP address making DNS requests that have an aggregate high probability of being DGA activity.

Elastic rule (View on GitHub)

 1[metadata]
 2creation_date = "2023/09/14"
 3integration = ["dga", "endpoint", "network_traffic"]
 4maturity = "production"
 5updated_date = "2024/05/21"
 6
 7[rule]
 8anomaly_threshold = 70
 9author = ["Elastic"]
10description = """
11A population analysis machine learning job detected potential DGA (domain generation algorithm) activity. Such activity
12is often used by malware command and control (C2) channels. This machine learning job looks for a source IP address
13making DNS requests that have an aggregate high probability of being DGA activity.
14"""
15from = "now-45m"
16interval = "15m"
17license = "Elastic License v2"
18machine_learning_job_id = "dga_high_sum_probability"
19name = "Potential DGA Activity"
20references = [
21    "https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html",
22    "https://docs.elastic.co/en/integrations/dga",
23    "https://www.elastic.co/security-labs/detect-domain-generation-algorithm-activity-with-new-kibana-integration",
24]
25risk_score = 21
26rule_id = "ff0d807d-869b-4a0d-a493-52bc46d2f1b1"
27setup = """## Setup
28
29The rule requires the Domain Generation Algorithm (DGA) Detection integration assets to be installed, as well as DNS events collected by integrations such as Elastic Defend, Network Packet Capture, or Packetbeat.  
30
31### DGA Detection Setup
32The DGA Detection integration consists of an ML-based framework to detect DGA activity in DNS events.
33
34#### Prerequisite Requirements:
35- Fleet is required for DGA Detection.
36- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).
37- DNS events collected by the [Elastic Defend](https://docs.elastic.co/en/integrations/endpoint), [Network Packet Capture](https://docs.elastic.co/integrations/network_traffic) integration, or [Packetbeat](https://www.elastic.co/guide/en/beats/packetbeat/current/packetbeat-overview.html).
38- To install Elastic Defend, refer to the [documentation](https://www.elastic.co/guide/en/security/current/install-endpoint.html).
39- To add the Network Packet Capture integration to an Elastic Agent policy, refer to [this](https://www.elastic.co/guide/en/fleet/current/add-integration-to-policy.html) guide.
40- To set up and run Packetbeat, follow [this](https://www.elastic.co/guide/en/beats/packetbeat/current/setting-up-and-running.html) guide.
41
42#### The following steps should be executed to install assets associated with the DGA Detection integration:
43- Go to the Kibana homepage. Under Management, click Integrations.
44- In the query bar, search for Domain Generation Algorithm Detection and select the integration to see more details about it.
45- Follow the instructions under the **Installation** section.
46- For this rule to work, complete the instructions through **Add preconfigured anomaly detection jobs**.
47
48### Anomaly Detection Setup
49Before you can enable this rule, you'll need to enable the corresponding Anomaly Detection job. 
50- Go to the Kibana homepage. Under Analytics, click Machine Learning.
51- Under Anomaly Detection, click Jobs, and then click "Create job". Select the Data View containing your enriched DNS events. For example, this would be `logs-endpoint.events.*` if you used Elastic Defend to collect events, or `logs-network_traffic.*` if you used Network Packet Capture.
52- If the selected Data View contains events that match the query in [this](https://github.com/elastic/integrations/blob/main/packages/dga/kibana/ml_module/dga-ml.json) configuration file, you will see a card for DGA under "Use preconfigured jobs".
53- Keep the default settings and click "Create jobs" to start the anomaly detection job and datafeed.
54"""
55severity = "low"
56tags = [
57    "Use Case: Domain Generation Algorithm Detection",
58    "Rule Type: ML",
59    "Rule Type: Machine Learning",
60    "Tactic: Command and Control",
61]
62type = "machine_learning"
63[[rule.threat]]
64framework = "MITRE ATT&CK"
65[[rule.threat.technique]]
66id = "T1568"
67name = "Dynamic Resolution"
68reference = "https://attack.mitre.org/techniques/T1568/"
69
70
71[rule.threat.tactic]
72id = "TA0011"
73name = "Command and Control"
74reference = "https://attack.mitre.org/tactics/TA0011/"

References

Related rules

to-top