Skip to content

Conversation

wbamberg
Copy link
Collaborator

@wbamberg wbamberg commented Sep 12, 2025

Here's a new article on phishing attacks.

  • I went back and forth a bit on how much to talk about the details of WebAuth. Minimally we could just say "a passkey is associated with an origin, and the browser will never allow the user to choose the passkey for the real site when the user is on the fake site". But it felt worth talking a bit more than this.
  • I'm not sure how much to talk about "downsides" of passkeys. I do feel like the tooling isn't so mature at the moment and things like passkey export are a bit unclear. But I don't know much about this (yet).
  • I was also on the fence about including the bit on security indicators. In the end I have included it but not recommended it.

@github-actions github-actions bot added Content:Security Security docs size/m [PR only] 51-500 LoC changed labels Sep 12, 2025
6. The user's authenticator app generates the same TOTP, and the user enters it on the fake site.
7. The fake site relays the TOTP to the real site, and the attacker is given access.

![](TOTP-phish.svg)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[markdownlint] reported by reviewdog 🐶
MD045/no-alt-text Images should have alternate text (alt text)

@Josh-Cena
Copy link
Member

Another defense I've seen websites do, is ask the user to enter a custom phrase that is displayed on the login page. That way, unless the phishing site knows the custom phrase (which is as bad and as hard as knowing the actual credentials), the user will be alerted that it's not the real site. This is perhaps significantly easier to implement than OTP and passkeys.

Copy link
Contributor

github-actions bot commented Sep 15, 2025

Preview URLs

Flaws (3)

Note! 2 documents with no flaws that don't need to be listed. 🎉

URL: /en-US/docs/Web/Security/Attacks/Phishing
Title: Phishing
Flaw count: 3

  • macros:
    • Can't resolve /en-US/docs/Glossary/multi-factor_authentication
  • unknown:
    • Error serializing baseline for numeric-seperators: missing field description``
    • Error serializing baseline for single-color-gradients: missing field description``
External URLs (4)

URL: /en-US/docs/Web/Security/Attacks/Phishing
Title: Phishing

(comment last updated: 2025-09-17 22:42:25)

@wbamberg
Copy link
Collaborator Author

Another defense I've seen websites do, is ask the user to enter a custom phrase that is displayed on the login page. That way, unless the phishing site knows the custom phrase (which is as bad and as hard as knowing the actual credentials), the user will be alerted that it's not the real site. This is perhaps significantly easier to implement than OTP and passkeys.

I do remember some sites that used to do this a long time ago. Is it still current practice? Do you know any significant sites that still do this (e.g. banking sites)? I think it would still be vulnerable to the adversary in the middle attack, and I wonder how well defenses based on users paying attention work against attacks that are really all about users who are not paying attention...

@Josh-Cena
Copy link
Member

I have a banking site that does this, but everything else about the site is old enough so I'm not sure if it's in trend in general. Nevertheless I think it's a viable practice to recommend, especially for low-capability developers or needing to support extremely esoteric setup.

vulnerable to the adversary in the middle attack

Isn't that solved by HTTPS?

users paying attention work against attacks that are really all about users who are not paying attention

Yeah that's true. It has to be baked into the UI and the user has to be accustomed to seeing it. Anyway the site looks like this:

Screenshot 2025-09-15 at 15 30 38

* upstream/main: (32 commits)
  FF143 GPU import external texture experimental relnote (mdn#41126)
  added ff release note for nested pseudo-elements (mdn#41146)
  Add a page for SSRF attacks (mdn#41105)
  New CSSOM view API landing page, move CSS guides under (mdn#40547)
  40778 color input value (mdn#41086)
  Synchronize with BCD v7.1.5 (mdn#41116)
  Cross-reference `:target` and `::target-text` pages (mdn#41121)
  Fix content issues (mdn#41125)
  Make all JSON code syntactically valid (mdn#41120)
  Fix the link name with actual heading (mdn#41117)
  Associated listed form controls (mdn#41096)
  Mention `new Set()` accepts `undefined` (mdn#41106)
  chore: correct the `timeRange` function name (mdn#41107)
  Mention that custom elements constructors can't be directly called (mdn#41069)
  chore(deps): bump @mdn/fred from 1.3.2 to 1.4.0 (mdn#41111)
  Public-key cryptography glossary page: add headings and links (mdn#41092)
  Improve caret color demo contrast (mdn#41104)
  Fix supported algorithms for HKDF and PBKDF2 (mdn#41100)
  Update MongoDB example to async/await (driver v5+) (mdn#41102)
  Remove onload and DOMContentLoaded handlers (mdn#41079)
  ...
@github-actions github-actions bot added the Content:Glossary Glossary entries label Sep 15, 2025
@wbamberg wbamberg marked this pull request as ready for review September 16, 2025 17:44
@wbamberg wbamberg requested a review from a team as a code owner September 16, 2025 17:44
@wbamberg wbamberg requested review from dipikabh and Elchi3 and removed request for a team and dipikabh September 16, 2025 17:44

Phishing is a very old but still very common attack, which has gone through many variations, both to evade defenses and to take advantage of new vulnerabilities. In a basic form, though:

1. The attacker registers a domain name that resembles the target site. For example, if the user's banking website is `my-bank.example.com`, the attacker could register `my-bank.examp1e.com`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Optional: I think it might be worth calling out some tricks specifically. For example, say that unicode tricks (e.g. cyrillic ‘а’ vs Latin ‘a’) might get used and that the fake site might still use HTTPS and the original site's favicon to make the fake appear legitimate.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's also semantic attack (which was briefly mentioned in https://developer.mozilla.org/en-US/docs/Web/URI/Reference/Authority, although I just realized the Wikipedia link on that page is talking about a slightly different thing).

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could add this, but I'm not sure it's that important in this guide to go into specific things attackers can do to make the fake domain resemble the target. None of this is actionable for developers AFAIK.

Copy link
Member

@Elchi3 Elchi3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great to me, Will!

Given many phishing attacks come via email I wondered what to do and I think this Cloudflare article has some good advice: https://www.cloudflare.com/learning/email-security/how-to-prevent-phishing/ From that we could maybe say that properly configuring SPF, DKIM, or DMARC email checks would be a thing that developers / domain owners should do? (among other things)

@wbamberg
Copy link
Collaborator Author

This looks great to me, Will!

Given many phishing attacks come via email I wondered what to do and I think this Cloudflare article has some good advice: https://www.cloudflare.com/learning/email-security/how-to-prevent-phishing/ From that we could maybe say that properly configuring SPF, DKIM, or DMARC email checks would be a thing that developers / domain owners should do? (among other things)

I have added a bit on this although I'm not sure how well I understand it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Content:Glossary Glossary entries Content:Security Security docs size/m [PR only] 51-500 LoC changed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants