Detection rules › Splunk

Windows DNS Query Request To TinyUrl

Status
production
Severity
low
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 process located in a potentially suspicious location making DNS queries to known URL shortening services, specifically tinyurl. URL shorteners are frequently used by threat actors to obfuscate malicious destinations, including phishing pages, malware distribution sites, or command-and-control (C2) endpoints. While tinyurl.com is a legitimate service, its use in enterprise environments—particularly by non-browser processes or scripts—should be considered suspicious, especially if correlated with subsequent outbound connections, file downloads, process file path or credential prompts. Analysts should investigate the source process, execution context, and destination domain to determine intent and risk.

Known false positives

  • Noise and false positive can be seen if the following instant messaging is allowed to use within corporate network. In this case, a filter is needed.

MITRE ATT&CK coverage

TacticTechniques
Command & Control

Telemetry coverage

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

Rule body

name: Windows DNS Query Request To TinyUrl
id: b1ea79da-719c-437c-acaf-5c93f838f425
version: 5
creation_date: '2021-11-18'
modification_date: '2026-05-13'
author: Teoderick Contreras, Splunk
status: production
type: Anomaly
description: |
    The following analytic detects a process located in a potentially suspicious location making DNS queries to known URL shortening services, specifically tinyurl.
    URL shorteners are frequently used by threat actors to obfuscate malicious destinations, including phishing pages, malware distribution sites, or command-and-control (C2) endpoints.
    While tinyurl.com is a legitimate service, its use in enterprise environments—particularly by non-browser processes or scripts—should be considered suspicious, especially if correlated with subsequent outbound connections, file downloads, process file path or credential prompts. Analysts should investigate the source process, execution context, and destination domain to determine intent and risk.
data_source:
    - Sysmon EventID 22
search: |
    `sysmon`
    EventCode=22
    QueryName = "tinyurl.com"
    Image IN (
      "*\\AppData\\*",
      "*\\Perflogs\\*",
      "*\\ProgramData\\*",
      "*\\Temp\\*",
      "*\\Users\\Public\\*",
      "*\\Windows\\Tasks\\*"
      )
    | 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)`
    | `windows_dns_query_request_to_tinyurl_filter`
how_to_implement: |
    This detection relies on sysmon logs with the Event ID 22, DNS Query.
    We suggest you run this detection at least once a day over the last 14 days.
known_false_positives: |
    Noise and false positive can be seen if the following instant
    messaging is allowed to use within corporate network. In this case, a filter is needed.
references:
    - https://x.com/Unit42_Intel/status/1919418143476199869
intermediate_findings:
    entities:
        - field: dvc
          type: system
          score: 20
          message: Suspicious process $process_name$ made a DNS query for $QueryName$ on $dvc$
threat_objects:
    - field: process_name
      type: process_name
analytic_story:
    - Malicious Inno Setup Loader
asset_type: Endpoint
mitre_attack_id:
    - T1105
product:
    - Splunk Enterprise
    - Splunk Enterprise Security
    - Splunk Cloud
category: endpoint
security_domain: endpoint

Stages and Predicates

Stage 1: search

`sysmon`
EventCode=22
QueryName = "tinyurl.com"
Image IN (
  "*\\AppData\\*",
  "*\\Perflogs\\*",
  "*\\ProgramData\\*",
  "*\\Temp\\*",
  "*\\Users\\Public\\*",
  "*\\Windows\\Tasks\\*"
  )

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

| `windows_dns_query_request_to_tinyurl_filter`

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
EventCodeeq
  • 22 corpus 17 (splunk 17)
field:"EventID" kind:eq value:"22"
Imagein
  • "*\\AppData\\*"
  • "*\\Perflogs\\*"
  • "*\\ProgramData\\*"
  • "*\\Temp\\*" corpus 3 (splunk 3)
  • "*\\Users\\Public\\*"
  • "*\\Windows\\Tasks\\*"
field:"Image" kind:in
QueryNameeq
  • "tinyurl.com"
field:"QueryName" kind:eq