Skip to main content

Otacon — domain impersonation detection

CI status PyPI version Supported Python versions MIT licence

Install · Quick start · Triage console · Techniques · Usage · Scoring · CI/CD · FAQ

Otacon finds domains impersonating yours — typosquats, homoglyph fakes, combosquats, IDN/punycode tricks and more. It generates hundreds of variants, checks which are actually registered, and scores each by real-world phishing risk. One command, under a minute, no paid APIs.

otacon scan example.com — 234 permutations checked, registered lookalikes ranked by risk

Real output: a full scan of example.com — 240 permutations, 84 registered lookalikes at the time of recording; the verdict card and the ten riskiest rows. Registrations change daily, so a scan today shows different domains. Regenerate with python tools/render_demo_svg.py example.com assets/brand/demo-scan.svg.


Install

pipx install otacon      # isolated global install (recommended)
pip install otacon       # or into an active virtualenv

Python 3.12–3.13 on Linux, macOS or Windows. No system libraries are needed: the DNS engine (pycares) ships prebuilt wheels with c-ares built in.

Quick start

otacon scan example.com                   # full scan: DNS, MX, TLS, HTTP, WHOIS
otacon scan example.com --no-http         # DNS only — roughly 3x faster
otacon scan example.com --fail-on high    # CI gate: exit 2 on high or critical
otacon tui example.com                    # scan, then triage in the console
otacon tui --from report.json             # reopen a saved report
otacon generate example.com -o list.txt   # offline wordlist, no network traffic
otacon                                    # guided interactive mode

Global flags (--quiet, --debug, --version) go before the subcommand; everything else goes after it.

Exit code Meaning
0 Scan completed — nothing at or above --fail-on, or --fail-on was not passed
1 Runtime error (bad input, file I/O)
2 Threshold breached — at least one registered variant met it

Reports are written with --json, --md, --html and --csv; pass as many as you like, since every format renders from the same in-memory report.


What it checks

For every variant that resolves, Otacon gathers the signals below and turns them into one explained score. Each is a flag you can switch off when you want a faster or quieter scan.

Group Signals
Reachability A / AAAA records, HTTP status, redirect target, server header, NXDOMAIN-hijack canary
Mail MX records, SPF, DMARC policy — a lookalike with mail and no enforced DMARC is a ready-made sender
TLS Certificate issuer, age, and whether its SAN actually covers the host
Brand cloning Page title similarity to yours, and a favicon MurmurHash3 match (the Shodan/Censys hash)
Credential capture Password and auth inputs detected in the served page
Reputation Spamhaus DBL and SURBL listings, passively over DNS
Discovery Certificate Transparency logs, surfacing lookalikes already holding a certificate that no permutation rule would have guessed
Registration Creation date via RDAP over HTTPS, falling back to port 43 WHOIS

Three classifiers then override the arithmetic: a sinkholed or law-enforcement-seized domain drops to zero, so does a defensive registration that redirects to you without mail, and a parked domain has its traffic signals ignored. See docs/SCORING.md for every point value.


Why Otacon?

Phishing campaigns almost always start with a lookalike domain. Attackers register github-update.com, paypa1.com, goog1e.com weeks (or days) before the actual attack. By the time anyone notices, credentials are already gone.

Otacon is built for the people who need to find those domains before the attack lands:

Role Use case
Pentester / red team Reconnaissance — find existing lookalikes against the client's brand to include in scope or use in social-engineering tests
Blue team / SOC Scheduled audits of your own domain (e.g. a daily CI cron job) to catch a new fake fast, especially one with MX or fresh registration
Brand protection Audit hundreds of variants in one shot, export as JSON/HTML for the legal team or DMCA filings
CI/CD gate Block deploys when a critical impersonation is live (--fail-on critical)

Otacon is fully passive: DNS queries, a TLS handshake, one HTTP GET per variant. No exploit attempts, no auth, no scraping at scale.


Triage console

A scan of a busy brand returns a few hundred rows of which a handful matter. otacon tui keeps the whole report in memory and lets one hand work it.

otacon tui example.com            # scan, then open the console on the result
otacon tui --from report.json     # reopen a saved report, no network at all

otacon tui — dossier pane on the left, results table on the right, risk filters bound to the number keys

The dossier on the left tracks the cursor: every signal with a one-line explanation of what it means, then the full scoring breakdown. Arrows or j/k move, 1–5 filter to a single risk level, / filters by substring, a reveals unregistered variants, and w / t / e run WHOIS, render an abuse notice, and export the selected row. Full key map in docs/USAGE.md.

--from makes it a reader for anything already on disk, so a nightly otacon -q scan in CI can be triaged by hand the next morning without touching the network again.


Detection techniques

Otacon implements 12 permutation techniques modeled on real-world attacks. The homoglyph table covers all 26 letters, not just the handful that are easy to eyeball, and every Unicode entry in it is cross-checked against Unicode's own confusables.txt: 19 of the 25 share a UTS #39 skeleton with the letter they imitate. The other six (Cyrillic к, п, т, ь, plus ł and í) are kept on purpose — UTS #39 folds them elsewhere, but they render close enough in the sans-serif fonts browsers and mail clients use that real campaigns exploit them. Each of the six is labelled as such in the source, so nothing in the table is an unlabelled guess.

