Lenovo Forums stores plaintext password as a cookie
forums.lenovo.com
forums.lenovo.com
1) sessions are typically scoped in time, and
2) if the session is revealed, it can't be used for credential stuffing (using the same credentials on a different website to see if the password was used there too.)
Having said that I'm not being an apologist: The design should be better
Just clarifying, do you mean basic auth with the `Authorization: Basic base64(username : password)` scheme?
But this is of course even worse because most servers log this. Headers are not often logged.
As far as I know only Nginx accepts multiple Authorization headers.
$ nc -l 127.0.0.1 8000
GET / HTTP/1.1
Host: 127.0.0.1:8000
User-Agent: python-requests/2.22.0
Accept-Encoding: gzip, deflate
Accept: */*
Connection: keep-alive
Authorization: Basic dGVzdDp0ZXN0
>>> requests.get("http://test:test@127.0.0.1:8000") $ curl http://user:pass@localhost:8080
GET / HTTP/1.1
Host: localhost:8080
User-Agent: curl/7.79.1
Accept: */*
Authorization: Basic dXNlcjpwYXNz
$ curl -H 'Authorization: Token blobbity' http://user:pass@localhost:8080
GET / HTTP/1.1
Host: localhost:8080
User-Agent: curl/7.79.1
Accept: */*
Authorization: Token blobbityhttps://www.ietf.org/rfc/rfc3986.txt
FYI
Only the login page ever uses the cookie stored password in the rare instance the user got logged out by mistake.
Basically, Lenovo reimplemented a basic browser feature that is supposed to just work locally and made it stupid.
Asking as someone who works with forum software on a daily basis.
https://forums.lenovo.com/api/v1/user/getCountryByIp https://forums.lenovo.com/api/v1/forums/getForumAccess https://forums.lenovo.com/api/v1/forums/getCurrentForumTrees https://forums.lenovo.com/api/v1/topic/getTopic?fid=6&tid=51...
Also interesting that they have no auth requirement on the getCountryByIp route
var __currentForum =
window.CommuntiyForums&&CommuntiyForums.findCommuntiyHomepageByUrlPath()||'';
if(__currentForum&&__currentForum.hit){
lmdBrandVal = "Forum Details:"+ __currentForum.forum.board;
}else{
var __websiteInfo = sessionStorage&&sessionStorage.websiteInfo ? sessionStorage.websiteInfo : sessionStorage.currentCommuntiySite;
if(__websiteInfo&&JSON.parse(__websiteInfo).board) {
lmdBrandVal = "Forum Details:" + JSON.parse(__websiteInfo).board;
}
}By the time I arrived the damage was wide and it was easier to leave it consistently wrong than try and fix across several codebases.
So the only remaining issues are security issues around sharing your computer with other people, or programs. I guess stealing a session id is mildly less problematic than stealing the password in case the password is re-used elsewhere.
After initially setting a password, the database/server should only store a salted hash.
No exceptions.
If you've got malware on your machine then you are already fucked. Desktops don't tend to have strong process isolation that keeps malware from reading a password in flight anyway.
Usually it is stored in memory only long enough to compare it to the hashed version from the persistence layer but... that's in theory.
Are you actually doing client-side hashing in addition to hashing on the server side? Otherwise, yes, the server does see the password. In most applications, a compromised server could just serve a login page that doesn't do the client-side hashing anymore if the malicious actor wanted to collect credentials, so I don't see how this added complexity is really adding any security.
The real way to add more security is to minimize dependence on passwords by implementing a better, second factor of authentication, such as TOTP, WebAuthn, SSO, or even SMS or email tokens. Unless a person is using a password manager to generate their passwords, then passwords are almost always terrible and weak, and usually reused across sites. More of my opinion is shared over here[0].
That takes much more time and requires the attacker to be able to, unnoticed, change the served data.
I don't agree at all. Login pages are static, since they don't need to be customized per user, because the users aren't logged in. Anyone could easily prepare a modified login page before compromising the underlying system, and swap it in immediately after compromise. The added implementation complexity for the original developer is simply security theater.
Client-side hashing of passwords is actually a dangerous thing to recommend, in my opinion, because a lot of developers would assume that it removes the need to also hash on the server-side. At which point, they would literally be storing the actual password in plaintext in their database, since the client-side hash is the password.
Client-side hashes also aren't going to have a per-user salt, which means that an attacker can just use a rainbow table to reverse the hash of most passwords... making it even less worthwhile. The attacker doesn't even need to change the served content, but they certainly can.
As I mentioned in my previous comment, and I will repeat it here, real benefit to authentication security only comes from adding 2FA or SSO. Don't waste your time on security theater.
In theory there's also convincing browsers to implement a zero-knowledge protocol like SRP.
If SRP depends on a user to choose a password or to enter it only on the correct website, then it will be substantially less secure than WebAuthn, because users pick bad passwords and phishing can be very effective. WebAuthn sidesteps both of these issues entirely.
When it comes to systems that have passwords, a zero knowledge protocol should be best at keeping it safe, and while moving password entry out of websites and into the browser isn't a great protection against phishing it's a lot better than nothing.
This applies to literally all authentication schemes that use something beyond a password, including TOTP and SMS codes. It’s also kinda the point. An attacker will have a much harder time impersonating you.
You can use WebAuthn with just the fingerprint reader on your laptop or smartphone, or FaceID on iPhone. You don’t need an external hardware token, but those do work as well. You might even be able to use WebAuthn with your computer’s TPM using just a PIN instead of biometrics, but I’ve never bothered to check, because I’ve never wanted to do it that way.
A password by itself isn’t good enough anymore, so your argument in favor of SRP isn’t convincing, and I’m sure this is why browsers have never bothered to implement it. Making passwords slightly better doesn’t even come close to fixing them.
Yes, and?
It's still a "real benefit" to passwords if they can't be stolen.
Even if you do have an independent second factor, that means you still have a password. Surely you want to protect that password better, on top of the second factor?
> It's still a "real benefit" to passwords if they can't be stolen.
SRP does not mean passwords can’t be stolen. It just means that the backend of a particular website is no longer capable of stealing the password, as long as the user is careful to only use their browser’s (currently nonexistent) SRP dialog box.
The user’s computer can still have a keylogger on it.
The user can still be phished.
> Surely you want to protect that password better, on top of the second factor?
No, I want passwords to just go away. They add extremely little security on average. Power users like us might use strong, unique passwords, but almost no one does that in the real world. Protecting the password “better” doesn’t matter when the user also uses that same, weak password on a dozen other websites already.
SRP does not solve the actual problems people are facing, which is surely why browsers don’t support it. It’s a cool idea (honestly!), but it’s a solution in search of a problem now that we have WebAuthn.
If SRP is so beneficial even today, why don’t browsers implement it? They implement so much other stuff. You’re implying quite a conspiracy, which doesn’t make sense when it “compromises” the security of passwords going to Google and Apple just as much as it does everyone else. The “real benefit” appears to be lacking.
Yes, sorry. Less likely to be stolen, and can't be stolen by the server.
> No, I want passwords to just go away.
That's fine and dandy but it's moving the goalposts significantly.
I'm not going to disagree with your desire to get rid of passwords. But your initial premise was that second factors are good, and in that context it's also good to add more protection to passwords directly.
> If SRP is so beneficial even today, why don’t browsers implement it?
I said it was better, not that it's the most amazing idea in the realm of security.
Also when browsers implement optional security features they tend not to get website support.
> You’re implying quite a conspiracy
No I'm not, don't be weird.
WebAuthn as a single factor means there is no password or TOTP or anything else. Just WebAuthn.
You can go back to my very first comment where I said “The real way to add more security is to minimize dependence on passwords”. I tried to be clear from the beginning that passwords aren’t the answer, in my opinion. Yes, people are psychologically accustomed to having a password in addition to other things, but I don’t see the password as actually contributing much to the security.
My first comment also linked to another comment of mine from two months ago where I said “I would personally push away from passwords on the whole at this point.”
I definitely wasn’t moving the goal posts at any point, as I can point to multiple examples of holding this position the whole time, but I know that I’m not always the clearest communicator.
I answered that immediately. You can use it in more places.
Otherwise, in places where you can use both, it's worse.
> I tried to be clear from the beginning that passwords aren’t the answer, in my opinion.
I agree with that idea, but then you said the only way to improve on things was 2FA or SSO which isn't right.
You were conveniently ignoring it in the context where you claimed I was moving the goal posts.
I did not move the goal posts.
> I agree with that idea, but then you said the only way to improve on things was 2FA or SSO which isn't right.
That's an oversimplification of things, at best. I specifically linked to an older comment of mine for those who wanted more detail, and that comment recommended moving away from passwords entirely. You saw what you wanted to see. My summary in this thread was focused on the thread itself, which was discussing how to make password authentication more secure... and the way to do that is to add a second factor. Not security theater like client-side hashing as people were trying to propose higher in the thread.
This discussion is really boring at this point.
I can selectively deauth a user to make them login again in short order and take his password.
It depends on the level of compromise, of course.
Strong hashes are the way to go.
Server knows the plaintext password already, too.
Servers should NOT be storing passwords in plaintext, ever. This has been clear for at least 20 years now. You should only store a salted hash of a password, and please, do not roll your own. Use one of the many popular libraries for this.Yes, if you already got in, then reading RAM for active users is much more convenient than exfiltrating a bunch of potential trash accounts.
And noone said clear-text passwords would just stick around in ram.
But more directly, "reading RAM for active users" as a method of gaining passwords, written in context as a direct consequence of "the plaintext password being stored in memory", sure sounds to me like a claim that they're sticking around.
Nothing is ever 100% secure, but we can limit the exposure, and the blast radius when you do get breached.
But that would require a canonical and secure (i.e. not (only) controlled by server-fetched code) way of client-side password preprocessing, and if you have that, you can just as well use a PAKE, modern instances of which have all of these nice properties and more.
Very different case from storing them in plain text in the database or elsewhere.
Passwords stored unhashed in a database fail catastrophically and irrevocably against a point-compromise attacker. Hashed passwords, validated using plaintext passwords, only leak all passwords entered since the moment of compromise.
if the credentials are in the logs they'll harvest those to attempt logins on other sites.
To be clear: a properly designed system can and should operate without the server ever knowing the plaintext password.
Not even close. Why?
* Re-use across sites: people unfortunately reuse passwords across services. That means that getting access to these cookies would be great for credential stuffing attacks. A session identifier is no use for that type of attack.
* Re-auth across devices: you can't typically exchange a session for another session on a different device, but you sure can do so with a password.
* Session ids can be revoked with less user impact (they have to log in again). Passwords can be revoked too (it's a password reset), but it impacts users far more.
As other comments mention, passwords should be manipulated in memory, only stored hashed and salted by a strong algorithm, and seen by the bare minimum of software. Preferably handled by software designed for handling passwords and other sensitive credentials. There are commercial options, free options, and open source options.
(Full disclosure, I work for an auth company.)
Usually, a responsible website will password-hash the plain-text password into a hashed string before saving the hashed string into their storage. Password-hash is a special hashing process designed to be reasonability slow, so an attacker who somehow obtained the hashed string cannot easily collide the hash with another plain-text.
Some password-hash configuration can took few milliseconds to run, that's really expensive if you have to do that for every request just so you can compare the client password-hash v.s. the one stored on your server.
(Full disclosure, I designed few session manage systems for my job before :D)
Ever had Google deny you access for a perfectly valid username/password combo when loging in from "unfamiliar" location? :) Or a bank ask you for SMS code when logging in from a different browser?
It really depends on level of paranoia of the authentication system. You can have user device validation even with username/password, and you may not have it for session IDs in a different implementation.
(I wrote a few thousand words on MFA a year or so ago: https://fusionauth.io/learn/expert-advice/authentication/mul... )
Not if they're HttpOnly cookies. Then it requires actually compromise/mitm of the application server code to recover the cookies.
Return a 401 on the "logout" page?
I was able to sign up and sign in repeatedly. I never saw a 'RMEPass' cookie set, nor was I able to click 'remember me'.
So it seems like they have fixed at least one part of this issue.
[1]: Screenshot at https://forums.lenovo.com/t5/Other-Linux-Discussions/Thinkpa...