linux_protocol_doh

YARA-2020-0114 Medium general Active

DNS-over-HTTPS yara rule

linux_protocol_doh.yar Valid Syntax
rule linux_protocol_doh
{
    meta:
        author      = "@_lubiedo"
        date        = "2020-08-04"
        description = "DNS-over-HTTPS yara rule"
    strings:
        $path = "dns-query"

        // servers
        $s0 = "cloudflare-dns.com"
        $s1 = "mozilla.cloudflare-dns.com"
        $s2 = "dns.google"
        $s3 = "dns.quad9.net"
        $s4 = "dns9.quad9.net"
        $s5 = "dns10.quad9.net"
        $s7 = "dns11.quad9.net"
        $s9 = "security-filter-dns.cleanbrowsing.org"
        $s10= "family-filter-dns.cleanbrowsing.org"
        $s11= "adult-filter-dns.cleanbrowsing.org"
        $s12= "dns.adguard.com"
        $s13= "dns-family.adguard.com"
        $s14= "doh.xfinity.com"

    condition:
        uint32(0) == 0x464c457f and $path and any of ($s*)
}

Rule Metadata

author
@_lubiedo
date
2020-08-04
description
DNS-over-HTTPS yara rule

String Definitions

{"name":"$path","value":"\"dns-query\"\n\n \/\/ servers"}
{"name":"$s0","value":"\"cloudflare-dns.com\""}
{"name":"$s1","value":"\"mozilla.cloudflare-dns.com\""}
{"name":"$s2","value":"\"dns.google\""}
{"name":"$s3","value":"\"dns.quad9.net\""}
{"name":"$s4","value":"\"dns9.quad9.net\""}
{"name":"$s5","value":"\"dns10.quad9.net\""}
{"name":"$s7","value":"\"dns11.quad9.net\""}
{"name":"$s9","value":"\"security-filter-dns.cleanbrowsing.org\""}
{"name":"$s10","value":"\"family-filter-dns.cleanbrowsing.org\""}
{"name":"$s11","value":"\"adult-filter-dns.cleanbrowsing.org\""}
{"name":"$s12","value":"\"dns.adguard.com\""}
{"name":"$s13","value":"\"dns-family.adguard.com\""}
{"name":"$s14","value":"\"doh.xfinity.com\""}

Threat Analysis

This YARA rule is designed to detect general threats.

Severity Level: Medium

The rule uses pattern matching to identify specific byte sequences, strings, or behavioral patterns associated with malicious activity.

Detection Capabilities

  • File-based detection for executables and documents
  • Memory scanning for running processes
  • Network traffic analysis support

Command Line Usage

# Scan a single file
yara linux_protocol_doh.yar /path/to/suspicious/file

# Scan a directory recursively
yara -r linux_protocol_doh.yar /path/to/directory/

# Scan with metadata output
yara -m linux_protocol_doh.yar target_file

# Scan process memory (Linux)
yara linux_protocol_doh.yar /proc/[pid]/exe

Integration Examples

Python (yara-python)

import yara
rules = yara.compile(filepath='linux_protocol_doh.yar')
matches = rules.match('/path/to/file')

ClamAV Integration

clamscan --yara-rules=linux_protocol_doh.yar /path/to/scan

Rule Information

YARA ID
YARA-2020-0114
Created
August 19, 2025
Last Updated
August 19, 2025
Last Imported
Never

Threat Intelligence

Risk Level Medium
Category general
Detection Confidence Analysis Pending
False Positive Rate Not Available
Last Seen in Wild No Data

Export Options