Technique Example (example.com) Real attack vector
Homoglyph examp1e.com, ex4mple.com Visual identity — humans can't tell the difference
IDN / Punycode xn--exampe-7db.com (l → ł) ACE-encoded unicode that browsers may render natively
Typo exmple.com, exsmple.com, exampel.com Fat-finger typing on QWERTY keyboards
Combosquat example-login.com, secureexample.com Adds "trust" keyword — common in phishing email links
TLD swap example.io, example.top, example.icu Same name, different (often cheap/abused) TLD
Subdomain spoof example.com.login.net Original domain as a label; URL-bar trickery
Bitsquat axample.com (e→a is one bit flip) DRAM/DNS memory errors flip a single bit
Hyphenation ex-ample.com Insert/remove a hyphen
Soundsquat eksample.com Phonetic substitution (ph/f, c/k, s/z, x/ks)
Vowel swap exomple.com, exumple.com Replace one vowel with another
Plural shops.com ← shop.com Singular ↔ plural variation
WWW-merge wwwexample.com Dot dropped between "www" and the domain — easy to misread

Certificate Transparency discovery runs alongside these: it finds lookalikes that already hold a certificate, including ones no permutation rule would generate. Those are reported as ct-log rather than as a technique, and subdomains of your own domain are dropped before scoring.

Every example above is real output, not an illustration. Each variant is reported once, under the first technique that produced it, and the original domain is never included — see docs/USAGE.md for why that matters when you read a report.


Documentation

Document What's in it
docs/USAGE.md Every CLI flag, the four modes, the triage console, whitelisting
docs/SCORING.md Every signal and its point value, risk-level thresholds
docs/OUTPUT.md The five output formats and the JSON schema
docs/CI.md Ready-to-paste GitHub Actions and GitLab CI pipelines
docs/FAQ.md Legality, speed, IDN handling, troubleshooting
docs/DESIGN.md Architecture and design rationale

Comparison with dnstwist

dnstwist is the OG tool in this space. Otacon and dnstwist solve overlapping problems with different priorities.

Otacon dnstwist
Risk score with explained signals ✓ 0–100, every point sourced ✗ raw signals only
Defensive-registration flag ✓ » on redirect-to-original ✗
CI/CD exit code gating ✓ --fail-on ✗
Self-contained HTML report ✓ dark theme, zero JS, pure-CSS filters, SVG charts, defanged IOCs partial (--format html)
Interactive post-scan triage ✓ open (OPSEC safe) / whois / takedown / rescan / allow ✗
Keyboard triage console (otacon tui) ✓ filter by risk, search, live dossier pane ✗
Automated abuse takedown notice ✓ formatted draft with technical evidence ✗
Permutation techniques 12 (with regional combosquatting for .pl, .de, .fr) 13+
Visual screenshots of pages ✗ ✓
Fuzzy/phonetic dictionary attacks ✓ soundsquat ✓
Registration data enrichment RDAP over HTTPS + WHOIS fallback WHOIS + GeoIP

Use dnstwist if you want screenshots, fuzzy hashing, deeper enrichment. Use Otacon if you want an opinionated risk score, defensive-flag detection, and a CI-friendly exit code.


Contributing

See CONTRIBUTING.md for the dev setup and the lint gates, and SECURITY.md for the disclosure policy.


License & ethics

MIT License. Use it freely.

Otacon is passive only — DNS queries, a TLS handshake, a single HTTP GET per variant. No exploit attempts, no brute-forcing, no auth.

Use only on:

  • Domains you own
  • Domains within an authorized security testing engagement (with written scope)
  • Domains you have explicit permission to monitor

Do not use to: harass, dox, or build attack tooling. If you found this useful for a defense engagement, say hi — feedback shapes the roadmap.

Metadata

Release files for otacon 2.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for otacon 2.1.0
File Size Uploaded Provenance Actions
otacon-2.1.0.tar.gz 145.9 kB With provenance Details for otacon-2.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for otacon 2.1.0
File Interpreter ABI Platform Actions
otacon-2.1.0-py3-none-any.whl Python 3 none any Details for otacon-2.1.0-py3-none-any.whl

Total release size: 252.2 kB

Release files / otacon-2.1.0.tar.gz

Download URL otacon-2.1.0.tar.gz
Size 145.9 kB
Tags Source
SHA-256 checksum
How to use checksums
eebca55bb2aa146b83334a66cc6d9c96aa183530ff76ff34a5b72237ff8e4b27
BLAKE2b-256 checksum
How to use checksums
a70a32f8fc8fa1fc8e27a0088174526aceec58f09a06459d4d65b2bc1fca527a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 28, 2026.

Transparency log

Release files / otacon-2.1.0-py3-none-any.whl

Download URL otacon-2.1.0-py3-none-any.whl
Size 106.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e0cfd63450cec4b0aabf2c65669ed1e191e7e6e6059f3ff3df5c9af3fb810b15
BLAKE2b-256 checksum
How to use checksums
f00039d2ae0f52f56b678bc637bd947cf2a9c590d86ea4fa6de6b6a7b89fdf1b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 28, 2026.

Transparency log

Security for otacon 2.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for otacon-2.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 28, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page