Skip Navigation

Is it bad to expose the 2FA codes?

In a few weeks I'll do a workshop about security for people who are tech illiterate, I plan to teach about password managers and 2FA.

If I show the 2FA number codes, like the 123 456 ones that I have to paste when required, can that be a possible security breach for me? or is it save since is gonna change in a few seconds anyway?

23 comments
  • I'd probably edit a few example screenshots for a purpose like that.

    If you really want to show it live on an actual device, then maybe with a throwaway/dummy account

    • Yea I think that is most valuable as you can include the setup and answer questions people may have. What is obvious to us may not be obvious to them.

  • I would assume there aren't any security concerns as:

    • You are not showing the seed used to generate the actual codes
    • this is for non tech-savy users
  • It's good to keep in mind that while it does improve the overall security of the account, a 2FA/TOTP code can still be phished, so if the user encounters a fake login page and supply his password and 2FA code, it could let an attacker pass the intercepted credentials to the real login page in the background and gain access. Most websites using TOTP will not allow reusing a code more than once in the same time slot, but that's a moot point if the 2FA code is intercepted without being entered on the legitimate website, but in your case of making a demonstration that would not be a security concern.

    It's important for the user to ensure they're accessing the legitimate website before typing any credentials and 2FA code.

    A safer option nowadays is FIDO2/Passkeys, which will not provide a valid 2FA challenge-response in the case of a spoofed/phishing website, further reducing the possibility of a breach.

  • 2FA (if it’s true 2 factor), each unique code is also challenged against your password and has a lifespan of all but 30 seconds. Wait a minute before showing the slides, they’ll just be useless numbers by then.

    They cannot be reverse engineered in some way as to hack any account. At least not to anyone’s knowledge.

  • As you suspect, only during the sixty or so seconds that they are valid.

    SMS-based codes tend to be longer lived.

    They're useless without your other authentication factors, e.g. login, password.

23 comments