Homograph Attacks: When a Fake URL Looks Exactly Like the Real One
A URL can look identical to the real one and still be fake. Learn how IDN homograph attacks abuse Unicode and Punycode, and how to protect yourself." slug: "homograph-attack-fake-url
7 min read
Contents
- 01Two identical letters that are not the same
- 02Why it is possible: internationalized domain names
- 03A threat known for more than twenty years
- 04How a typical attack unfolds
- 05Homograph, typosquatting: what is the difference?
- 06How browsers defend themselves
- 07Protecting yourself day to day
- 08In conclusion
- 09Further reading
You check the address, you see "airfrance.com", a fake URL, the padlock is there… and yet you are not on AirFrance's website. This is a homograph attack, where the human eye becomes the weakest link.
Two identical letters that are not the same
Compare these two addresses: airfrance.com and airfrance.com. On screen, nothing tells them apart. To a computer, however, they are two completely different domains: in the second one, the first "а" is not the Latin letter a (U+0061) but the Cyrillic letter а (U+0430). Same shape, different code.
That is the whole principle of a homograph (or homoglyph) attack: exploiting characters from different alphabets that look virtually identical to build an address that mimics that of a trusted website. Cyrillic and Greek provide dozens of them: Cyrillic о, е, р, с, х, у, the Greek ο (omicron), not to mention subtler digits and symbols.
Why it is possible: internationalized domain names
Originally, domain names could only contain unaccented Latin letters, digits and the hyphen. To open the Internet to other languages (Arabic, Chinese, Russian, but also French with its accents), internationalized domain names, or IDNs, were introduced in the early 2000s.
Technically, the DNS system still only handles ASCII. A name containing Unicode characters is therefore converted into a format called Punycode, recognizable by its xn-- prefix. For example, an address displayed as "аррӏе.com", entirely in Cyrillic, actually corresponds to xn--80ak6aa92e.com. The browser decodes this Punycode to display a readable version… and that is precisely where the trap closes.
The idea was excellent for accessibility. It simply opened up, at the same time, a tremendous playground for fraudsters.
A threat known for more than twenty years
The problem is not new. Researchers Evgeniy Gabrilovich and Alex Gontmakher formally described it as early as 2002 in a paper titled The Homograph Attack, showing that a fake "microsoft.com" could be registered using Cyrillic letters. The first phishing attempts exploiting IDNs, targeting PayPal and eBay in particular, were documented around 2005.
The most striking episode remains the one from 2017. Researcher Xudong Zheng registered the domain xn--80ak6aa92e.com and set up a demonstration page on it. In Chrome, Firefox and Opera, the address bar displayed… "apple.com". Since all the letters were Cyrillic, the protections of the time, which mainly watched for mixed alphabets, saw nothing abnormal. Google fixed the flaw in Chrome 58 by adding detection of domains made entirely of Cyrillic lookalikes of Latin letters.
How a typical attack unfolds
- Choose a target: a bank, an email service, a payment platform, or a company's internal portal.
- Build a lookalike: replace one or more letters of the legitimate domain with visually identical characters.
- Register the domain with a registrar that accepts IDNs.
- Obtain a TLS certificate: nothing could be simpler, certificate authorities issue certificates for IDNs. The padlock appears, which falsely reassures the victim.
- Clone the target's website and place a login or payment form on it.
- Spread the link via email, SMS, instant messaging, QR code or sponsored ads, usually with a message that creates urgency ("your account will be suspended").
- Harvest credentials, card numbers, one-time codes or session tokens.
Emails are a particularly effective vector: many email clients display the sender's address or links in Unicode without indicating the alphabet used. In CEO fraud or fake supplier scams (BEC), a homograph domain of the company or of a partner makes the deception almost undetectable.
Homograph, typosquatting: what is the difference?
They are often confused, but they are two distinct techniques:
- Typosquatting relies on a typo or a moment of inattention: gooogle.com, paypa1.com, rnicrosoft.com ("rn" imitating "m"). With a little attention, it can be spotted.
- The homograph attack uses characters that are actually different but visually identical. Even an attentive user cannot see it with the naked eye.
The two are, in fact, readily combined in phishing campaigns.
How browsers defend themselves
Faced with this risk, browsers have adopted a seemingly simple rule: when a domain name looks suspicious, display it in Punycode (xn--…) rather than in Unicode. An xn-- address in the address bar is an immediate warning sign.
It remains to decide what is "suspicious". Each browser has its own policy:
- Chrome (and Edge, which is built on the same engine) evaluates each part of the name separately and switches to Punycode in case of confusing alphabet mixing, a domain made entirely of lookalikes, patterns deemed dangerous, or too strong a resemblance to a highly visited site. It can also display a "lookalike domain" warning before loading the page.
- Firefox relies on the restriction profiles defined by the Unicode Consortium and reserves more permissive display for domain extensions whose registries themselves enforce anti-homograph rules. It also lets you force Punycode display for all IDNs via the
network.IDN_show_punycodesetting. - Safari also converts domains that mix alphabets into Punycode.
These protections are real but imperfect. The rules are complex, the character combinations nearly infinite, and researchers regularly demonstrate new bypasses. Above all, they only protect the address bar: a link in an email, a document or a messaging app does not necessarily benefit from the same safeguards.
Protecting yourself day to day
For individuals
- Access sensitive websites (bank, taxes, email) through a bookmark or by typing the address, never via a link you received.
- Be wary of any address that starts with
xn--when you thought you were visiting a well-known site. - Use a password manager: it recognizes the real domain and will refuse to fill in your credentials on a lookalike, even a perfect one. It is one of the best protections against this type of attack.
- Enable two-factor authentication, preferably with a security key or a passkey, which are tied to the real domain and do not work on an imitation site.
- Remember that the padlock does not prove the site's identity, only that the connection is encrypted.
For businesses
- Monitor registrations of domains resembling your brands and, for the most exposed ones, defensively register the most obvious variants.
- Configure your email filters to detect homoglyphs and recently created domains; email security solutions on the market generally include this type of rule.
- Deploy SPF, DKIM and DMARC to limit spoofing of your own domain.
- Include the example of the "identical but fake" URL in your awareness sessions: it leaves a lasting impression.
- In code and software supply chains, also beware of homograph package names: the technique is not limited to URLs.
In conclusion
The homograph attack perfectly illustrates a truth of computer security: what you see is not always what is. Browsers have made real progress, but no display rule will ever be able to cover every possible resemblance among Unicode's thousands of characters. The best defense is therefore not to depend on your eyes: bookmarks, a password manager and strong authentication are what make the difference between a Latin a and a Cyrillic а.
Further reading
I'm a passionate Backend Developer & AI Enthusiast with experience in C/C++/C#, Python, React, Docker, GitHub Actions, PostgreeSQL and MySQL. I love tackling complex problems, learning new skills, and collaborating with diverse teams to create innovative solutions.
Comments
Comments are reviewed before publication.