Page MenuHomePhabricator

Bind MFA challenges to particular workflows, like signing a specific Legalpad document
ClosedPublic

Authored by epriestley on Dec 14 2018, 2:16 PM.
Tags
None
Referenced Files
Unknown Object (File)
Feb 3 2024, 8:18 PM
Unknown Object (File)
Feb 2 2024, 6:56 AM
Unknown Object (File)
Jan 31 2024, 1:36 AM
Unknown Object (File)
Jan 22 2024, 2:07 PM
Unknown Object (File)
Jan 22 2024, 2:05 PM
Unknown Object (File)
Jan 20 2024, 5:39 PM
Unknown Object (File)
Jan 17 2024, 8:33 PM
Unknown Object (File)
Jan 16 2024, 5:10 PM
Subscribers
Restricted Owners Package

Details

Summary

Depends on D19888. Ref T13222. When we issue an MFA challenge, prevent the user from responding to it in the context of a different workflow: if you ask for MFA to do something minor (award a token) you can't use the same challenge to do something more serious (launch nukes).

This defuses highly-hypothetical attacks where the attacker:

  • already controls the user's session (since the challenge is already bound to the session); and
  • can observe MFA codes.

One version of this attack is the "spill coffee on the victim when the code is shown on their phone, then grab their phone" attack. This whole vector really strains the bounds of plausibility, but it's easy to lock challenges to a workflow and it's possible that there's some more clever version of the "spill coffee" attack available to more sophisticated social engineers or with future MFA factors which we don't yet support.

The "spill coffee" attack, in detail, is:

  • Go over to the victim's desk.
  • Ask them to do something safe and nonsuspicious that requires MFA (sign L123 Best Friendship Agreement).
  • When they unlock their phone, spill coffee all over them.
  • Urge them to go to the bathroom to clean up immediately, leaving their phone and computer in your custody.
  • Type the MFA code shown on the phone into a dangerous MFA prompt (sign L345 Eternal Declaration of War).
  • When they return, they may not suspect anything (it would be normal for the MFA token to have expired), or you can spill more coffee on their computer now to destroy it, and blame it on the earlier spill.
Test Plan
  • Triggered signatures for two different documents.
  • Got prompted in one, got a "wait" in the other.
  • Backed out of the good prompt, returned, still prompted.
  • Answered the good prompt.
  • Waited for the bad prompt to expire.
  • Went through the bad prompt again, got an actual prompt this time.

Diff Detail

Repository
rP Phabricator
Branch
mfa9
Lint
Lint Passed
SeverityLocationCodeMessage
Advicesrc/applications/auth/engine/PhabricatorAuthSessionEngine.php:58XHP16TODO Comment
Unit
Tests Passed
Build Status
Buildable 21343
Build 29047: Run Core Tests
Build 29046: arc lint + arc unit