21 ms·
TeamViewer stores user passwords in registry, encrypted with hard-coded key
- DuskStar 7y agoWhy on earth would you store user passwords with AES locally and then use a hardcoded key to encrypt them???
- alias_neo 7y ago'Cause a whole bunch of people don't know how to do security. You'd be surprised how many people come up with this then don't think any further. This is the kind of solution I see from new grads with no crypto/security experience, but whom with a quick frown, think about it a little more and suggest why this is a bad idea. Many can do that even when they don't know how exactly to do it correctly. This was just lazy/rushed or dare I say it, negligent.
- professorTuring 7y agoI guess they were proud for using encryption instead of hashing, hence, more secure! Definitely they didn't follow the one and only rule of security: don't roll your own.
- alias_neo 7y agoAgain it's a grad level thing, but many smart grads can work out why encrypting isn't better. At least of the many I've interviewed, even ones I didn't hire could figure this much out.
- tsimionescu 7y agoHashing is not an option for locally saved passwords. Some kind of token-based Auth scheme could work, but not hashed passwords. That said, the much greater problem is the idea of using a hard-coded key, instead of generating a unique key for each device/installation.
- d1str0 7y agoUnique keys don’t help much. It only takes one person to write a script and put on github so that it can dynamically find the key and unencrypted stored password.
- _wldu 7y agoThe policy person at head quarters said, "systems must encrypt sensitive data". The local security office classified passwords as 'sensitive data' and sent a memo to all staff (sensitive data must be encrypted at rest). The devs encrypted the passwords. The auditors 'checked the box' as the passwords were now encrypted. Everyone moved on and forgot about it. At the time, a few people complained about the details... something about one way hashes. But they complain about everything, so no one listened to them.
- chooseaname 7y agoIt was the quick thing to do. I bet the have a "technical debt" story on the backlog that they're never able to get to.
- SlowRobotAhead 7y agoMaybe. But does every teamviewer instance everywhere need to use the SAME AES key?
- DuskStar 7y agoYeah, that was what got me. (But at the same time, I don't think there's a trivial way for teamviewer to securely store that per-install key. "Trivial" meaning "can be implemented with no dev time and work on all versions of Windows")
- SlowRobotAhead 7y agoThat’s probably fair. IDK. I mean, the solution here was to not store plaintext at all and do token/cookie/whatever. But yea, I get your point.
- the8472 7y ago$employer has recently been acquired by a big international corp. As part of the acquisition they have been "auditing" (really checkbox ticking and superficial API scans) our applications. One of the issues that came up is that we were using bcrypt as password hashing algo and our new overlords had a whitelist policy that only included sha2 variants and perhaps ripemd or something like that. We argued that their whitelist was totally inadequate for password hashing and pointed to multiple national standards bodies. The people doing the audit just ignored everything we explained to them and repeatedly pointed at the policy (which they weren't in charge of themselves). Several people on my team were opining to just comply because it's the easiest way to do and they were concerned about their job security if they would go "against security". My takeaway from that experience was that the people in charge of corporate security policies and audits are not experts in security, they are experts in reshuffling responsibility and covering asses. And many developers are easily cowed by them. The result is compliant software, not secure software.
- yread 7y agoCompliance is really the biggest source of bullshit jobs. All the paperwork you need to get certified, the manhours spent reviewing it, all for marginal benefits.
- zdragnar 7y agoMany (most) processes like that started because someone got burned by something, and the people ultimately responsible said "make a process so it doesn't happen again". Often times companies go through this with internal processes as they grow, and some grow out of that phase. Other times (especially at even larger companies) processes are adopted "from the industry". While not necessarily bad, it also requires flexibility from feedback. In parent's case, auditing to ensure sensitive data is encrypted to a minimum standard is reasonable , auditing to ensure any encryption is limited to a very narrow set of algorithms is not. I worked on a project once that contracted out security audits to HP and those were distressingly not good security audits, just vague automated checkbox-checking of a list put together with zero context.
- 7y ago
- ars 7y ago> and then use a hardcoded key to encrypt them Ask this question instead: Why bother to encrypt them in the first place? What is the attack scenario you are trying to defend against? This is local software - it need to be able to decrypt the key and use it to login. So at the end of the day it's the same machine with the password and the key to decrypt the password. It seems pretty pointless to even encrypt them in the first place. So why do it? I don't know, maybe just to make it marginally harder to see the password. If that's the entire goal, there isn't really any reason no to use a hardcoded key - it accomplishes that goal just fine. Ask yourself this: What attack scenario would a different key per machine defend against that a hardcoded key would not?
- Thorrez 7y agoSo that that if you're browsing your registry and someone looks at your screen, that person doesn't get your password.
- zaroth 7y agoStoring on the local machine. Versus what they should have been doing - authenticating the password and then storing a session cookie.
- reiichiroh 7y agoTwitter thread here: https://twitter.com/blurbdust/status/1224212682594770946?s=21 https://twitter.com/blurbdust/status/1224212682594770946?s=2...
- clSTophEjUdRanu 7y agoSeeing shit like this daily is holy demoralizing. Makes me feel like writing software for a living is a lost cause.
- Kenji 7y agoWhy is that demoralizing? Even if you're a mediocre programmer, you're miles ahead of the industry standard. It's a good time to earn money.
- keanzu 7y agoIt isn't a lost cause. The lessons are: Security is high stakes Security is hard https://blog.codinghorror.com/youre-probably-storing-passwords-incorrectly/ https://blog.codinghorror.com/youre-probably-storing-passwor...
- munk-a 7y agoThis particular issue reeks of "roll your own" when a lot of out-of-box token based solutions would just do a better job. The best lesson to learn about security in software is that if you're doing it and you don't have a PhD you're doing it wrong. The benefits of leaning on a third party for common logic should be carefully reviewed on a case-by-case basis unless that software is related to security, in which case, please do lean on a third party.
- ghh45654 7y ago>The best lesson to learn about security in software is that if you're doing it and you don't have a PhD you're doing it wrong. fuck, I need to tell that to all top CTF teams that their members should stop competing and leave their jobs and focus on PhD It may be a little bit offensive, but did you even graduate?
- munk-a 7y agoSorry, I was a bit hyperbolic - let me clarify. I didn't mean that educational experience is a critical portion - more that working in the security field is a lot more theoretical than most and requires a much higher investment of time to start to comprehend. People without degrees absolutely can be security experts, and people with degrees can be utterly clueless - but if you're working on a webapp and given a week to write a login system then it almost certainly will be vulnerable. So it's less specifically required that people have PhDs and more... this stuff takes time to fully understand, I know a lot of pitfalls on the topic but I wouldn't say I'm an expert - I just know enough to know that I don't know.
- lukeholder 7y agoCould anyone tell me if this affects MacOS? not sure if I should rush to uninstall teamviewer on my home computers?
- mg794613 7y agoI guess when you've used those credentials on a windows machine?
- deejaybog 7y agoIronically, TV tweeted recently: "January 28 is Data Privacy Day! TeamViewer is a Data Privacy Day Champion. As an organization, we understand the importance of being open and honest about how we collect, use and store your information."
- SlowRobotAhead 7y ago>Send email to the Director of Security November 14th, 2019 >Send email to Director of Security notifying them there is now a CVE assigned to this November 18th, 2019 >Receive first and only email back from vendor “We’re looking into it” email January 13th Good one TV.
- professorTuring 7y agoKudos to the security expert for the finding but his web page gave eye cancer. Seriously, consider lowering the contrast or chaging typography... Don't know, but it was hard to read in its original form...
- taywrobel 7y ago“I don’t like dark themes” would have been an adequate critique.
- UI_at_80x24 7y agoIMHO, the website was a wonderful and easy-on-the-eyes experience to read. I am visually impaired. I need sites to look like this just to consume them. This was my experience and yours was different. Being able to let the viewer choose is critical so that everybody can use the web.
- acqq 7y agoI also can’t read it as is, but it’s even worse than that: the page is not compatible with Reader View on iOS Safari.
- Someone1234 7y agoThey're doing nothing too wrong, the person criticising them doesn't understand basic computer security. When the user hits "save password" on the client-side, the client needs to save the actual (plain text) password in order to replay it for future logins. A hashed password cannot be stored, otherwise that hashed password becomes the plain text password anyway (essentially destroying any benefit hashing would have here). The rules that apply to servers/services aren't the same as those for clients/saved logins. Using reversible encryption is unavoidable, because they ultimately need plain text to send to the TeamViewer remote service. It is still marginally better than storing the actual plain text even if it is security through obscurity (using a hard-coded key in this case). Storing it in the user's registry hive instead of a higher privilege allows the TeamViewer client to run in the user's context, instead of needing to run as administrator, have a broker, or similar. One potential upgrade might be to use Windows' Data Protection API. It works essentially the same way as their current method, but Windows is responsible for protecting the encryption key (and has a broker than can house it at a higher privilege level). But ultimately if you have a process running in the user's context and can manipulate the TeamViewer client, you can bypass the Data Protection API pretty trivially (e.g. injected DLL, UI hooks, other misc memory hooks, etc). So my question would be: Describe the scenario where a bad actor has the ability to arbitrarily read data within a user's execution context, but not manipulate the TeamViewer Client also running in that same user's context? Because I got nothing. My security advice here is simple: Don't save passwords to your local machine if you don't want them saved to your local machine. And don't leave backups of your saved passwords in insecure locations. I'm going to research if I can get a CVE assigned to that.
- mooneater 7y ago> A hashed password cannot be stored, otherwise that hashed password becomes the plain text password anyway (essentially destroying any benefit hashing would have here). The plaintext password may be re-used by the user on other systems, so yes hashing would still benefit here.
- wlesieutre 7y agoI think parent is saying you can't have a login system where you store the hashed password locally and then log in by sending the hashed password to the server. The hashing to validate a password has to happen on the server, otherwise anyone could get a copy of your hashed password and submit it as a login. But as other replies have pointed out, you can generate a login token to offer a "save password" feature without actually saving the password to disk.
- FDSGSG 7y agoIt's pretty surprising that something this silly gets upvoted so heavily here. Lack of hashing isn't the problem here, the fact that low privileged users can access these credentials is. The author isn't to blame for the silliness though, whoever decided to editorialise this title for HN is.
- dang 7y agoI've taken a crack at rewriting the title. If anyone can suggest a better one (i.e. more accurate and neutral, preferably using representative language from the article), we can change it again.
- reiichiroh 7y agoSorry I took the title verbatim from Reddit and wasn’t editorializing. It seemed blunt without sensationalizing anything to me when I submitted.
- blackearl 7y agoI've seen recommendations to move away from Teamviewer for a few years now. They may have been good and free in the past but not much reason to use them anymore when the casual user can use chrome remote desktop, and more tech focused can use splashtop.
- Lendal 7y agoI'm not an expert so I'm just gonna ask the question. How is this different than what my web browsers do with all the passwords they memorize for me? They are stored locally, and encrypted, not hashed, with a key that is hard-coded somewhere. Right?
- DuskStar 7y agoWell, the key isn't hardcoded in the browser implementation. (It's unique per-install) And I think browsers generally do a better job using OS security mechanisms to restrict access to that key, too.
- xxs 7y agoBrowser have no other choice - but if you control the server and the client - there are ==a lot== better mechanism to store auth. info.
- sdinsn 7y agoNo- Chrome actually uses the Windows DPAPI, which encrypts passwords using your user login credentials. 3rd party password managers use a master password with a PBKDF.
- arsome 7y agoIt's still absolutely trivial to dump these though. Especially in the case of Chrome. iStealer is a classic script kiddie tool designed to exploit this.
- kakwa_ 7y agoIIRC, in the case of firefox, a key is generated at profile creation, and then the password saved are encrypted using this key. It's basically security through obscurity as the key stays clear text UNLESS the profile is protected by a password a human must type every times he opens Firefox.
- xupybd 7y agoHow do you do this if you're storing passwords to send on to another end point. Never had to store passwords in anything but a hash. My way is just to get the user to enter it again and never store passwords.
- trollied 7y agoThere’s an open source teamviewer equivalent that’s free to use if you build it yourself - looked really slick, but I can’t for the life of me find it now. Anyone got any ideas what it could have been? (Wasn’t VNC/RDP based). Dammit, wish I could remember
- SlowRobotAhead 7y agoI spent 3 weeks stepping through a program to reverse their blowfish encryption a long time ago... So I won’t say he messed up by stepping through code for 6 hours to find the AES decrypt sequence but the instruction he could have scanned for is a special CPU instruction now! aesdec xmm0,xmm1 How many separate routines could they have that directly call AES instructions?
- duskwuff 7y agoNot all AES implementations will use AESNI instructions. Support for those instructions is relatively new -- many systems in productions still lack them -- and they're hardly necessary for a non-performance-critical implementation like this one. A better signal is the presence of the S-box tables (63 7C 77 7B...). Even that won't detect applications which use an implementation from a shared library, though.
- SlowRobotAhead 7y agoYea, that’s how I did a blowfish program, just looked for the big constant table, but you know there are some clowns out there that “make their own” s-box :) you know, to “be even more secure”.
- rhacker 7y agoDoes it matter? TeamViewer is only used by old people specifically getting hacked by people in India. The only other person I know using it is Kitboga.
- blowski 7y agoFrom your own experience. I know at least 3 enterprise companies with around 70,000 employees that use TeamViewer. So, yeah, it matters.
- bottled_poe 7y agoDisgraceful. These companies need a kick in the pants. This product is clearly a gaping security hole.
- F00Fbug 7y agoOne more reason to flush this turd. It worked well for me until it started flagging some very non-commercial use (family IT support) as commercial. I actually tried to use their process to unflag myself. Gave up and am happy with AnyDesk now. Not sure what they do with passwords... guess I should check!
- lovetox 7y agoYeah just checked Anydesk, 100 Euros a Year and no online address book really?
- bottled_poe 7y agoYes another sloppy product that reeked of security flaws the first time I used it. How do these products become so widely accepted within a technically savvy user group? It doesn’t take a lot of knowledge to see the obvious flaws in how poorly the desktop sharing is implemented in this software. No wonder it is a favourite of scammers.
- gridspy 7y agoPerhaps misleading title? Teamviewer saves remote passwords in registry, encrypted with hard-coded key The biggest ambiguity here is that the passwords in question are just user-saved "remote server passwords" and the key takeaway is that remote desktop software should not be left running.
- Y_Y 7y agoI'm on the fence about this security practice, but does anyone know a good FOSS alternative to TeamViewer? As in something that lets me remote into any of my devices from any other and doesn't require a fixed up?
- wizzwizz4 7y agoVNC?
- rishabhd 7y agoI am in the middle of a cyber incident response engagement and we identified compromises basis this. Wrote a quick and dirty code to enumerate it en masse and do automated connection analysis basis available teamviewer logs. The results, are actually eyepopping. Good analysis and w00t!
- de_watcher 7y agoThe OS doesn't have something like a keyring or what? It's the same as registry, but explicitly states the intent.