What is your favourite password rule?

  • yeh74fjic8e5we@lemmy.world
    link
    fedilink
    arrow-up
    1
    ·
    6 months ago

    “One of the characters of your chosen password was used in the same position 12 password-changes ago, but I won’t tell you which”

    • frezik@midwest.social
      link
      fedilink
      arrow-up
      1
      ·
      edit-2
      6 months ago

      They invariably do. They always constrain the list of things that a fully random generator could possibly make. They never add to that list.

      Even rules like “can’t use the same character twice in a row” constrain the list at least a little. That one makes it harder for dumb people to do dumb things, but also makes it harder for smart people to do smart things.

  • Tar_Alcaran@sh.itjust.works
    link
    fedilink
    arrow-up
    1
    ·
    7 months ago

    My favorite is “can’t be more than x% similar to the last 3 passwords”. Of course, you shouldn’t ever define what “similar” actually means.

    • jonne@infosec.pub
      link
      fedilink
      arrow-up
      1
      ·
      7 months ago

      And the only way to check that is by storing the previous passwords in a recoverable format.

      • JohnyRocket@discuss.tchncs.de
        link
        fedilink
        arrow-up
        1
        ·
        7 months ago

        I’m not sure but I think the previous password is mostly stored in an unrecoverable format and only upon changing your password, when you have to enter your previous one, does it store it in an unrecoverable format for 10x or so generations. Just a guess though for how AD might do it.

          • Serinus@lemmy.world
            link
            fedilink
            arrow-up
            1
            ·
            7 months ago

            This is everything you ever needed to know about passwords.

            There’s a thing called a “one way hash”. It’s a formula run against your plain text password that produces the same result every time it’s run, but can’t be turned back into your password.

            Imagine you assign a number for each character, a is 1, b is 2, etc. A (bad) one way hash would be to add up the number of each character and store that. So if your password was “bacj” that would be 2 + 1 + 3 + 10 = 16. So they could store just “16”, but that couldn’t be turned back into your password.

            This is a bad hash to use for a couple reasons. One is that many, many things would equal 16. You want something with less overlap or “collisions”. It doesn’t have to be zero collisions either. It’s not completely impossible that more than one password would get you into your GMail, though figuring out which alternative would work would be practically impossible.

            The other is that this one is way too fast for a computer to compute. If someone gets your hashed password and the formula they used, they could try a million guesses per minute until they randomly guessed your password. This is called a “brute force attack”. To prevent this, websites use two things. One is that they limit the number of attempts you can make. They can allow you to try ten times per ten minutes and that’s more than enough to slow a brute force attack. But this only stops them if they’re trying through the website. If they have your hash and the formula used on their machine (like a data leak), the attempt limit on the website does nothing. Instead, they should use a “cryptographic hash”, which has all the properties we’ve mentioned, but also takes a good amount of time to compute, even on a good computer. A solid fraction of a second is enough, as long as you used a good password. It doesn’t take many attempts to guess “qwerty” or “shadow” or “misty”, even with leetspeak. If they can guess it in a million attempts, it’s not a good password. Also there are public lists of known passwords that is one of the first things they’ll try.

            Another attack is called a “rainbow table”. This is where they take the most common cryptographic hashes, and a list of known, compromised passwords, and they’ll have run the hashes against those passwords years ago and stored them. Now they don’t have to compute the value. They’ll just try each value in the table. To prevent this, every secure site will use what’s known as a “salt”, which is just a random extra password that they’ll literally just stick onto the end of your password before they compute. So even if your password is “shadow”, they’ll have “shadow” + “jfyengighshtogusnwkyifhd” as your password. But the second part is stored in their database in plain text, so the salt is much less secure than your password. You’ll still be vulnerable to a brute force attack, but you won’t be vulnerable to a rainbow table attack.

            Remember, if you use the same password everywhere, one site having bad security (or compromised on the front end) means bad actors will have added that password to the list of known passwords. That’s the first thing bad actors will try in a brute force attack forever after. Use a password manager like KeePass or Bitwarden, maybe even 1Password. You have no idea how amazing it is to not need to remember which email you used for which site, and not care what the security requirements are. Every password you have can be 30 character, special character nonsense, and the manager will just handle it for you. I literally can’t tell you my Lemmy password. And I promise that it’s not in that list of known passwords. I just narrowed the possibilities by a few million passwords, does that help you guess my password?

          • leisesprecher@feddit.org
            link
            fedilink
            arrow-up
            0
            ·
            7 months ago

            I think you don’t understand the point.

            You enter your current password when changing your password. So it’s already there. In memory. There’s no need to persist any plain text.

    • frezik@midwest.social
      link
      fedilink
      arrow-up
      1
      ·
      6 months ago

      It feeds your last three passwords into an LLM and it decides if your next password is similar or not. This rule brought to you by Nvidia. Nvidia: the next time your company wants to apply AI to things where AI doesn’t belong, think Nvidia.

  • Wahots@pawb.social
    link
    fedilink
    arrow-up
    1
    ·
    6 months ago

    “Sorry, this password is too long”

    Literally gotten this error before. So annoying. It was like 18 characters.

  • Ephera@lemmy.ml
    link
    fedilink
    arrow-up
    0
    ·
    7 months ago

    My ‘favorite’ password rules are incorrect rules. Recently signed up to a service, which looked like it hasn’t been updated since the 90s. They sent me my password via letter, but hey, I was allowed to change it digitally.

    So, I did. I set it to a reasonably long password (probably something like 22 characters), with no problems.

    Then I went to login and it refused my login. I copied my password out of my password manager, for both setting it and logging in, so there was no way that it was wrong. I quadruple checked the login name, but no luck.

    Eventually, I manually typed the password from my password manager. Then I saw it, their password field stopped accepting inputs after about 20 characters.
    Presumably, I was able to set my long password on the registration page, but the login page did not accept this long of a password. Fucking ace.
    I had to order another password letter.

    • bleistift2@sopuli.xyz
      link
      fedilink
      English
      arrow-up
      1
      ·
      7 months ago

      As a website developer, it’s easy to just use the ‘maxlength’ attribute on fields you don’t want to exceed a certain length (for valid reasons or not). But then exactly this happens: A user pastes something in there, doesn’t notice that their input got truncated, and something, somewhere breaks.

      ‘maxlength’ is terrible user experience.

  • jonne@infosec.pub
    link
    fedilink
    arrow-up
    0
    ·
    7 months ago

    I just wish these password requirements could be added as an attribute to the password field so password managers could generate a password that matches those rules.

    • Swedneck@discuss.tchncs.de
      link
      fedilink
      arrow-up
      1
      ·
      7 months ago

      nowadays we have passkeys anyways which is just making the good old “random max length password with all the character groups” explicit.

  • Dem Bosain@midwest.social
    link
    fedilink
    English
    arrow-up
    0
    ·
    7 months ago

    I just had to make a password for a hotel.

    8 to 20 characters Uppercase Lowercase Digits OR special characters.

    The capitalized OR is important. You can have either numbers in the password, or special characters, BUT NOT BOTH.

    Took me 8 tries.

    • First one was too long.
    • Second and third used both numbers and characters, but I thought the characters were TOO special.
    • 4 through 6 used both numbers and special characters.
    • Seventh password used just letters and numbers, and it was accepted.
    • Eighth try I used just letters and keyboard characters, and that was accepted too.
    • Sewer_King@lemmy.world
      link
      fedilink
      English
      arrow-up
      0
      ·
      7 months ago

      The best part to me is that they include all of these rules to increase the security, but then set a maximum length of the password, which from my understanding is the easiest way to add complexity/security to a password.

      • felbane@lemmy.world
        link
        fedilink
        arrow-up
        0
        ·
        7 months ago

        Maximum length is the biggest red flag to me and was the catalyst for me making the effort to switch to unique passwords per-account years ago. There’s just so, so many shitty homerolled security systems out there… and data breaches seem to be a perennial problem these days.

        There’s just no excuse for limiting the length if you’re doing security correctly (other than perhaps a large upper limit just to protect against someone DOSing the backend with a bunch of 100MB strings; 512 characters seems reasonable).

        By setting an upper limit, you’re basically saying one or more of these things:

        • We store your password in plaintext
        • We store a hash but our hashing function has an unnecessarily arbitrarily limited input size
        • The person/team implementing the backend has no idea what they’re doing and/or just copy pasted login code from stack overflow
        • We tried to get away with minimal password requirements but some middle manager wouldn’t rubber stamp it without arbitrary_list_of_bs
        • pixeltree@lemmy.blahaj.zone
          link
          fedilink
          arrow-up
          1
          ·
          7 months ago

          My senior project for uni was replacing the professor’s friend’s website. We had a meeting to gather requirements, have him demo the site as different kinds of users, etc. Dude said “Hold on a sec” and went to a page with all accounts and their passwords listed. Was like, dude, the hell