• jol@discuss.tchncs.de
    link
    fedilink
    arrow-up
    73
    ·
    12 days ago

    The other day I used a website and they didn’t let me pick a password.

    They sent me a very secure random one via email 💀 in the year 2025, this still happens.

    • AlecSadler@sh.itjust.works
      link
      fedilink
      arrow-up
      24
      arrow-down
      5
      ·
      11 days ago

      There’s really nothing wrong with that, it’s a sort of half-baked 1.5FA, I would hope/assume you had to immediately change your password after.

        • azertyfun@sh.itjust.works
          link
          fedilink
          arrow-up
          24
          ·
          11 days ago

          99 % of websites even with “2FA” enabled allow to reset all login credentials with an email reset. Or worse, an SMS reset.

          aka it’s all just 1FA with the password+TOTP just being there for “convenience”, and they trust gmail’s actual 2FA not to get breached because if it does then the account is donzo.

          Not that emailing passwords is good, because users won’t change them and are likely to leak them. However login systems that are just an email with temporary credentials are superior to the standard system with the possibility to reset password by email, since they’re basically that with less attack surface. The service provider never even has to process the user’s password. Literally the only downside is usability, which can be a worthwhile tradeoff.

          Alternatively one could do OIDC, but the downside is it only works with whichever authentication providers are setup whereas email registrations work without an intermediary such as google or Microsoft which is a big plus in my book, and might even be a hard requirement in B2B scenarios.

        • AlecSadler@sh.itjust.works
          link
          fedilink
          arrow-up
          5
          arrow-down
          1
          ·
          11 days ago

          Hmm, yup, you’re right, my bad.

          I guess it’d help if it still required an MFA code added or something.

        • Ptsf@lemmy.world
          link
          fedilink
          arrow-up
          2
          ·
          edit-2
          11 days ago

          The 1.5 is them relying on your email provider to provide the 2factor 😂

    • whoisearth@lemmy.ca
      link
      fedilink
      arrow-up
      3
      ·
      11 days ago

      This is asinine and anyone responding that this is normal is asinine as well. You can email a link to reset the password but if you’re sending a plaintext password, even with the intention of changing it immediately, you’re a fucking idiot.

  • 🇰 🌀 🇱 🇦 🇳 🇦 🇰 🇮 @pawb.social
    link
    fedilink
    English
    arrow-up
    64
    arrow-down
    3
    ·
    edit-2
    11 days ago

    I don’t even know how the fuck this happens.

    Enter password

    Incorrect

    Enter password again, carefully to make sure no typos

    Incorrect

    Change password to the one you remember it to be

    “New password can’t be the same as old password”

    😬

    Shit sometimes gives me this while using a password manager! The saved password is correct. Even the change password thing says it should be correct. Still tells me it’s wrong trying to use it.

    • skulblaka@sh.itjust.works
      link
      fedilink
      arrow-up
      62
      ·
      11 days ago

      That just means they’re forcing everyone to change their passwords but they don’t want to come out and tell you about it.

      If you’re lucky, some overzealous sysadmin is just trying to enforce regular password updates on his users, and makes them expire every once in a while.

      More likely, there was a breach of some sort that they want to keep on the hush.

      • MicrowavedTea@infosec.pub
        link
        fedilink
        arrow-up
        33
        ·
        11 days ago

        It’s also possible there’s a hidden max password size somewhere, like some fields only counting the first x characters of the password but it’s inconsistent across different forms.

        • Midnight Wolf@lemmy.world
          link
          fedilink
          English
          arrow-up
          11
          ·
          edit-2
          11 days ago

          USAA is guilty of this shit. Let’s you set a huge password. Truncates it. Doesn’t tell you about it. Error when logging in.

          I want to beat the motherfucker behind this strategy.

          E: Kagi too. I bitched out the support and I got a ‘meh, it should have told you’ response. Fix your shit.

          • MicrowavedTea@infosec.pub
            link
            fedilink
            arrow-up
            6
            ·
            11 days ago

            Not sure what is worse, not telling you and giving an error or not telling you and letting you log in (ie truncating the password both times, letting you think your password is longer than it is)

      • Serinus@lemmy.world
        link
        fedilink
        arrow-up
        4
        ·
        11 days ago

        but they don’t want to come out and tell you about it.

        It also doesn’t require a code change to continue blaming the user when you invalidate all current passwords.

        It’s a couple database queries to move all current passwords to old passwords, and change current (hashed) password for everyone to “deadbeef”. Nobody can guess a value that adds to their salt and hashes to “deadbeef”, and you get this behavior.

  • anguo@lemmy.ca
    link
    fedilink
    arrow-up
    48
    arrow-down
    1
    ·
    11 days ago

    What gets me is the “password is too similar to old password”.

    How do they know? Are they storing them in plain text? I would imagine the hash would change drastically even if I change a single character, no?

    • owenfromcanada@lemmy.ca
      link
      fedilink
      arrow-up
      23
      ·
      11 days ago

      I can imagine one legitimate case: when you create a password, they save the hash for the full password as well as the hash for the password without the last character. So if you attempt to change only the last character, they can detect it. They’d need to salt the two separately though.

      In theory, they could do the same for every character, but they’d have to save 20+ combinations for that (plus all the salt), so I doubt anyone is doing that.

      • frezik@midwest.social
        link
        fedilink
        arrow-up
        5
        ·
        11 days ago

        The strongly recommended hashing algorithms are slow on purpose, and often use up a lot of RAM, too. Multiplying the number of hashes you would need would multiply CPU/memory load for every new password.

      • Hasherm0n@lemmy.world
        link
        fedilink
        arrow-up
        5
        arrow-down
        4
        ·
        edit-2
        11 days ago

        Cryptographic hashes don’t work like that. One of the defined properties of a strong cryptographic hash is that changing even one bit on the input results in about 50% of the bits of the output getting flipped in a non predictable way. There’s simply no way to tell from looking at two cryptographic hashes how similar their inputs are. If there were, that would weaken the security significantly.

        • CookieOfFortune@lemmy.world
          link
          fedilink
          arrow-up
          9
          ·
          11 days ago

          Why wouldn’t it work?

          You’re removing the last character before hashing, so the removed character won’t affect the hash value.

          • goodeye8@fedia.io
            link
            fedilink
            arrow-up
            5
            arrow-down
            3
            ·
            11 days ago

            Because

            they save the hash for the full password as well as the hash for the password without the last character. So if you attempt to change only the last character, they can detect it.

            is not how hashing works. You can’t create a subset hash to compare against the set hash.

            Let’s say my password is “ILoveUsingSimplePasswords1”.

            You remove the last character and get “ILoveUsingSimplePasswords”.

            And then I change the password to “ILoveUsingSimplePasswords2”.

            Now here are those 3 “passwords” hashed.

            • 5c30739dfd7a5df387f9a3e6c08a026831314e8cc8df4f18e3c2a7baddf30bb2
            • a78cb4f0ddf5513862e97e20fe8f331d08bbb5aacf0ac14c0b6a0f1b036a7b6b
            • 9385bd96fb795abd7204d27990e8c7b2bf929bac772b6f8e3b875e8a313be5cb

            Can you tell which of the 3 is “ILoveUsingSimplePasswords” and can you identify where I’ve added 1 or 2 to the end? You can’t because it’s not how hashing works.

            • bane_killgrind@slrpnk.net
              link
              fedilink
              English
              arrow-up
              15
              ·
              11 days ago

              This is not what he meant. If the password is xyz he stores the hash (f*) for xyz and xy. When you change your password to xyb, it compares fxyz to the first saved hash and a truncated fxy to the second saved hash, flagging if you’ve only changed the last character. The mask length could be arbitrary and there can be many saved hashes at the expense of making password resets slow.

              • goodeye8@fedia.io
                link
                fedilink
                arrow-up
                9
                ·
                11 days ago

                I get it now. They’re comparing only trunks because the hash of the trunk wouldn’t change.

                • owenfromcanada@lemmy.ca
                  link
                  fedilink
                  arrow-up
                  3
                  ·
                  11 days ago

                  Yep, that’s what I meant. Pretty sure my company does this, because they can detect this, and I know enough of our IT to believe they’re not storing passwords in plaintext.

            • CookieOfFortune@lemmy.world
              link
              fedilink
              arrow-up
              4
              ·
              11 days ago

              You didn’t remove the last character of “passwords2”. When you remove the last character, that becomes “passwords” and therefore has the same hash as “passwords1”[:-1]

    • Agent641@lemmy.world
      link
      fedilink
      arrow-up
      14
      ·
      11 days ago

      They pay a kid in Bangladesh 14c an hour to visually compare the new password against the old one.

    • traches@sh.itjust.works
      link
      fedilink
      English
      arrow-up
      12
      ·
      11 days ago

      Usually you have to enter your old password on the same form in order to set a new one.

      Alternatively they could run a bunch of common substitutions on the new password, hash, and check if anything matches the old hash.

  • psycho_driver@lemmy.world
    link
    fedilink
    arrow-up
    47
    arrow-down
    3
    ·
    edit-2
    11 days ago

    It pisses me off that so many companies store a database of X number of your old passwords in the first place. Like, fuck off twerps, I probably still use those old passwords for at least 20 other logins. When your shitty database is compromised I now have to worry about all of them.

    • tfm@europe.pub
      link
      fedilink
      arrow-up
      16
      ·
      11 days ago

      The old passwords don’t have to be stored in plain text. They can still be hashed and salted.

      • wpb@lemmy.world
        link
        fedilink
        arrow-up
        4
        ·
        10 days ago

        In theory, yes. But unintentional bugs and security flaws exist (cf sites like have I been pwned), and by storing old passwords next to new ones increases the impact of such bugs and flaws significantly, precisely because folks use the same password for different services. Of course people shouldn’t do that, but they do, and as a dev you should be mindful of that.

    • GamingChairModel@lemmy.world
      link
      fedilink
      arrow-up
      10
      arrow-down
      1
      ·
      11 days ago

      You’re like, so close.

      Don’t reuse passwords between different services, or after a password reset. You’re aware of exactly why that’s a bad practice (a compromise of any one of those services, or an old database of those services will expose that password), so why knowingly bear that risk?

    • wulrus@lemmy.world
      link
      fedilink
      arrow-up
      6
      ·
      11 days ago

      Last time I had to implement a feature like that, I stored a substring of the old password’s hash. If one User in a million gets a False quotation Mark same Passwort quotation Mark message, I can live with it.

      • chillhelm@lemmy.world
        link
        fedilink
        arrow-up
        8
        ·
        edit-2
        10 days ago

        Hey, İ know quotation marks are expensive, but since I like your attitude to keeping your users secure you can have some of mine: " " " " "

        You can just paste copy them into your next post.

    • pishadoot@sh.itjust.works
      link
      fedilink
      arrow-up
      5
      ·
      11 days ago

      I mean, that’s true if you reuse your passwords instead of using a password manager that can generate random gibberish… Which is itself a very poor habit exactly because of this very fact?

      Even assuming a company follows best practices (a bold assumption that is wholly inconsistent with reality) there’s ALWAYS a possibility of a breach - and it’s not if, it’s only when.

      So, everyone should be using a password manager by default.

      I like to use keepassXC personally because it’s fully under my control. I don’t really care for ones that are hosted by 3rd parties because that introduces more risk if they get beached, but for many people that’s fine; it’s more convenient for the user. To me it’s important enough that I manage it all locally.

      • AugustWest@lemm.ee
        link
        fedilink
        English
        arrow-up
        2
        ·
        edit-2
        10 days ago

        So, everyone should be using a password manager by default.

        And an email mask. Life is easier if you can reset a password and change your email after a breach and have the old email disabled and disappear.

        • pishadoot@sh.itjust.works
          link
          fedilink
          arrow-up
          1
          ·
          10 days ago

          Agreed!

          The pain with email maskers is when a service doesn’t accept the email as valid… I have 2-3 I use. I start with blur (abine/ironvest, whatever you call it these days) and if it doesn’t work I go to my bench warmers.

    • Vanilla_PuddinFudge@infosec.pub
      link
      fedilink
      English
      arrow-up
      5
      arrow-down
      1
      ·
      edit-2
      10 days ago

      I probably still use those old passwords for at least 20 other logins.

      Right at the top of the list of things not to do with a password.

      Someone with your Amazon account might assume you use Facebook, Youtube, Steam, and every bank around your location(they know). There’s 2factor, but not everywhere

    • Smee
      link
      fedilink
      arrow-up
      3
      arrow-down
      1
      ·
      11 days ago

      I probably still use those old passwords for at least 20 other logins.

      My soul cries for you.

  • owenfromcanada@lemmy.ca
    link
    fedilink
    arrow-up
    40
    ·
    11 days ago

    Storing in plaintext? That’s a paddlin’.

    Not salting your hashes? That’s a paddlin’.

    Sending hashes to the front-end? That’s a paddlin’.

  • nandeEbisu@lemmy.world
    link
    fedilink
    arrow-up
    16
    ·
    11 days ago

    They could still be doing the validation server side even if you didn’t hit submit, like when you leave the text box.

    • meliaesc@lemmy.world
      link
      fedilink
      arrow-up
      5
      arrow-down
      1
      ·
      11 days ago

      Nah it pulls your plain text password in after you enter your email to compare it to 🙂

  • PotatoesFall@discuss.tchncs.de
    link
    fedilink
    arrow-up
    11
    ·
    11 days ago

    I mean I guess in theory they could be sending the password to the backend and validating it against your hash? In reality I doubt anybody would do that tho as it’s a huge load on the server

    • turmacar@lemmy.world
      link
      fedilink
      arrow-up
      3
      arrow-down
      1
      ·
      11 days ago

      The hash or a checksum can be sent to the page to be checked by the same function running in your browser that is checking if the new password has special characters etc.

      • Vigge93@lemmy.world
        link
        fedilink
        arrow-up
        11
        ·
        11 days ago

        That would be an extremely bad idea tho, because it would allow a malicious attacker to

        1. Try random usernames, and if the website returns a hash they know that user exists
        2. Once they have the hash, and the hashing algoritm, it is much easier to brute-force the password, bypassing any safeguards on the server

        Username/password validation should happen entirely server-side, with as little information as possible provided to the client

        • aesthelete@lemmy.world
          link
          fedilink
          arrow-up
          3
          ·
          11 days ago

          Username/password validation should happen entirely server-side, with as little information as possible provided to the client

          💯

          It’s recommended practice to not even tell them which half of the username/password combination failed upon authentication failures.

      • testfactor@lemmy.world
        link
        fedilink
        arrow-up
        6
        ·
        11 days ago

        Seems like a great way for me to harvest a bunch of hashes to pull down to my GPU rig and crack offline.

    • aesthelete@lemmy.world
      link
      fedilink
      arrow-up
      3
      arrow-down
      1
      ·
      edit-2
      11 days ago

      You could use logic to only send it after x amount of seconds without changes, waiting for the specified minimum length, etc.

      With the right restrictions, it really wouldn’t be that much different load profile wise to submitting it upon button press.

      There’s a high probability that it’s sending the hash (or even the password 😵‍💫) to the browser and comparing it though which is bad practice. Hell, just having a hash with no salt is bad practice, and sending the salt to the frontend as well would be even arguably worse.

      • Scubus@sh.itjust.works
        link
        fedilink
        arrow-up
        2
        arrow-down
        1
        ·
        edit-2
        11 days ago

        Not even remotely involved with opsec, but sending the password from the client to the server doesnt seem that crazy. It opens you up to people skimning your plaintext password if your connection is not secure, but by that same logic if your connection isnt secure then they can skim your hash. Unless the security on the site is good im sure there is a way to skip the encoding process and log in directly using the hash, so its a relatively small improvement to send the hash rather than plaintext, no? The much bigger issue would be if the server validated it as plaintext, because that would mean the server stores it as plaintext. But if the encoding is done server side, then that would make it significantly harder to crack the hash algorithm.

        Im sure im making a mistake with my reasoning here, can you explain it to me?

        Edit: ah, i see. I misread your comment.

        • aesthelete@lemmy.world
          link
          fedilink
          arrow-up
          3
          arrow-down
          1
          ·
          11 days ago

          Yeah the password is usually sent, not in plaintext because you do it on a TLS connection. You can’t do the hashing clientside and send the hash anyway because the value needs to be salted and you’d also be exposing your algorithm choice and other details, or you’d have to do further processing server-side where you could conceal the details in which case I don’t really get what sending the hash gets you because you’d have to do it again.

          People seem to constantly forget in web programming that you can obfuscate the client code, but you can’t actually hide it or rely on it solely for validation. The client isn’t something you control. They can very easily bypass any validation you put in that layer.

            • aesthelete@lemmy.world
              link
              fedilink
              arrow-up
              4
              ·
              11 days ago

              Using only hashes makes it possible to use what’s called a rainbow table (essentially a database of common passwords hashed related to their plain-text values) to crack the hashed passwords if they’re somehow retrieved from the database. A salt is a separate value, usually unique to each user, that is appended or prepended to the password prior to hashing it. That makes it much harder to crack the password, even if you have the hash in hand.

    • LwL@lemmy.world
      link
      fedilink
      arrow-up
      16
      arrow-down
      9
      ·
      11 days ago

      Because in order to know that the password is the same before submission, it has to store it in plaintext (or I guess it could hash every input and compare it immediately but no way that’s happening).

      • kryptonianCodeMonkey@lemmy.world
        link
        fedilink
        arrow-up
        14
        ·
        edit-2
        11 days ago

        Idk how you came to these conclusions. They might be storing it plain text and comparing directly, sure. Any website might be. But there is nothing about this that indicates that they are actually doing that for sure. They could absolutely just be comparing the hash after each input. The problem that for sure is happening is that they have sent the hash tot the front end, i.e. in the web page elements that the user can inspect, and they are verifying your current/used password(s) on the fly without even a submit attempt counting against them. All of which means a password farmer could just harvest the hashes for every username they try, and/or use bots to put in a username/password, hit “forgot password”, and then brute force the stored current/password(s) without any red flags being raised.

        • GamingChairModel@lemmy.world
          link
          fedilink
          arrow-up
          4
          arrow-down
          1
          ·
          11 days ago

          Plus if the front end is hashing with each keystroke, I feel like the security of the final hash is far, far, less secure to any observer/eavesdropper.

          If the password is hunter2 and the front end sends a hash for h, then hu, then hun, etc., then someone observing all these hashes only has to check each hash against a single keystroke, then move on to the next hash with all but the last keystroke known. That hash table is a much smaller search space, then.

        • tiramichu@lemm.ee
          link
          fedilink
          arrow-up
          3
          ·
          edit-2
          11 days ago

          Following on your theme of charitably assuming at least the possibility of a safe implementation, this could certainly be done without surfacing the hash on the front end.

          It could be that each keystroke triggers an API request which sends the current input, then the API hashes it and compares that to the original, entirely in the backend.

          Not likely, but possible.

          • kryptonianCodeMonkey@lemmy.world
            link
            fedilink
            arrow-up
            2
            arrow-down
            1
            ·
            11 days ago

            Fair, it could, yes. The bigger problem was definitely the ability to brute force the passwords though, as surfacing the hash still leaves them encrypted which isn’t super valuable without access to the hashing algorithm.

            • tiramichu@lemm.ee
              link
              fedilink
              arrow-up
              2
              ·
              edit-2
              11 days ago

              Right, so the hashing and comparison of hashes also can happen in the back end, and the API response can just be true/false whether it’s a match or not. That way the hashes and the hashing algorithm could all stay private.

              The comparison API would of course also need its own rate limits and backoff etc to ensure it cannot be used to bruteforce attempts until you get a ‘true’ back.

              All in all it’s a terrible idea though and nobody should actually do this.

      • frezik@midwest.social
        link
        fedilink
        arrow-up
        4
        ·
        11 days ago

        We’re all assuming there isn’t a “current password” field right next to “new password” on the reset form. Most of them do, though there are arguments that they shouldn’t.

    • Jarix@lemmy.world
      link
      fedilink
      arrow-up
      1
      ·
      11 days ago

      Is it good to reveal weak systems? Like just naming names here is that effective to prevent people from being compromised more or less than they already are?

      I want to know if its something I use, but i also dont want to contribute to outing weak systems without also informing the system people first to let them know.

      I’m genuinely curious, i dont actually know just seems risky to me to create a hitlist of soft targets

      • danc4498@lemmy.world
        link
        fedilink
        English
        arrow-up
        1
        ·
        edit-2
        10 days ago

        I think the best practice is to inform the company of the flaw, and if they don’t fix it in an appropriate time, then call them to the world. If they have a flaw that can be used by hackers, then the hackers probably already know about it.

        • Jarix@lemmy.world
          link
          fedilink
          arrow-up
          1
          ·
          10 days ago

          Hmm i suppose my concern then is for the situation you think unlikely: they dont know and neither do bad actors. Okay that makes sense

          Now I’m curious about why would the hackers already know? Or where does your confidence come from?

          • danc4498@lemmy.world
            link
            fedilink
            English
            arrow-up
            1
            ·
            10 days ago

            Cause hackers are smart and motivated. If a random memer found the flaw by chance, then one of the million black hat hackers that spend their time looking for these flaws had also probably found the flaw.

  • wpb@lemmy.world
    link
    fedilink
    arrow-up
    3
    ·
    10 days ago

    I’m struggling to figure out what the problem is, aside from UX annoyance (like the IDE panicking before you close a brace or sth). Eventually whatever you end up typing is being sent to the server anyway, and if that’s not inherently problematic, what’s the problem with intermediates being sent? Is the problem XHR requests on events other than clicking? Why?

    • DSTGU@sopuli.xyz
      link
      fedilink
      arrow-up
      3
      ·
      10 days ago

      It is implied that it was made using comparing to a plaintext password sent back from server to the user’s browser to compare.