102

My university sent me an email informing me that, during a "periodic check", my password was found to be "easily discoverable and at risk of compromise". As I understand it, there shouldn't be a way for them to periodically check my password unless my password was stored in plaintext. My question:

  • Is my understanding wrong, or has my university been storing my password in plaintext?

UPDATE: The school IT department linked me to a page explaining the various ways they check passwords. Part of the page allowed me to run the tests on my university account and display the password if it was indeed discovered from their tests. The password it displayed was an older (weaker) password of mine that was simply English words separated by spaces, which explains how they were able to find it. Thank you to all who answered.

  • 48
    Contact the IT department just to make sure. Especially if you got it through email. Could be a phishing attempt. – TurkuSama Mar 5 at 18:13
  • 44
    Perhaps they are cracking hashes? Perhaps they are using haveibeenpwned or something similar. Is your password fairly weak? – DarkMatter Mar 5 at 18:16
  • 4
    could be easy for a dictionary attack depending on how it is constructed... but still it seems a little ambitious for your school's IT dept to be doing that :) – DarkMatter Mar 5 at 18:30
  • 4
    I've already changed the password, so I might as well tell the format. It followed that XKCD format with english words separated by special characters. – Gary Blake Mar 5 at 18:33
  • 13
    Hearing that you had an XKCD format password and they showed it to you on the check site makes me even more suspicious that they have your password in plain text. – user3067860 Mar 6 at 19:42
176

Your understanding is wrong. If passwords are stored as a strong salted hash, the administrator can’t find good user passwords, but can find ones that are on lists of commonly used passwords by applying the hash and salt to every password on the list and looking for a match. It’s a lot easier if the stored passwords aren’t salted, though, since in that case you only have to run it once and not once per user, so this may indicate that the stored passwords are not salted, which is contrary to best practice.

  • 3
    @forest The pattern could be that the password appears on a specific list. But that would defeat the purpose of using rainbow tables in the first place. The purpose of a rainbow table is to reduce the storage space needed for precomputed hashes. If you need to store the list of passwords covered by your rainbow table you won't have gained anything. – kasperd Mar 6 at 8:15
  • 5
    @kasperd Yeah in theory the reduction function could be a lookup table, but that would be extremely silly. – forest Mar 6 at 8:23
  • 1
    @forest Exactly my point. – kasperd Mar 6 at 8:25
67

As I understand it, there shouldn't be a way for them to periodically check my password unless my password was stored in plaintext.

Actually, there is: cracking.

There is a known practice by which system administrators run cracking tools (John the Ripper, Hashcat, etc.) against the hashed passwords. People with simple passwords can be cracked in trivial amounts of time; therefore, as they define it, if they cracked your password, it was easily discoverable and at risk.

To quote this article about John the Ripper:

How you decide to use John is up to you. You may choose to run it on all the password hashes on your system regularly to get an idea of what proportion of your users' passwords are insecure. You could then consider how you could change your password policies to reduce that proportion (perhaps by increasing the minimum length.) You may prefer to contact users with weak passwords and ask them to change them. Or you may decide that the problem warrants some sort of user education program to help them select more secure passwords that they can remember without having to write them down.

  • 1
    But if the institution runs a decent password hashing algorithm like bcrypt or PBKDF2 even this should not be practical - it would take too much processing power. Isn't that correct? Say if they check each password against 100,000 simple passwords, they'd struggle to do more than a few passwords each day under constant CPU load. – thomasrutter Mar 7 at 23:55
  • 2
    @thomasrutter if all you're trying to do is skim the "simple" passwords off the top, the difference in cycles between DES and PBKDF2 isn't as massive as it is for a full brute force attack. Again, it's a self-defining issue; anything guessed in that time that Admins had CPU enough to throw at is "crackable", which doesn't tell anyone anything meaningful about what lurks past that... This is a controversial method because it makes admins feel good and, sometimes, powerful; it does not always lead to measurable improvement in users' habits. – gowenfawr Mar 8 at 2:22
  • 2
    @thomasrutter what would your expected time to validate a single password be in your case? Are you talking about a complexity setting which requires the whole machine for multiple seconds? Do you think that can be used in practize? (Let alone is there an actual user directory compatible with kerberos and/or AD which would use that?) – eckes Mar 8 at 14:18
  • The algorithms are scalable so you can essentially choose the processing cycles that you want to be spent each time, I have in my head that usually you make it take a bit under a second to compute on an average single CPU, but these are mere ballparks and there are legitimate arguments to making it faster even by 10x or 100x. – thomasrutter Mar 18 at 23:31
39

Your university may not have stored your password in plaintext. They have a very easy way to get the plaintext of your password, and I suspect that they have access to it at least a couple times per day.

You give them your password as plaintext every time that you log on.

If you're logging into an application that they host, such as a site to manage online classes or to check your grades, and they have the source code for that online application, then they can trivially get access to your plaintext password without storing it or transmitting it to another system, and can check the security of your password at that point.

They can also check the password strength when you're logging in if they are using a single-sign-on service.

However, it's still extremely fishy. Contact your university's IT department and verify that they are storing your password securely. Ask pointed questions on how they checked your password.

