207 points · by Garbage · 13y ago · 162 comments
The ability to take my critical secret information into a huge, buggy, extensible, unaudited, complex and constantly changing browser environment! Who could resist?
This will also inspire innovators world-wide. Look at it this way: we can now find novel ways to steal passwords, secret keys, log sessions, access servers, sneak in trojans.
Count me in.
Despite Chrome being speedily updated when known security problems are discovered, the attack surface compared to a dedicated client is huge: the 2-decade-old /usr/bin/ssh + /usr/bin/xterm combo has no concept of a DOM, does not share computing interfaces available to untrusted users (e.g. shared web workers), cannot receive messages from untrusted frames (postMessage()), cannot even be addressed by untrusted content (chrome://path/to/trusted/script), does not almost transparently expose ring0 drivers (OpenGL), does not have thousands of LOC on subsystems with little battle testing (WebRTC) and so on.
Of course these features are thought to be secure, until they are discovered in the midst of a Stuxnet type scenario and suddenly everyone is patching like crazy. Wasn't Java considered invulnerable only 2 weeks ago? Look at what changed - somebody noticed it wasn't long after tens of thousands of infections already occurred, and today it is on every browser's plug-in blacklist. I can't recall the last I read about xterm in the Pwn2Own contest, or any 0-day in the past decade, nor can Google accidentally DoS my xterm because their sync service is down (happened last month).
Following from the truism that the fastest, most bug-free code is code that doesn't exist, the easiest way to reduce exposure to unknown attacks is to minimize the amount of code running. Security design 101. Using something with the complexity of a web browser to render an 80x25 vector used to administer potentially hundreds of thousands of machines is almost the antithesis of good protocol.
An OS that they may or may not update frequently.
An OS that they may or may not be logged into as an admin.
An OS that may have a keylogger running on it.
I think running SSH (or Chrome Remote Desktop) from a Chromebox is a pretty good way to have that minimal OS that is updated frequently, without admin privileges, with a lower risk of a keylogger. That I have to use two-factor to log into, even if my device is stolen.
Yes, I agree. The grandparent does point out a valid problem. However I believe the parent was referring to the sarcastic tone and negativity, which I also believe should be out of place here on Hacker News.
xterm is bloated and unmaintainable. Here’s an excerpt from the README:
Abandon All Hope, Ye Who Enter Here
This is undoubtedly the most ugly program in the distribution. It was one of
the first "serious" programs ported, and still has a lot of historical baggage.
Ideally, there would be a general tty widget and then vt102 and tek4014
subwidgets so that they could be used in other programs. We are trying to
clean things up as we go, but there is still a lot of work to do.
Needless to say things have not changed, it’s still ugly. It has over 65K lines of code and emulates obscure and obsolete terminals you will never need. The popular alternative, rxvt has only 32K lines of code. This is just too much for something as simple as a terminal emulator; it’s yet another example of code complexity.[0] in a technical sense, the startup focus is quite unique to HN. or maybe I don't subscribe to startup-related subreddits (since startup news is not really the reason I read HN either)
Increasingly I expect a contrarian at the top stating nothing but the obvious fact that there are security implications. Can we stop this now?
You can find quality conversations in Reddit but, more than likely, not in the default subreddits.
People have been complaining that Reddit was taking over years ago and will continue to. Strangely while people posting cat pictures is downvoted for not being productive conversation comments like this get upvoted when it contributes just as much. Heck its even in the guideline:
If your account is less than a year old, please don't submit comments saying that HN is turning into Reddit. (It's a common semi-noob illusion.)
Although I know you have been around for more then a year.
I thought it would be obvious to most readers how a tty environment is easier to control than a browser (really, just consider the number and pace of updates to your kernel/windowing system/terminal and your web browser), so I did not bother with lengthy explanations.
The banks operate on the assumption that their user's machines will be compromised and have undertaken plenty of steps to manage their risk e.g. two factor auth, transfer limits etc.
I've written about this before at length, but I'll say it again here: the security practices of most major banks in the US are laughable. This applies to both online and offline banking.
Let's say your online banking browser session was hijacked and the bad guys transfered $100,000 out of your account. First of all the bank is likely to flag that transaction for closer review since it is probably a big departure from your usual behavior. Second, they are going to confirm its accuracy with you, at the very least in a printed or emailed statement to you that it occurred. If they are good, they will call to make sure you meant to do it. Third, they are going to keep records of what happened--the IP address that was connected when the transfer was requested, the time of day, where the money was transferred to, etc.
If it becomes clear that the transfer was a theft, then the bank will cover it as loss and you will get your money back. This is why online banking is not security-critical. Because there are numerous online and offline processes that mitigate the risks associated with online banking.
Now compare to managing your own webserver. The webserver is a dumb machine, not an intelligent counterparty like a bank. If your access to your webserver is hijacked, the webserver will not do a thing to detect, protect, or recover from whatever the bad guys do. Or more specifically, it will do only what you have specifically set it up to do.
By analogy, the lock on the front door of your house is "more important" than the lock on the front door of the police station--because there's no one behind your front door but you, while the police station has dozens of armed and trained officers behind their front door.
125 000 Euros per transaction (approx. $166 000 at today's rate)
I'd say that I agree with you: they've undertaken plenty of steps to manage their risk like by putting transfer limits.
It is perfectly possible that Google is doing all sorts of Evil Stuff (TM) in the binaries that they ship out. I don't think it's likely, because a fair few people will be examining the packets it sends -- but it is possible.
Yes, and your point is? Security audits do mean much, that's why they are done. Open source means a lot as well, it means that if I don't trust a software, I can check it if I want to, rather than accepting what a company is telling me.
There's a reason why cryptographic stuff is almost exclusively open source, it's because security through obscurity doesn't work.
That said, the amount of exploits for open and closed source software is more of less equivalent, but the time to fix is usually shorter for open source code.
When running OpenSSH inside Chrome on top of Linux you will be affected by any security bug in Linux, OpenSSH or Chrome.
It's not that hard to understand, really.
It's an oversimplification
SSH terminals are high-sensitivity software. We frequently use them, with very sensitive credentials, to log into secured servers. There are two zones of trust involved: we trust that our local machine is not rooted, and we trust that the server is not rooted. The magic of SSL means that no matter how foul everything is between those two zones of trust, we can't get compromised.
If we embed the SSH terminal in the browser, we now have four zones of trust: our local machine, the browser, the SSH terminal extension, and the server we connect to.
This is a very scary broadening of our attack surface. While the terminal app siting on your machine is decades old and has been tested extensively, the browser extension almost certainly has not. The browser extension, in addition to possibly having vulnerabilities itself, is executing in the context of the browser. The browser is a very scary place to be, because its whole mission in life is connecting to the untrusted, infected cesspool of the Internet and then doing what the Internet tells it to. By grace of God and Google engineers, we generally assume that our browsers aren't going to crack out of the sandbox surrounding the sandbox surrounding the sandbox that all that evil Internet stuff is executing in, but we expect that, in the normal course of operation, those inner sandboxes are going to fall into the hands of the enemy, repeatedly.
It therefore seems to be an exceptionally bad idea to take our holiest-of-holy credentials and move them inside the sandbox, closer to the attackers.
This is particularly true in terms of a risk/benefit analysis, since the risks are incredible and the only benefit is "Saves you from having to do a single key chord to pop open an additional terminal on your machine."
This is moot if you have total confidence in the Chrome and Native Client teams to never have a mistake which lets someone, e.g., read arbitrary process memory. That's happened before -- Mark Dowd et al found it. That would be pretty sucky if it happened on a browser you logged into your bank, because the attacker can probably grab your cookie and banking session. It would be much worse, though, if it happened on a machine used by a bank sysadmin who unwisely decided to use a terminal within his browser, because why steal one session when you can just steal the bank? (n.b. Note how this is possible without causing Chrome to execute arbitrary code or defeating the OS's protections against Chrome doing stuff outside the Chrome-box.)
http://git.chromium.org/gitweb/?p=chromiumos/platform/assets...
Additionally, the Secure Shell application follows a strict Content SecurityPolicy that does not allow access to the JavaScript 'eval' function. This helps lower the risk that a terminal exploit could run arbitrary JavaScript.
Translation: Don't worry, if the bad guys already own your server/local machine, it's less likely they'll be able to go from owning your server/local machine to owning your browser, because we make them have to jump through a few hoops to execute arbitrary Javascript.
I'm having one of those rare, weird moments where I disagree with someone I enormously respect in a field, on that field, and think -- even after reflecting -- that even with the "They're so smart about this they're probably seeing something you aren't" modifier the words that are coming out of their mouth are, in fact, not right.
Edit to add: I previously used the language "batshit crazy", but on reflection you could envision an attack like "Attacker gets arbitrary content written into a web server log; if we cat this in the JS context, we turn totally harmless text that wasn't executing on the server or the local terminal into executable Javascript." But I still really think that is less likely and less severe than bootstrapping a browser, NativeClient, or extension bug into "Root all the boxes."
The bugs Mark found in NaCl several years ago don't alter the threat model for a standalone SSH client either. And for context, Mark's work was done while NaCl was in alpha development, years before it shipped in Chrome; were performed as part of a Google sponsored contest and later a Google paid audit; and applied to the NaCl validator sandbox, not the outer process isolation sandbox. So, even the more nebulous threat you're implying is grossly misstated.
Client-side exploits in SSH clients have happened before[1]. The scope of such exploits is arguably reduced when running a sand-boxed application in a browser compared to a regular application on the local machine.
That being said, I agree with your general point that using a browser as an SSH terminal dramatically increases the attack surface, compared to a small dedicated client.
[1] http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2005-0467
Multiple integer overflows in the (1) sftp_pkt_getstring and (2) fxp_readdir_recv functions in the PSFTP and PSCP clients for PuTTY 0.56, and possibly earlier versions, allow remote malicious web sites to execute arbitrary code via SFTP responses that corrupt the heap after insufficient memory has been allocated.
Why? The whole model of Chrome is that there's a multi-process conglomerate with clearly defined interfaces between them and OS enforced boundaries otherwise.
Why would it be easier for a malicious JS payload running on Process A to attack the Chrome SSH extension running on Process B than to attack the terminal or openssh processes?
This is running OpenSSH code.
Thanks for the reminder that new software is less secure than old, and that new technologies often widen attack surfaces. There is little doubt in my mind that this is just the beginning of Chrome native apps, and they have to start somewhere.
e.g. "Lol that suckz because Google can steal ur passwerdz!" would not end up at the top of the thread. We wouldn't be terribly worried if someone actually said "Wait, I just audited NativeClient and it turns out you can achieve arbitrary code execution. Maybe you should avoid this software." The danger zone is comments which sound like the second but, on reflection, only tell you about as much as the first.
Give me PuTTY or SSH on a terminal any day over this.
Disclaimer: I avoid Chrome browser exactly because I don't have enough information to know if they really "aren't evil." I don't claim there isn't such information somewhere, just that I don't know about it. My worries are exactly because their installers install more like a malware than like clean projects ("no we aren't going to let you to simply download executables, just click here, give us administrative privileges and enjoy when we download what we want and change on your machine what we like").
Anybody who knows more?
In the same press release they said they fixed the problem and would be deleting the logs, but many governments quickly stopped them from deleting the logs so they could investigate.
That's probably why they announced they would delete them before they actually did. And the investigations found that Google was not at fault for accidentally recording unencrypted publicly transmitted data. ;)
http://git.chromium.org/gitweb/?p=chromiumos/platform/assets...
I don't troll interwebz from my terminal/putty, so I'd say there's a smaller risk of that happening there.
On a side note, add passwords to private keys :)
Granted this is equally a problem with any terminal emulator that you didn't compile yourself after examining the source code, but I have quite a bit more faith in Apple and the various Linux repo maintainers than some random guy publishing to the chrome app store. I don't know if Google even claims to vet its contents, but if they do I know they do a terrible job because I've ripped open some extensions to confirm they're doing some sketchy stuff (nothing insecure or worrying, more like adding affiliate links to your entire browsing experience)
The source for the extension is available at http://git.chromium.org/gitweb/?p=chromiumos/platform/assets...
Also, handing it private keys is completely optional.
So no, private key is still private.
I can now officially be productive on any computer running Chrome. Preferably one with caps lock remapped to escape.
It took me a while to figure out how to get it to try to make a connection - even though it says "Enter" you actually have to press Enter twice.
It then took me to a page with a link to the FAQ, which I tried to click on, but the link was not clickable. Also, the clipboard behavior is incredibly irritating: selecting any text automatically copies it to the clipboard with a giant SELECTION COPIED popup. It's also inconsistent: double clicking anywhere flashes the same SELECTION COPIED, which turns out to be a lie. It doesn't actually modify my clipboard in this latter case. And when I actually hit Cmd-C, it unselects my selection (WHY?)
(The FAQ claims I can "disable this by setting the copy-on-select preference to false, but I wasn't easily able to find a place for preferences. After some hunting, I found that I have to control click on the app from Chrome's "Apps" page to disable this.)
Anyways it's been hung at "Loading NaCl plugin..." for the last ten minutes. Either it takes a long time to load, or I don't have the NaCl plugin installed, and so it just decided to hang instead of tell me. I tried to install it by googling "NaCl", and found the link https://developers.google.com/native-client/. Clicking "Get Started" tells me to download an SDK and work through the "Getting Started Tutorials." All this for an SSH connection?
Anyways, it was overall a frustrating and confusing experience. I've now got four identical connection entries, none of which I can figure out how to delete, and none of which ever successfully connected to anything. Argh.
I'm thinking of writing some kind of p2p as a webapp that would be universal but right now it seems my best option is webRTC that, if I understand what I've read correctly, will require a complete handling of the streams on a server...
EDIT: Or how does NaCl differ from FirefoxOS goals and why?
http://developer.chrome.com/apps/socket.html
I played with this API for a few days and here are my conclusions:
1. the socket.listen can not handle much concurrency. It's very easily DoS'd
2. javascript String and ArrayBuffer is PITA to mess with. I tried to write a partially working HTTP/1.1 server, all the encodings and string parsing made me give up.
3. calback style programming is the new GOTO
The end is similar (web pages have access to much more) but the mean is different.
as in "The ends justify the means". It took me a couple of reads to understand what you're saying.
Perhaps you have Javascript blocked or something like that?
Often I want to repeatedly swap between a terminal and a web browser tab - for example, when developing a web application.
Having them in the same tabbed window might make the workflow, and division of my windows, more natural.
Another example - I use mutt for email in a terminal. So if I'm writing an email about a web page, I might prefer it to be in the same window (different tab) as the web page.
Downloading now to try it out...
Keep using PuTTY
I believe having another option could be handy.
No thanks, the browser is for documents. No need to install security holes.
Sounds like fun. ;)
The way I surf is simple: Chrome is installed from the .tgz and certainly not from the rpm or deb files (simply put: I don't need to be root to install Chrome and Chrome is confined to a single user account).
The account I use for surfing is separated from the account from which I use SSH to access SSH servers.
Should someone "root" Chrome while I surf the Web, he'd still need to find what is called a "local root exploit" to access what's in the other user accounts (for example, but not limited to, SSH keys).
I think there's no way that, for me, moving SSH inside the browser would provide me more security than having Chrome not doing SSH and being in a separate (throwaway) user account. It seems to be, once again, trading conveniency in the name of security. I don't doubt it fits Google's plan to make Chrome the OS that said and so they'll of course tell you: "Nothing to see here, move along".
Another concerning thing, depending on how it's done, it's that the potential to mount a "mocking bird" attack may be strong on this one. Mocking birds attack tend to not work well when you use MagicSysRQ to emit a keypress bypassing X, sending you to a text console, and doing your SSH magic.
I realize security is a pain, but it would be great if people could still criticize quite critical security issues on HN without having everyone downplaying the ones criticizing as "redditers" (is that an insult?), contrarians, etc.
I love HN. I love entrepreneurship. But I do love Bruce Schneier too and I consider security to be something very important.
Yet here everytime an app that does "one master online password to store all your passwords" gets upvoted like mad just because it's a "startup" and just because it "runs on a smartphone".
I understand that some of you may not like the "tone" of people using sarcasm to make a point but... They're still making a point and, very often, it's a valid point.
So it would be great if people could come up with better arguments than simply name-calling the ones pointing out the security implications of apps / plugins / etc.
From my understanding, Chrome is obviously not chrooted, so a local root exploit will be required in either case to access to the other accounts (since it will run with your current privileges).
And actually it seems easier to corrupt a chrome extracted in the home directory, since an intruder would not require root credentials to inject some code into your chrome (and replacing every bank front page with fishing pages, for example).
Vs: a non-root user extracting a tgz and then running some file, root is never involved.
I'm not in agreement with OP about this being a concern worth his or her mitigation strategy, but the logic is sound.