Addressing User Authentication Challenges For Cryptocurrency Exchange: New Threat Model and Implementation Considerations
Addressing User Authentication Challenges For Cryptocurrency Exchange: New Threat Model and Implementation Considerations
Oleg Makarov,
Glanc, Ltd
Addressing user
authentication challenges
for cryptocurrency exchange:
Executive summary
There is no reliable way to achieve a reasonable level of security with passwords only II in
the context of protecting high-value resources, yet passwords are the necessary first layer
of protection (given the server-side credential storage is implemented in a secure manner III).
To maintain a proper balance of security and usability, it is necessary to be flexible in
protection requirements, in accordance with the monetary value at risk.
1 It would be unwise to completely ignore the NIST 800-63 Digital Identity Guidelines, yet those are even less relevant
for our case as a high-level approach; however, it is still a valuable reference material for many technical aspects.
2
It is advised to implement additional authorization to perform high-risk operations
(substantial funds transfer or changing access credentials), and in a case when a risky
method is used for credentials management (like, changing the primary email address tied
to an account while no secondary secure authorization method is defined).
3
1 — Type and description; 2 — Application Authentication methods comparison
Threats and attack
Mitigation Notes
1
2 characteristics
Online brute force attacks. Behavior analysis, rate Some users would
Password
Main
COST: VARIES
RISK: HIGH
COST: VARIES
RISK: MEDIUM
4
1 — Type and description; 2 — Application Authentication methods comparison
Threats and attack
Mitigation Notes
1
2 characteristics
Lost/stolen credentials on Out of scope – Stronger passwords
Password
Main
(offline attacks). page would not be stored in out to the user, you cannot
COMPLEXITY: MEDIUM browser cache; download control it.
should be on demand and
COST: VARIES not unsolicited.
RISK: MEDIUM
RISK: MEDIUM
1 Unfortunately, email marketing tools like MailChimp made “nonsense URLs” a new norm (the HTML letters make
it even easier, and do not require a 3rd-party – in HTML you may plainly hide a URL behind any word (looks like
everything is designed to confuse a user)). And EV certificates are obviously dying out. Anyway, there is no systemic
solution to the phishing problem and never was.
5
1 — Type and description; 2 — Application Authentication methods comparison
Threats and attack
Mitigation Notes
1
2 characteristics
Lost/stolen credentials on Out of scope – More likely lost than stolen.
Recovery codes
Recovery
COST: VARIES
RISK: MEDIUM
COST: VARIES
RISK: LOW
Online brute force attacks, Recovery questions are Truly random huge answers
Control questions
Recovery
social engineering attacks, evil, don’t use them. would be not any worse
data mining attacks. than passwords, but the
COMPLEXITY: LOW existence of recovery
questions as we know it
COST: LOW certainly encourages users
to dangerous behavior.
RISK: HIGH
6
1 — Type and description; 2 — Application Authentication methods comparison
Threats and attack
Mitigation Notes
1
2 characteristics
Identity theft, third Works better if a user has If no “deposited” identity
Physical identification (remote)
Recovery
COST: HIGH
RISK: MEDIUM
Mail server compromised. End to end email Today most users rely on
COMPLEXITY: HIGH encryption, make sure cloud email providers which
recovery links a) expire are usually reasonably
COST: HIGH after a brief period; secure, yet we should
b) cannot be reused. include this risk in the
RISK: MEDIUM threat model because
environment may vary.
7
1 — Type and description; 2 — Application Authentication methods comparison
Threats and attack
Mitigation Notes
1
2 characteristics
Mail account compromised End to end email End to end email
Recovery links sent via email
Recovery
COST: LOW
RISK: HIGH
COST: LOW
RISK: MEDIUM
COST: VARIES
RISK: LOW
COST: LOW
RISK: MEDIUM
8
1 — Type and description; 2 — Application Authentication methods comparison
Threats and attack
Mitigation Notes
1
2 characteristics
Compromised mobile Out of scope – This type of risk could be
SMS codes and links
Main, Recovery, Additional
COST: MEDIUM
RISK: MEDIUM
RISK: MEDIUM
COST: LOW
RISK: HIGH
COST: MEDIUM
RISK: MEDIUM
9
1 — Type and description; 2 — Application Authentication methods comparison
Threats and attack
Mitigation Notes
1
2 characteristics
SMS interception via the Limiting lifespan of links Could be “low”, but actually
SMS codes and links
Main, Recovery, Additional
RISK: MEDIUM
COST: HIGH
RISK: LOW
RISK: MEDIUM
Key seed lifecycle Do not use tokens that See RSA SecurID breach
management issues. are pre-programmed with story.
COMPLEXITY: HIGH vendor keys.
COST: HIGH
RISK: LOW
10
1 — Type and description; 2 — Application Authentication methods comparison
Threats and attack
Mitigation Notes
1
2 characteristics
Server-side application Implementation review, Need to pay attention to
Hardware OTP tokens
Main, Additional
RISK: MEDIUM
RISK: HIGH
11
1 — Type and description; 2 — Application Authentication methods comparison
Threats and attack
Mitigation Notes
1
2 characteristics
Compromised endpoints Even if certificate is used, Using a certificate token
X.509 certificates (hardware storage)
Main, Additional
COST: LOW
RISK: MEDIUM
Compromised endpoints
X.509 certificates (software storage)
Main, Additional
(online attacks).
COMPLEXITY: MEDIUM
COST: VARIES
RISK: MEDIUM
12
1 — Type and description; 2 — Application Authentication methods comparison
Threats and attack
Mitigation Notes
1
2 characteristics
Compromised endpoints Passphrase protection of This risk is generally higher
X.509 certificates (software storage)
Main, Additional
COST: VARIES
RISK: MEDIUM
COST: LOW
RISK: MEDIUM
High-risk operations
It is advised to implement additional authorization to perform high-risk operations
(substantial funds transfer or changing access credentials), and in case a risky method is
used for credentials management (like changing the primary email address tied to account
while no secondary secure authorization method is defined).
Additional authorization may include methods mentioned in this document or anything
out of its scope, yet deemed feasible (obtaining a biometric voiceprint via a phone call,
for example).
13
Guard period and funds lock-in
In the context of resisting credit card fraud the following practice is very successful.
Funds that were deposited to the account via a credit card payment remain unavailable
for withdrawal / external transfers for a specific period, typically 5-10 days. We advise
extending this type of lock-in to all cases of account access when the account access
authenticity cannot be immediately verified, as described below in “Credentials
management scenarios” section.
Event notifications
Message delivery methods that were deemed insufficiently secure to be used to send one-
time codes for authentication or authorization purposes, like SMS and email, could still
be useful to keep the user aware of operations being performed on his account. However,
the best known way is to sign individual operations with hardware electronic signature
token that is also capable of displaying detailed information about what exactly the signed
operation is. When altering notification methods, the change should not be in effect
immediately: the old method should remain active (and clearly marked for retention in all
notifications) at least for 5 days, giving the user an option to contact the customer support
in case of suspected fraud.
14
We consider credentials (and user contact methods that may be relevant for access
recovery) to be one of three types:
1. SECURE – any type of credentials that could be reasonably presumed to be secure
if appropriately handled on the client side. Secure credentials include any type of
a second factor, such as software or hardware tokens, or one-time codes used for
access recovery; PGP-encrypted email; it does not include reusable passwords,
because passwords are susceptible to numerous threats and once compromised could
be used for further access indefinitely. Caveat: the term “secure” should not be taken
literally as an absolute characteristic; there are attack scenarios (see table above) that
are still possible when using this type of credentials, just the residual risk is lower.
2. INSECURE – any type of credentials that either likely to be partially outside
of user’s control (plaintext email, phone numbers) or could be easily reused once
compromised (passwords).
3. INTRINSIC – user identification which is presumed to be protected from arbitrary
manipulation by “real world” constraints; this includes government-issued ID’s,
biometric data and so on. Using this type of identification may have privacy drawbacks,
and requires a trusted, established process which is likely to be slow. This method
requires human support intervention, and thus we do not cover it in details. It is
recommended, however, that the guard period would be in effect after using this
method as well.
Some kind of “secure” credentials is required to be set up to get full account access.
Say, two-part verification code consisting of a link sent via e-mail and a PIN sent to a
phone is not reliable, because if the phone is compromised, it is very likely that email
would be taken over as well. The security is not cumulative! Pay attention to the real world
dependencies between the auth methods (outside of the secure system in question).
For example:
If you have presented a password and an OTP token (the same combination which is
enough to log in), you may change email or phone.
If you have email access and OTP (or backup codes), you may request instant password
recovery (that’s why you probably do not want to keep both in a single place, like
authenticator app and mobile email account being on the same smartphone);
If you have email access but no OTP nor backup codes, then the password recovery should
be burdened with a guard period.
15
If you have lost both access to your email and your password, but have your OTP code, you
need to contact the customer support first, and the account should be, after appropriate
identity verification, limited with guard period.
All those operations should be accompanied by email notification and SMS notification if a
phone number is set.
Adding recovery methods, and changing authentication methods should be possible with
additional authorization only. Customers are encouraged to routinely review authentication
and recovery methods that are enabled for their accounts. (it is important to note that
typical user interfaces are not review-friendly)
16
should be provided. Otherwise, he must write down a recovery code and keep it in a
safe place until he acquires the hardware he needs. The current session is considered
to be secure and provides full access to credential management until the user logs out
or is logged out automatically.
• If a user makes an initial payment with a credit card, a guard period is imposed over
the funds regardless of the amount.
• If a user made an initial payment with a credit card, the same credit card could be
used to reinstate account access after a possible registration glitch if it has 3DSecure
support or equivalent.
Acknowledgements
We would like to express our gratitude to Roman Akopov (Bixtrim), Eugene Panferov
(independent expert and valuable author at ITHipster), Oleksandr Nikitin (Lynx Capital)
and Andrey Kovalev (ThreatMetrix) for critical discussion and suggestions on this paper.
17
Annex A: Example scenarios
Let’s consider 3 different threat models for accounts, depending on the funds on the
account balance: 1) if peak total amount is less than $150, we consider the overall
situation to be of low risk, since any targeted attack would be impractical; such accounts
may lack secure credentials, and that’s fine. 2) if account value is in the range $150-
$10000, then using secure software-based OTP is recommended. 3) for accounts
exceeding $10000 balance, it might be practical to provide a hardware OTP token. If we
cannot immediately provide the user with an appropriate OTP token, a transitional
one-time code system (see the corresponding section above) should be used as a
temporary solution.
Scenarios that imply a change of primary notification/contact methods (phone, email)
should not rely on the availability of old contact method since the motive for a change
could be that user no longer has control over it because it has been deactivated,
compromised or expired. We also removed email and phone reset scenarios if the
password is not known: such a situation is exceptional enough to be handled by customer
support on a per-case basis.
Assumptions:
• There is no user id, a user is identified by email. All scenarios may be easily adjusted to
use a separate user id if needed, or to use social network profile as a source of contact
data (email and phone).
• Phone number with SMS capability is a mandatory attribute (which could be somewhat
disputable for a privacy-focused service).
18
2. INSECURE LOGIN
Initial state: a user is not logged in, an account exists in the insecure state;
Final state: an account is insecure, a user is logged in;
Entry fields: email, password, SMS code, captcha (optional).
A user enters email, password and SMS code and is permitted to enter an
insecure session. SMS and email notifications are being sent about login attempt
(Unsuccessful, mandatory. Successful, optional. Mind possible flood situations, so
event aggregation is required). If any other active user session exists, it is terminated
forcibly upon successful login.
3. SECURE LOGIN
Initial state: a user is not logged in, an account exists in secure state;
Final state: an account is secure, a user is logged in;
Entry fields: email, password, second factor, captcha (optional).
A user enters login, email and second factor and gets full account access. SMS
and email cannot be used as a second factor. SMS and email notifications are
mandatory for unsuccessful logins and optional for successful ones (same caveats
as previous case). If any other active user session exists, it is terminated forcibly
on successful login.
4. PASSWORD CHANGE
Initial state: a user is logged in, an account exists and may be secure or not;
Final state: a user is logged in, the password is changed;
Entry fields: old password, a new password (2 times), second factor (optional).
For insecure accounts, SMS code may be used as a second factor, or the second factor
could be omitted completely (depends on business requirements). If a second factor
exists and the account is secure, it should be used for this operation. SMS and email
notifications are issued in both cases.
5. PASSWORD RESET
Initial state: a user is not logged in, an account exists and may be secure or not,
a user has email access, the password is not known to a user;
Entry fields: email, captcha; after the link is opened in the browser – a second factor
and a new password (2 times);
Final state: a user is logged in, the password is changed.
19
For insecure accounts SMS code is used as a second factor; for secure accounts,
it should be an OTP token or a recovery code. A link is sent by email (not SMS!)
combined with the second factor is enough to perform the change.
20
Attacks to consider:
a) An attacker in temporary possession of user’s account credentials, possibly
including OTP, tries to take over the account quickly.
b) An attacker takes over the victim’s phone (and, possibly, email) and it cannot
be easily recovered; thus the user needs to change the phone number.
Disabling the account temporary to prevent abuse is an acceptable inconvenience
in all those cases.
There are some possible concerns if it is a good idea to allow more than one OTP token
at a time. Since we cannot prevent a user from using one seed with multiple tokens, it is
better to give him a possibility to do it more conveniently, having individual control over
authenticator devices. Since notifications are being sent out if a user adds a new OTP
device, it is unlikely that a new token could be added be a malicious actor without drawing
the user’s attention. Signing individual operations (using “interactive” tokens) is to be
revised in future versions.
21
9. REMOVING AN OTP TOKEN
Initial state: a user is logged in, an account exists and is secure;
Final state: a user is logged in, the second factor is removed, a user is prompted
to add a new OTP token as defined above;
Entry fields: password.
The user should be able to log in using a recovery code first. Notifications are being
sent via email and SMS. If a user has no OTP tokens left (other than recovery codes),
he is prompted to set up a new one (see “Adding OTP token”).
22
I Mohammad Ghasemisharif, Amrutha Ramesh, Stephen Checkoway, Chris Kanich, Jason Polakis
O Single Sign-Off, Where Art Thou? An Empirical Analysis of Single Sign-On Account Hijacking and Session
Management on the Web
https://www.cs.uic.edu/~polakis/papers/sso-usenix18.pdf
II Denise Ranghetti Pilar, Antonio Jaeger, Carlos F. A. Gomes, Lilian Milnitsky Stein
Passwords Usage and Human Memory Limitations: A Survey across Age and Educational Background
http://journals.plos.org/plosone/article?id=10.1371/journal.pone.0051067
V Troy Hunt
Extended Validation Certificates are Dead
https://www.troyhunt.com/extended-validation-certificates-are-dead/
VI Alex Smirnoff
A Hacker’s Guide to Not Get Hacked
http://ithipster.com/blog/72.html
+359878830030
[email protected]
facebook.com/glancltd
Varna, Bulgaria