And the rest of my advice follows standard internet authentication advice: Do not click on any links in that email; if you do change your password, do so through normal means and not a link that was emailed to you. Use a password manager to store and generate long random passwords. (Ideally, you should only know 2 of your passwords: The one to log into your computer, and the one to log into your password manager.) Never reuse a password for any purpose.

And while you're talking to the university's IT department, ask them about 2-factor authentication.

  • 34
    You give them your password as plaintext every time that you log on - Unless they extract this from memory from the host (which I would say is highly unlikely), or it's a very poorly configured web app it's hard for me to imagine a scenario where this is how they've done password audits. – DKNUCKLES Mar 6 at 0:15
  • 10
    @DKNUCKLES You've never seen a web app that checks password strength locally before sending it?? It's very common in sign-up forms and I've hit systems that applied it after the fact and would refuse "weak" passwords, forcing the use of the lost password system. (I much prefer passphrases to $pec1al character$ and have been bit more than once.) – Loren Pechtel Mar 6 at 1:13
  • 7
    @LorenPechtel This is a different scenario than what OP is referring to. Client-side validation of password strength prior to setting a password is not difficult and can be done without exposing a plaintext password. OP describes an existing password that was retroactively audited. – DKNUCKLES Mar 6 at 1:17
  • 17
    @DKNUCKLES But who says it was retroactive? Put the audit code into the client, it tells the server the password is weak. – Loren Pechtel Mar 6 at 1:27
  • 10
    If there's a single sign on service, it's not unbelievable that password strength could be checked server-side at the same time as validity when the user logs in. – Gremlin Mar 6 at 14:34
19

There are a few assumptions that need to be made here, but what I would imagine that University Password that you refer to, is the password to an Active Directory account. Active Directory passwords deal with passwords in an NTLM hashing format, which are not salted. With this in mind, the same password in different environments will have the same hashed value.

Troy Hunt offers a service called Pwned Passwords that allows administrators to download 517 Million password hashes. It is possible that your school's IT department is comparing the password hashes in their Active Directory, with hashes that appear many times in the aforementioned data.

While storing passwords in plaintext does happen from time to time (mostly in proprietary web applications), the aforementioned scenario would be my assumption as to how they've determined your password is weak.

4

The password it displayed was an older (weaker) password of mine that was simply English words separated by spaces, which explains how they were able to find it

FYI - no it does not. It depends on the words and their number. Having a few random dictionary words glued together is actually a very good password.

I should have of course linked to the relevant xkcd.

  • 3
    The emphasis is on random and assuming a large enough word pool. If it was a grammatically valid SVO sentence the entropy decreases drastically. – Voo Mar 7 at 16:12
  • @Voo: yes of course, this is the whole problem of choosing a good password, which is not "password" or "correchorsebatterystaple". Now, a valid sentence is not a problem in itself, except if your password generation scheme is known (= the attacker knows that you will be building correct noun-verb-adverb sentences). Ifindmystackoverflowanswersbrilliant is a great password. – WoJ Mar 7 at 16:18
  • 1
    The attacker doesn't have to know it though, they can just try common patterns that see you see again and again. And if you look at common password leaks you'll see that most people who use sentences will use grammatically correct sentences in very specific formats. See e.g. this paper that shows how this can be exploited. So while "Ifindmystackoverflowanswersbrilliant" is probably still more than good enough, the math shown in the xkcd comic does not apply to it - the entropy is much weaker. – Voo Mar 7 at 16:25
  • @Voo You can get a bunch of the entropy back by applying a caesar cipher to your phrase though and have it still be relatively easy to remember and type. – Perkins Mar 7 at 18:28
  • @WoJ except now that you've posted it on the internet, it no longer is. – TemporalWolf Mar 8 at 23:34
-9

Passwords are not stored in plain text and as a practice it should be encrypted and stored in whatever ways technically. However, due to security band compliance, passwords can be decrypted using various technical algorithms and run through patterns to find weak passwords. Your university must have done this and notified you.

  • 7
    I believe the phrase you are looking for is hashed, not encrypted. If you do mean encrypted then that is incorrect as it is reversible. I think you mean hashed because you mention the way to reverse the process as "various technical algorithms" rather than simply "decryption". – Captain Man Mar 6 at 18:23
  • 4
    1: Define '"security band compliance'. 2: "various technical algorithms" has no meaning. 3: Hint; You can delete your question. – zaph Mar 7 at 1:49
  • 3
    "Passwords are not stored in plain text" That is not true. The first college that I attended did store plain text passwords. In fact, when calling their helpdesk, the support person could (and some of them did) verbally tell you what your forgotten password was since helpdesk employees (and many others) had direct access to the plaintext passwords. I know that it was still that way up until at least a few years ago. – Aaron Mar 7 at 17:00
  • 1
    @Aaron On top of that, tons of public sites and services store passwords as plaintext still, in 2019. It's far more common than this answer suggests. – only_pro Mar 7 at 17:14
  • 2
    From context, I think Atul meant "Passwords should not be stored in plain text" – schroeder Mar 8 at 7:58

protected by Community Mar 11 at 13:08

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.