The Lookalike Domain

Hard

· Backend

Incident

SEV-2

BUG-HOMOGLYPH

Priority: High (phishing) · reported by trust & safety

Time to fix: 35 min

Failing checks on the shipped build

  • the cyrillic clone is flagged

    U+0430 lookalike must be caught: expected a truthy value but got false

  • the real domain is not a spoof of itself

    expected a truthy value but got false

How to work this incident

  1. Read the report: write down the expected behaviour and the actual one in a sentence each.
  2. Reproduce it: run the visible tests and find the failing check that matches the report.
  3. Read the logs and the failing checks for the first value that is wrong — the earliest wrong value is nearer the cause than the loudest error.
  4. Follow the request through the handler, the validation and the service it calls; find the first step whose output disagrees with the report.
  5. Fix the cause rather than the symptom, run the visible tests again, and submit against the hidden ones — then write the root cause down.

Inspired by

IDN homographs

Inspired by IDN homograph attacks: register pаypal.com — with a Cyrillic а — and to human eyes it's indistinguishable from the real thing. Detection maps confusable characters to a "skeleton" and compares those.

The confusables table is locked. spoofcheck.py isn't using it.

Code map

confusables = bug_require("./confusables")

def is_spoof(candidate, trusted):
    return candidate.lower() == trusted.lower()

Sign in to edit the file, run the tests and submit a fix

A free account — no card, no trial clock. You come straight back here.

The Lookalike Domain — Python Bug Hunt

Inspired by IDN homograph attacks: register pаypal.com — with a Cyrillic а — and to human eyes it's indistinguishable from the real thing.

  • Language: Python
  • Layer: Backend
  • Difficulty: Hard
  • Concepts: Security, Unicode
  • Modelled on: IDN homographs
  • Visible tests: the cyrillic clone is flagged; the real domain is not a spoof of itself; genuinely different domains are fine
  • Reward: 50 XP for a complete fix

Incident

  • Severity: SEV-2 (priority: High (phishing))
  • Ticket: BUG-HOMOGLYPH
  • Reported by: trust & safety
  • Time to fix: 35 minutes, the target for a hard incident

Failing checks on the shipped build

  • the cyrillic clone is flagged — U+0430 lookalike must be caught: expected a truthy value but got false
  • the real domain is not a spoof of itself — expected a truthy value but got false

How to work this incident

  1. Read the report: write down the expected behaviour and the actual one in a sentence each.
  2. Reproduce it: run the visible tests and find the failing check that matches the report.
  3. Read the logs and the failing checks for the first value that is wrong — the earliest wrong value is nearer the cause than the loudest error.
  4. Follow the request through the handler, the validation and the service it calls; find the first step whose output disagrees with the report.
  5. Fix the cause rather than the symptom, run the visible tests again, and submit against the hidden ones — then write the root cause down.

Briefing

Inspired by IDN homograph attacks: register pаypal.com — with a Cyrillic а — and to human eyes it's indistinguishable from the real thing. Detection maps confusable characters to a "skeleton" and compares those.

The confusables table is locked. spoofcheck.py isn't using it.

Bug report

BUG-HOMOGLYPH · Priority: High (phishing) · Reported by: trust & safety

is_spoof(candidate, trusted):

  • True iff skeleton(candidate) == skeleton(trusted) AND candidate != trusted
  • the trusted domain itself is NOT a spoof of itself

Observed: the Cyrillic clone passes clean, and — worse — the check currently flags the REAL domain as a spoof of itself.

Logs

[registrar] "pаypal.com" (U+0430) cleared for registration
[alerts] "paypal.com" flagged as spoofing "paypal.com" (?!)

The code as shipped

src/sec/spoofcheck.py (editable)

confusables = bug_require("./confusables")

def is_spoof(candidate, trusted):
    return candidate.lower() == trusted.lower()

Read-only context: src/sec/confusables.py.

Open the hunt to start the incident clock, edit the files, run the visible tests and submit against the hidden ones, then write the root cause down. More Python bug hunts.