Domain permutation analysis

Domain permutation analysis systematically generates lookalike domain variants to identify potential typosquatting and brand impersonation. This guide covers permutation categories, scoring approaches, and how to prioritize thousands of candidates.

What it is#

Domain permutation analysis generates and evaluates domain name variants that users could confuse with a legitimate domain. Given an input like example.com, permutation tools produce hundreds or thousands of alternatives. An attacker might register any of them for phishing, traffic interception, or brand abuse. It is the discovery engine behind typosquatting permutation detection.

Permutation categories#

Different transformation types model different attacker strategies and user mistakes.

Omission removes one character at a time, as in examle.com and exmple.com. These model keyboard slips where a user misses a key.

Insertion adds a character next to existing ones, as in examplle.com and exaample.com. These catch accidental double-taps or autocomplete errors.

Transposition swaps adjacent characters, as in exmaple.com and examlpe.com. This is one of the most common real-world typos.

Replacement substitutes a character with a nearby key or a visually similar alternative. Examples are ezample.com (keyboard proximity) and examp1e.com (visual similarity).

Homoglyph substitution replaces characters with visually identical ones from other scripts. For example, exаmple.com uses Cyrillic а instead of Latin a. In a browser address bar, these are nearly indistinguishable.

TLD swaps change the top-level domain, as in example.net, example.co, and example.org. Users frequently misremember or mistype TLDs.

Hyphenation adds or removes hyphens, as in ex-ample.com and exam-ple.com. These exploit how quickly users scan URLs.

Additional techniques include subdomain prepending (example.com.attacker.com), vowel swapping, and plural/singular variations.

Domain protection

Detect adversary infrastructure while it is being staged.

Have I Been Squatted helps security teams detect lookalike domains, certificate and DNS changes, and staging infrastructure, investigate the evidence, and coordinate takedowns.

Scoring and prioritization#

Raw permutation output is too large to investigate manually. Scoring narrows the field by ranking candidates on multiple factors.

Registration status is the first filter. Unregistered permutations are potential defensive registrations but not immediate threats. Among registered domains, active DNS resolution separates live infrastructure from parked pages.

String similarity scores (Levenshtein distance, Jaro-Winkler, visual similarity) quantify how confusable each variant is. A homoglyph with an edit distance of 1 that renders identically in a browser ranks higher than a three-character transposition.

Infrastructure signals add further context. Hosting on a known-bad ASN, a recently issued TLS certificate matching the monitored brand, or web content mimicking a login page all raise priority.

Automation and tools#

Have I Been Squatted's twistrs library automates permutation generation and supports basic resolution checks. Enrichment extends that further, pulling WHOIS data, checking CT logs, and crawling content before scored results feed into triage queues for analyst review. Have I Been Squatted builds on this approach, combining permutation generation with real-time domain monitoring and enrichment to surface lookalike domains that warrant attention.

Open-source tools such as dnstwist also generate permutations from a domain you name. Have I Been Squatted vs dnstwist compares the two approaches.

Limitations#

No permutation engine covers every creative variation an attacker might invent. Homoglyph coverage depends on script support. Combinatorial explosion also means that longer domain names produce candidate sets too large to use. Permutation analysis works best as one input to a broader detection pipeline, not as a standalone solution.