5 ms·
> When the user hits "save password" on the client-side, the client needs to save the actual (plain text) password in order to reply it for future logins. Sinc
by simcop2387 7y ago
> When the user hits "save password" on the client-side, the client needs to save the actual (plain text) password in order to reply it for future logins.
Since there's a central server involved in this authentication (as far as I understand how TV works), that's not the only way to do this, nor is it the best way. A better way is to store some other token that can be used to verify that the user has logged in before and has a valid session, one way to do that is to sign and encrypt data saying which user they were logged in as. This prevents the password itself from ever being retrieved even if they can still use it to impersonate the user to TV
- pushrax 7y agoThese are the ways the strategies differ: - a token can be invalidated individually, while resetting a password invalidates all sessions - a token can be given a predetermined expiry without the issues that arise from predetermined password expiry - a token can be given a limited permission set - a token can be used to track the origin and extent of an attack In practise for something like TeamViewer I find it likely that none of these except the first would be implemented. If the attacker has access to the registry chances are you're f*cked anyway.
- Daniel_sk 7y agoAlso - a token can’t be used to change your password or steal the account completely. The app can ask you to enter your password again if you are doing these changes to your account. A token would not allow the attacker to pass this.
- sowbug 7y agoIt is the only way if the action is labeled "save password," rather than "stay signed in" or "authorize this device" or similar. It's a subtle distinction for the average user who doesn't care, but for a sophisticated user it does indicate a specific kind of behavior, and the relevance is what you do in case of compromise. Do you change your password and make the eavesdropped one useless? Do you deauthorize the stolen computer via a centralized interface?
- Dylan16807 7y ago"the only way" Don't let pedantic adherence to the wording of the UI be more important than security.
- comex 7y agoRight, but that means that what you actually want to do is store a hash of the password salted based on the identity of the machine you’re connecting to. (And the authentication protocol would be changed to verify possession of that hash rather than the password itself.) That way, not only do you avoid leaking the password itself, you ensure the hash can’t be used to connect to any other machines that use the same password. But changing the password is still what you need to do to block future access, preserving the expected semantics for sophisticated users. (For bonus points, the salt should be re-randomized whenever the password changes, so that changing the password makes old hashes permanently useless, even if someone later changes the password back to its old value. Not that going back to an old password is ever a good idea, but some users will inevitably do it anyway.) Edit: Actually, it’s probably better to use a completely random token and just have the server reset it whenever the password changes. That avoids any possibility of cracking the hash to recover the original password.
- Thorrez 7y ago> Since there's a central server involved in this authentication According to a comment above, it's possible to use teamviewer purely locally, without a central server.
- marcus_holmes 7y agoHow does TV authenticate a login locally if disconnected from the server? I mean, in an ideal world where they didn't save the user's password locally...
- Thorrez 7y agoAre you asking how they currently do it, or how it could theoretically be done better? If you're asking how they currently do it, I guess by sending the password, but I don't really know. One way that would be slightly better than that would be to send the hash. That's still a replayable token, but it has the advantage that if someone does password reuse it's not immediately replayable against other websites. Ideally the hash would be salted (maybe with the username and some teamviewer-specific constant). Even better than sending it would be to use a PAKE, authenticated with that salted hash. Maybe an alternative would be some sort of asymmetric key system, where each device gets its own keypair. I guess it depends on exactly what functionality is needed. Does it need to be able to be setup offline, or can it be setup online, then go offline for further use?
- marcus_holmes 7y agoYeah I guess the first. I suppose they could insist on an online login before they allow an offline login, then save the hash locally. A bad person would need to generate a hash collision to login then.