# Typosquatting

> Registering misspelled names of real sites or packages to catch people's typos.

- Level: Intermediate
- Topics: Security, Networks
- URL: https://tidbit.legios.com.ar/typosquatting/
- In Spanish: [Typosquatting](https://tidbit.legios.com.ar/es/typosquatting/)

**Typosquatting** means registering a domain name that is one slip away from a popular one: a swapped letter (`mybnak.com`), a missing letter, a different ending (`.co` instead of `.com`) or an extra hyphen. People who mistype the address, or who glance too quickly at a link, land on a site the attacker controls. It is a kind of cybersquatting, the broader practice of registering names that ride on someone else's brand.

What waits on the other side varies. Often it is just a page full of ads that pays per visit. Worse, it can be a perfect copy of the real login page that harvests passwords, a download of malware, or a domain used to send phishing emails that look like they come from the real company. Some lookalikes go further and use characters from other alphabets that look identical, like a Cyrillic "а" in place of a Latin "a"; that variant is called a homograph attack.

The same trick works on programmers. Attackers publish packages to registries like npm or PyPI under names close to popular ones, hoping someone types the name wrong in an install command. In 2017, for example, npm removed a package called `crossenv`, a lookalike of `cross-env` that sent the developer's environment variables to its author. That makes typosquatting a common entry point for a supply chain attack. Defenses: companies register the obvious misspellings of their own names, browsers and email filters flag lookalikes, and you can use bookmarks or a password manager, which will not autofill on the wrong domain.

## An analogy

A shop called "Starbuks" opening next to a Starbucks, hoping some customers walk in without reading the sign carefully.

## Keep in mind

- It bets on typos and quick glances at addresses.
- Lookalike sites serve ads, fake logins or malware.
- Misspelled packages in npm or PyPI target developers.
- Bookmarks and password managers help you avoid it.

## Go deeper

- [Typosquatting on Wikipedia](https://en.wikipedia.org/wiki/Typosquatting)
- [Cybersquatting on Wikipedia](https://en.wikipedia.org/wiki/Cybersquatting)

## Related terms

- [Domain name](https://tidbit.legios.com.ar/domain-name/): The readable name of a website, like wikipedia.org, that stands in for a numeric address.
- [Malware and ransomware](https://tidbit.legios.com.ar/malware-and-ransomware/): Software built to harm you; ransomware locks your files and charges to unlock them.
- [Phishing](https://tidbit.legios.com.ar/phishing/): A fake message that tricks you into handing over a password or a payment.
- [Environment variables](https://tidbit.legios.com.ar/environment-variables/): Named settings a program reads from outside its code, like where its database lives.
- [Supply chain attack](https://tidbit.legios.com.ar/supply-chain-attack/): Hacking a trusted supplier so its normal updates carry the attack to everyone else.
- [Web browser](https://tidbit.legios.com.ar/web-browser/): The app that fetches web pages from the internet and draws them on your screen.
- [Password manager](https://tidbit.legios.com.ar/password-manager/): An encrypted vault that remembers a different strong password for every site.
