1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-30 18:52:42 +01:00
phorge-phorge/src/applications/auth/storage
epriestley 46052878b1 Bind MFA challenges to particular workflows, like signing a specific Legalpad document
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.

Reviewers: amckinley

Reviewed By: amckinley

Subscribers: PHID-OPKG-gm6ozazyms6q6i22gyam

Maniphest Tasks: T13222

Differential Revision: https://secure.phabricator.com/D19889
2018-12-18 12:06:16 -08:00
..
PhabricatorAuthChallenge.php Bind MFA challenges to particular workflows, like signing a specific Legalpad document 2018-12-18 12:06:16 -08:00
PhabricatorAuthDAO.php Add storage for Auth configuration in preparation for moving it into a web interface 2013-06-17 10:48:41 -07:00
PhabricatorAuthFactorConfig.php Bind MFA challenges to particular workflows, like signing a specific Legalpad document 2018-12-18 12:06:16 -08:00
PhabricatorAuthHMACKey.php Support HMAC+SHA256 with automatic key generation and management 2017-04-06 15:42:59 -07:00
PhabricatorAuthInvite.php Send emails for email invites 2015-02-11 06:06:09 -08:00
PhabricatorAuthPassword.php Give PhabricatorAuthPassword a formal CAN_EDIT policy 2018-08-16 11:53:24 -07:00
PhabricatorAuthPasswordTransaction.php Consolidate password verification/revocation logic in a new PhabricatorAuthPasswordEngine 2018-01-23 10:54:49 -08:00
PhabricatorAuthProviderConfig.php Remove empty implementations of describeAutomaticCapabilities() 2016-11-09 15:24:22 -08:00
PhabricatorAuthProviderConfigTransaction.php Update Auth for new UI 2016-03-31 13:51:12 -07:00
PhabricatorAuthSession.php Upgrade sessions digests to HMAC256, retaining compatibility with old digests 2018-12-13 16:15:38 -08:00
PhabricatorAuthSSHKey.php Manage object mailKeys automatically in Mail instead of storing them on objects 2018-04-25 06:46:58 -07:00
PhabricatorAuthSSHKeyTransaction.php Add a bin/auth revoke revoker for SSH keys 2018-01-22 15:35:07 -08:00
PhabricatorAuthTemporaryToken.php Remove empty implementations of describeAutomaticCapabilities() 2016-11-09 15:24:22 -08:00