Detection rules › Panther

Panther rules: fuzzy

Cisco Umbrella Domain Name Fuzzy Matching

#
Severity
medium
Log types
CiscoUmbrella.DNS
Tags
Configuration Required, DNS
Reference
umbrella.cisco.com
Source
github.com/panther-labs/panther-analysis

Identify lookups to suspicious domains that could indicate a phishing attack.

Detection logic

from difflib import SequenceMatcher

DOMAIN = ""  # The domain to monitor for phishing, for example "google.com"
ALLOW_SET = {
    # List all of your known-good domains here
}
SIMILARITY_RATIO = 0.70


def rule(event):
    # Domains coming through umbrella end with a dot, such as google.com.
    domain = ".".join(event.get("domain").rstrip(".").split(".")[-2:]).lower()

    return (
        domain not in ALLOW_SET
        and SequenceMatcher(None, DOMAIN, domain).ratio() >= SIMILARITY_RATIO
    )


def title(event):
    return f"Suspicious DNS resolution to {event.get('domain')}"

Rule specification

AnalysisType: rule
Filename: fuzzy_matching_domains.py
RuleID: "CiscoUmbrella.DNS.FuzzyMatching"
DisplayName: "Cisco Umbrella Domain Name Fuzzy Matching"
Enabled: false
DedupPeriodMinutes: 15
LogTypes:
  - CiscoUmbrella.DNS
Tags:
  - Configuration Required
  - DNS
Reference: https://umbrella.cisco.com/blog/abcs-of-dns
Severity: Medium
Description: Identify lookups to suspicious domains that could indicate a phishing attack.
Runbook: |
  Validate if your organization owns the domain, otherwise investigate the host that made
  the domain resolution.

# Tests:
#   -
#     Name: Phishing Domain
#     ExpectedResult: true
#     Log:
#       {}

Stages and Predicates

Rule logic imperative Python

The parser could not express this rule's Python logic as a structured condition; the complete logic is under Detection logic above.

Alert deduplication
repeat matches within 15m group into one alert

Output fields

Fields the rule emits when it matches, drawn from the rule's alert_context.

Field
domain

Response runbook

Validate if your organization owns the domain, otherwise investigate the host that made

the domain resolution.