Common Typosquatting Patterns
What you'll learn: You'll discover the specific naming tricks attackers use to create fake packages that look almost identical to legitimate ones.
Understanding the Patterns
Once an attacker decides to impersonate a popular package (the typosquatting attack technique we covered earlier), they need to choose a deceptive name. They rely on predictable human typing errors and visual similarities. Think of it like a con artist creating a fake Starbucks called "Starbucsk" or "5tarbucks" — close enough that rushed customers might not notice.
Character Substitution
Swapping letters that are close on the keyboard or look similar:
express→expres5(s replaced with 5)lodash→1odash(l replaced with number 1)react→raect(adjacent keys swapped)
Homoglyphs
Using characters from different alphabets that look identical:
requests→rеquests(Cyrillic 'е' instead of Latin 'e')numpy→nսmpy(Armenian 'ս' instead of 'u')
These are nearly impossible to spot visually but are completely different packages.
Missing Characters
Dropping a single letter from common package names:
express→exprestensorflow→tensorflw
Extra or Repeated Characters
Adding characters users might accidentally type:
django→djjangoaxios→axioss
Hyphenation and Word Breaks
Breaking compound names differently:
my-package→mypackageormy_packageredis-client→redisclient
Key Takeaway: Typosquatters exploit predictable human errors through character substitution, look-alike symbols (homoglyphs), missing/extra characters, and punctuation variations. Always double-check package names character-by-character before installation, especially for critical dependencies.