Network Activity to a Suspicious Top Level Domain

Identifies DNS queries to commonly abused Top Level Domains by common LOLBINs or executable running from world writable directories or unsigned binaries. This behavior matches on common malware C2 abusing less formal domain names.

Elastic rule (View on GitHub)

  1[metadata]
  2creation_date = "2025/08/20"
  3integration = ["endpoint", "windows", "sentinel_one_cloud_funnel", "crowdstrike"]
  4maturity = "production"
  5updated_date = "2025/08/20"
  6
  7[rule]
  8author = ["Elastic"]
  9description = """
 10Identifies DNS queries to commonly abused Top Level Domains by common LOLBINs or executable running from world writable
 11directories or unsigned binaries. This behavior matches on common malware C2 abusing less formal domain names.
 12"""
 13from = "now-9m"
 14index = [
 15    "endgame-*",
 16    "logs-endpoint.events.network-*",
 17    "logs-sentinel_one_cloud_funnel.*",
 18    "logs-crowdstrike.fdr*",
 19    "logs-windows.sysmon_operational-*",
 20    "winlogbeat-*"
 21]
 22language = "eql"
 23license = "Elastic License v2"
 24name = "Network Activity to a Suspicious Top Level Domain"
 25note = """## Triage and analysis
 26
 27### Investigating Network Activity to a Suspicious Top Level Domain
 28
 29#### Possible investigation steps
 30
 31- Investigate the process execution chain (parent process tree) for unknown processes or malicious scripts.
 32- Review if the domain reputation and the frequency of network activities as well as any download/upload activity.
 33- Verify if the executed process is persistent on the host like common mechanisms Startup folder, task or Run key.
 34- Investigate other alerts associated with the user/host during the past 48 hours.
 35- Extract this communication's indicators of compromise (IoCs) and use traffic logs to search for other potentially compromised hosts.
 36
 37### False positive analysis
 38
 39- Trusted domain from an expected process running in the environment.
 40
 41### Response and remediation
 42
 43- Initiate the incident response process based on the outcome of the triage.
 44- Isolate the involved host to prevent further post-compromise behavior.
 45- Immediately block the identified indicators of compromise (IoCs).
 46- Implement any temporary network rules, procedures, and segmentation required to contain the attack.
 47- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.
 48- Update firewall rules to be more restrictive.
 49- Reimage the host operating system or restore the compromised files to clean versions.
 50- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.
 51- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.
 52- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).
 53"""
 54references = ["https://www.cybercrimeinfocenter.org/top-20-tlds-by-malicious-phishing-domains"]
 55risk_score = 73
 56rule_id = "e516bf56-d51b-43e8-91ec-9e276331f433"
 57severity = "high"
 58tags = [
 59    "Domain: Endpoint",
 60    "OS: Windows",
 61    "Use Case: Threat Detection",
 62    "Tactic: Command and Control",
 63    "Resources: Investigation Guide",
 64    "Data Source: Elastic Endgame",
 65    "Data Source: Elastic Defend",
 66    "Data Source: Windows Security Event Logs",
 67    "Data Source: SentinelOne",
 68    "Data Source: Crowdstrike",
 69    "Data Source: Sysmon",
 70]
 71timestamp_override = "event.ingested"
 72type = "eql"
 73
 74query = '''
 75network where host.os.type == "windows" and dns.question.name != null and
 76 (
 77  process.name : ("MSBuild.exe", "mshta.exe", "wscript.exe", "powershell.exe", "pwsh.exe", "msiexec.exe", "rundll32.exe",
 78                  "bitsadmin.exe", "InstallUtil.exe", "python.exe", "regsvr32.exe", "dllhost.exe", "node.exe",
 79                  "java.exe", "javaw.exe", "*.pif", "*.com", "*.scr") or
 80  ?process.code_signature.trusted != true or
 81  ?process.code_signature.subject_name : ("AutoIt Consulting Ltd", "OpenJS Foundation", "Python Software Foundation") or
 82  process.executable : ("?:\\Users\\*.exe", "", "?:\\ProgramData\\*.exe")
 83 ) and
 84dns.question.name regex """.*\.(top|buzz|xyz|rest|ml|cf|gq|ga|onion|monster|cyou|quest|cc|bar|cfd|click|cam|surf|tk|shop|club|icu|pw|ws|online|fun|life|boats|store|hair|skin|motorcycles|christmas|lol|makeup|mom|bond|beauty|biz|live|work|zip|country|accountant|date|party|science|loan|win|men|faith|review|racing|download|host)"""
 85'''
 86
 87
 88[[rule.threat]]
 89framework = "MITRE ATT&CK"
 90[[rule.threat.technique]]
 91id = "T1071"
 92name = "Application Layer Protocol"
 93reference = "https://attack.mitre.org/techniques/T1071/"
 94[[rule.threat.technique.subtechnique]]
 95id = "T1071.004"
 96name = "DNS"
 97reference = "https://attack.mitre.org/techniques/T1071/004/"
 98
 99
100[rule.threat.tactic]
101id = "TA0011"
102name = "Command and Control"
103reference = "https://attack.mitre.org/tactics/TA0011/"

Triage and analysis

Investigating Network Activity to a Suspicious Top Level Domain

Possible investigation steps

  • Investigate the process execution chain (parent process tree) for unknown processes or malicious scripts.
  • Review if the domain reputation and the frequency of network activities as well as any download/upload activity.
  • Verify if the executed process is persistent on the host like common mechanisms Startup folder, task or Run key.
  • Investigate other alerts associated with the user/host during the past 48 hours.
  • Extract this communication's indicators of compromise (IoCs) and use traffic logs to search for other potentially compromised hosts.

False positive analysis

  • Trusted domain from an expected process running in the environment.

Response and remediation

  • Initiate the incident response process based on the outcome of the triage.
  • Isolate the involved host to prevent further post-compromise behavior.
  • Immediately block the identified indicators of compromise (IoCs).
  • Implement any temporary network rules, procedures, and segmentation required to contain the attack.
  • Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.
  • Update firewall rules to be more restrictive.
  • Reimage the host operating system or restore the compromised files to clean versions.
  • Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.
  • Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.
  • Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).

References

Related rules

to-top