Detection rules › Splunk

Rundll32 DNSQuery

Status
production
Severity
medium
Group by
QueryName, QueryResults, QueryStatus, answer, answer_count, dvc, process_guid, process_name, query, query_count, reply_code_id, signature, signature_id, src, user_id, vendor_product
Author
Teoderick Contreras, Splunk
Source
github.com/splunk/security_content

The following analytic detects a suspicious rundll32.exe process making HTTP connections and performing DNS queries to web domains. It leverages Sysmon EventCode 22 logs to identify these activities. This behavior is significant as it is commonly associated with IcedID malware, where rundll32.exe checks internet connectivity and communicates with C&C servers to download configurations and other components. If confirmed malicious, this activity could allow attackers to establish persistence, download additional payloads, and exfiltrate sensitive data, posing a severe threat to the network.

Known false positives

  • No false positives have been identified at this time.

MITRE ATT&CK coverage

Telemetry coverage

ProviderRecord / event type
SysmonEvent ID 22: DNSEvent (DNS query)

Rule body

name: Rundll32 DNSQuery
id: f1483f5e-ee29-11eb-9d23-acde48001122
version: 13
creation_date: '2021-08-03'
modification_date: '2026-05-13'
author: Teoderick Contreras, Splunk
status: production
type: TTP
description: The following analytic detects a suspicious `rundll32.exe` process making HTTP connections and performing DNS queries to web domains. It leverages Sysmon EventCode 22 logs to identify these activities. This behavior is significant as it is commonly associated with IcedID malware, where `rundll32.exe` checks internet connectivity and communicates with C&C servers to download configurations and other components. If confirmed malicious, this activity could allow attackers to establish persistence, download additional payloads, and exfiltrate sensitive data, posing a severe threat to the network.
data_source:
    - Sysmon EventID 22
search: |-
    `sysmon` EventCode=22 process_name="rundll32.exe"
      | stats count min(_time) as firstTime max(_time) as lastTime
        BY answer answer_count dvc
           process_exec process_guid process_name
           query query_count reply_code_id
           signature signature_id src
           user_id vendor_product QueryName
           QueryResults QueryStatus
      | `security_content_ctime(firstTime)`
      | `security_content_ctime(lastTime)`
      | `rundll32_dnsquery_filter`
how_to_implement: To successfully implement this search, you need to be ingesting logs with the process name and eventcode = 22 dnsquery executions from your endpoints. If you are using Sysmon, you must have at least version 6.0.4 of the Sysmon TA. Tune and filter known instances where renamed rundll32.exe may be used.
known_false_positives: No false positives have been identified at this time.
references:
    - https://any.run/malware-trends/icedid
finding:
    title: rundll32 process $process_name$ made a DNS query for $query$ from host $dvc$
    entity:
        field: dvc
        type: system
        score: 50
threat_objects:
    - field: process_name
      type: process_name
analytic_story:
    - IcedID
    - Living Off The Land
asset_type: Endpoint
mitre_attack_id:
    - T1218.011
product:
    - Splunk Enterprise
    - Splunk Enterprise Security
    - Splunk Cloud
category: network
security_domain: endpoint

Stages and Predicates

Stage 1: search

`sysmon` EventCode=22 process_name="rundll32.exe"

Stage 2: stats

| stats count min(_time) as firstTime max(_time) as lastTime
    BY answer answer_count dvc
       process_exec process_guid process_name
       query query_count reply_code_id
       signature signature_id src
       user_id vendor_product QueryName
       QueryResults QueryStatus

Stage 3: search

| `security_content_ctime(firstTime)`

Stage 4: search

| `security_content_ctime(lastTime)`

Stage 5: search

| `rundll32_dnsquery_filter`

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
EventCodeeq
  • 22 corpus 17 (splunk 17)
field:"EventID" kind:eq value:"22"
process_nameeq
  • "rundll32.exe" corpus 126 (elastic 100, splunk 26)
field:"process_name" kind:eq