Hacker News new | past | comments | ask | show | jobs | submit login
LastPass autofill exploit (detectify.com)
1008 points by detectify on July 27, 2016 | hide | past | favorite | 420 comments



Great catch and everyone should know there is an easy way to parse URLs in JS. Just create an anchor element and let the browser parse it for you. Like so:

var parser = document.createElement('a');

parser.href = "http://example.com:3000/pathname/?search=test#hash";

parser.protocol; // => "http:"

parser.hostname; // => "example.com"

parser.port; // => "3000"

parser.pathname; // => "/pathname/"

parser.search; // => "?search=test"

parser.hash; // => "#hash"

parser.host; // => "example.com:3000"


Disclosure: I work for AgileBits, makers of 1Password.

For browser extensions, the URL constructor would be even easier: https://developer.mozilla.org/en-US/docs/Web/API/URL/URL (Yes, I know it says that IE doesn't support it, but IE doesn't have a proper extensions framework, so it's irrelevant to this topic.)


While you are here, can you confirm whether a similar regex vulnerability does not affect 1Password?


I had a quick look at the 1Password chrome extension source and it seems to me like they are using window.URL[0].

See this pastebin[1] for the function I believe is determining the url of the active tab and if it has a valid hostname.

There's also this one[2] that seems to be extracting the hostname of a given url also using the URL API.

Both these pastebins contain minimized code that I've cleaned up.

0: https://developer.mozilla.org/en-US/docs/Web/API/URL

1: http://pastebin.com/tWns7XmG

2: http://pastebin.com/PXS1iqsq


Not a dev on either product, but I use 1Password for my personal accounts, and a corporate LastPass for my work accounts. I do not believe that 1Password is as immediately vulnerable as LastPass.

LastPass (on Chrome) will auto-fill information on a detected site, which a malicious site can read immediately.

1Password (on Chromium nightly) requires me to hit the 1Password Mini button and select a site/account to log in with. If 1Password had a similar vulnerability, a malicious site as described would merely wind up showing me accounts for the wrong site in the dropdown. Clicking one could wind up submitting/leaking my credentials to the attacker, though.


1Password doesn't auto-fill, but you can press [Ctrl|CMD] + \ to fill in the password automatically based on the detected domain.


It does have an "open and fill" feature which autofills, but only immediately after opening the site by URL first. (So the attacker's URL would have to be saved in 1Password along side your credentials.)

This is actually how I use 1Password most often. Global hotkey of cmd+opt+\, type a site name, hit enter: 1Password opens the site and logs in.


If they're not using regex, they can't be affected by it anyways


Why not take a look at the code injected by 1Password's browser extension and find out for yourself whether it handles URLs safely? That shouldn't be hard to do, and it's a lot healthier for the community than discouraging devs to participate by taking their presence as an opportunity for drive-by pot shots.


I'm sorry, but I don't see how asking an employee of the company that makes the product that I use every day is "discouraging devs to participate by taking their presence as an opportunity for drive-by pot shots".

I think an official word holds more clout and is more valuable than any one person confirming for themselves in one version of one browser on one version of one OS.


I did speak rather harshly in my prior comment, and for that I apologize. Worse, I did a very poor job of expressing the concern that motivated me to respond. But I think it's still fair to ask whether your initial comment has value.

I understand that, as a user of 1Password's browser extension(s), you may well feel some concern that a similar vulnerability exists, and I don't think it's unreasonable to want reassurance on that score.

But I think your phrasing and framing of the question feels a lot more like a "gotcha" than anything else, and it's that feeling which motivated my prior comment - I'm not an AgileBits dev myself, but if I were, I'd feel strongly inclined to shy away from that question rather than trying to frame an answer that doesn't leave me open to a potentially hostile followup.


I understand a concern with my phrasing -- to be honest, I didn't put much thought into it as far as considering multiple interpretations.

I have sent a message to 1Password through the official customer support channel to ask the same question posed here. I'll update once they reply.


Update: Here's the response from earlier this morning:

> Thank you for taking the time to write to us here at AgileBits. The current version of the 1Password extension does not use regex to parse URLs for this exact reason. We don't autofill either, which also helps avoid issues like the one you mentioned.


Fwiw, his question did not sound at all like that to me. Your reaction feels like unfair personal bias. Not trying to start a fight but you seem openminded enough to hear it so figured Id let you know


Not at all. But I would be interested to hear what sort of bias you saw in my prior comment. I mean, I don't think you're wrong, but beyond the downvotes, I only have my own perspective to go on here, and I'd appreciate the benefit of having yours as well.


Not the poster you replied to, but there were 2 types of bias I saw:

1: Defensiveness. It seemed more like an honest question than a pot shot. You seemed to read into it something like "Aha! How about your software fool!?!"

That said, if it were a reporter asking the question, then I would see it as a gotcha, because the use of the word confirm is used as a setup sometimes.

2: Tech bias. Not everyone on here is a Dev, and even though I know a fair bit about programming it would not be a trivial task to do what is simple for you regarding checking out code injections and what they do re a security standpoint. That would probably be a long afternoon of googling for me :)

Just my view...


Sure. I took the original question at face value: It was a user who was concerned and wanted reassurance. Imo, it's a big leap to read it instead as a setup for a hostile "gotcha" style followup. I mean, is it possible? Sure. But there's no evidence for that interpretation. And to take a stats view, the bayesian priors aren't there (ie, most people aren't conniving snakes). Given that, it seemed to me that you were bringing your own kind of evidence to the table -- perhaps a personal experience in which you'd been similarly setup and mistreated.


Also, just because we're on Hacker News, it doesn't mean every reader is equipped to audit code for security vulnerabilities.

Presumably that's the job of a professional security developer that might reasonably be expected to have checked their own similar product for this vulnerability...


Fair. I would, though, expect someone whose HN profile identifies him as an experienced full-stack engineer to be up to the challenge of spotting something as basic as an extension injecting code into untrusted DOM and trusting the results that code gives back.


Chill. There's no need to bash other people's expertise. We get it, you're an expert in the domain, but this is adding nothing to the conversation.


URL constructor looks great! Just wish it was stable. I normally don't have to worry about IE very much anymore anyways.


While that might be an "easy way" - it isn't a secure way in this case.

Since malicious attackers have complete control over the page you're seeing - they can simply replace document.createElement with their own function. And instead of returning a DOM object, they can return an object that returns whatever they want in .hostname


No, that is not possible. Extensions in Chrome run in a different execution context than the website. The website's document.creatElement is different from the extension's.

If the website could override extension functions, attacks would already be possible by overriding Regex functions.


Good point, but that's assuming you're running in the context of the popup and not in the context of a content script. In the popup's script, you are using a new DOM. But in a content script - you're using the same DOM as the client, which can override createElement (and any other function as well).


While content scripts (in the extension world, meaning scripts running in the context of a content page) shares the DOM with the untrusted page, it does not share the JavaScript wrapper layer around that DOM. This is extra confusing because the global object is a (JavaScript wrapper around a) DOM object.

The untrusted script can override its own view of createElement, but not the extension's view.


Very interesting if true. I'm tempted to build an extension just to check that.

I wonder if a DOM mutation event would be triggered if a content script adds a new link element and changes it's href.

Would I be able to catch that and quickly change the href, before the content script continues to fecth the processed properties?


> Very interesting if true.

It is true. See documentation => https://developer.chrome.com/extensions/content_scripts#exec... :

> Content scripts execute in a special environment called an isolated world. They have access to the DOM of the page they are injected into, but not to any JavaScript variables or functions created by the page. ... The same is true in reverse


I don't know about this specific point, but you might want to take a look at the greasemonkey security pitfalls page [0]. There's been a lot of effort put into how all of these parts work together to make sure that malicious Javascript on the page can't interfere with what the plugin or userscript is trying to do.

[0] http://archive.oreilly.com/pub/a/network/2005/11/01/avoid-co...


Chrome extensions' content scripts are under stronger isolation from the page than greasemonkey scripts are (or were? -- I'm not sure if greasemonkey has changed since). Chrome extensions run in a separate "isolated world" from the page. They never share javascript objects directly. (They do share the DOM, but the isolated world gets its own separate Javascript wrappers around the DOM.) It's not possible to leak a function from the extension to the page, etc.


The page could only see a mutation event and get a reference to the element if the element was attached to the document. If the extension never attaches the anchor element to the document, then the page's code can't get to it.


Great point! Didn't realize that. Thanks for an informative answer. Definitely learned something new. This is why I'm here.


Even if it is a content script its still not possible. https://developer.chrome.com/extensions/content_scripts#exec...


My understanding is that the content script can access the webpage DOM, but not the other way around (it's a "one way street", if you will)


Disclosure: I work for AgileBits, makers of 1Password.

For desktop browser extensions that are properly using the frameworks, the extension's Javascript runs in its own execution context so the page cannot redefine variables. This protected 1Password when we discovered that a certain page had redefined the global JSON object, which provides parse and stringify functions among other things, to be the number 3, i.e. a numeric constant called JSON. :'D


Out of curiosity, does this apply only to Chrome's extension framework, or to Firefox's and Safari's as well?

Context: I'm a new 1Password user who is contemplating use of the extensions for those latter two browsers, and while it seems probable their extension frameworks offer the level of security you describe, I'd like to be certain before pulling the trigger. Thanks!


Disclaimer: I work for AgileBits as well :)

Hi there!

Yes, all 3 of the major browsers (and derivatives of them) offer the same support for a sandboxed execution environment. You can safely use any of them if that's a requirement you have :)

Kyle

AgileBits


Neat, thanks!


Great point. Exactly the type of comments I come to hacker-news for!


When you are here, is 1password for team is the future and the classic 1password will become obsolete soon?


Disclaimer: I also work for AgileBits

We really try not to call it "Classic" or anything like that. It's standalone, you're in charge of upgrades, syncing and backups and stuff like that. It's also not designed for sharing (at least to the degree of the Family and Team solutions).

That said, we don't have any immediate plans to remove the standalone products. However, if a vast majority of our users switch to 1Password Family or 1Password Teams (and as of today, an Individual plan!) then it doesn't make a ton of sense to keep the standalone product around. So, it's probably one of those speak with your wallet kind of scenarios.

I'll certainly pass your feedback along, it sounds like you'd like to keep it around.

I hope that helps answer your question :)

Kyle

AgileBits


I also very very very strongly do not want any hosted service requirement for using 1password. I am very proud user of 1P but a hosted requirement would kill it for me. No matter how much you (the generic 'you') tell me you're super secure, nothing will be as secure as owning my own data and using local Wi-Fi sync to put it on my phone.


Would you feel the same about encrypted data stored in Dropbox? IMHO it is better because you have more control and storage is decoupled from UI.

Anyway, I gave up on both 1Password and LastPass. I've been a 1Password user for about 2 years before I switched to KeePass.

To be more specific, for the desktop (OS X, Linux, Windows) I use: https://keeweb.info/

For Android: https://play.google.com/store/apps/details?id=keepass2androi...

And for iOS, though be warned this one is subpar: http://minikeepass.github.io/

All 3 apps are open-source. This is important because open-source will not die for as long as there is demand and more importantly, you own it.

No, I'm NOT against proprietary software, as I said, I gladly paid a premium for 1Password. However their Windows client is basically unmaintained, their new "modern Windows" app is still alpha and doesn't work with Wine and of course, they have no Linux support. Most aggravating is that they are clearly switching to a subscription model, with all of their development effort going towards it lately. No more Everywhere interface for OpVault, no new sync options other than Dropbox and iCloud, etc. In other words I'm tired of bait and switch models and one is in progress here.


Seconding this. I generally dislike hosted subscription offerings, especially for a password manager, and even more especially for one that I've already purchased four different licenses to (Mac, Windows, iOS, Android).


While I understand your concern, and to some extent, sure, you're right that owning your own data does reduce certain attack vectors it's also a trade off that a vast majority of people don't have to worry about either.

But the real important thing to consider is whether the protection you would get from a hosted solution so above and beyond overkill that it matters?

If you're curious why I feel that way, we have written up a white paper on how 1Password Teams (and therefore Families and now Individuals) stores and secures your data.

https://1password.com/files/1Password%20for%20Teams%20White%...

We designed 1Password so that we cannot know anything about your data. We also designed it knowing full well that our servers would be a target. So, we designed it in such a way that if a malicious person were to acquire your data there's more or less nothing they can do to acquire the decrypted data.

What we settled on is having two secrets. Both of which are not known by us. The first is your Master Password, something that you're likely well aware of having used 1Password already. The second part is an Account Key, which is a random 128-bit key generated locally. These two things are never given to us and should never be shared. They are both used for the cryptographic functions in 1Password. Without them both, you can't see the decrypted data.

This is unique in that it actually protects weak master passwords. That's the big deal to worry about if our database of user data is compromised. The first attack is to start running password cracking tools against it to try to find the weak passwords. Except in this case, there are no weak passwords because even if your master password is "a" the attacker still needs your Account Key, which looks something like this:

A3-Z4JZ6V-P9BALK-S6J69-FAXCN-LTDY8-T3QHJ

So, now a password cracker is going to have to guess all those combinations of weak passwords against something much much stronger as well. I wish them luck because the math more or less makes this impossible if a user uses a strong master password as well.

There's some math in the white paper if you're curious about more.

Knowing how it works and how extremely unlikely it is that I am such a target that someone is going to literally spend millions upon millions of dollars trying to crack my account (and still likely get nowhere)... I'm small fish, it just isn't worth it to even try.

Either way, for the sake of learning (I love learning, so I always assume others do as well), I would recommend reading the white paper, if not only to gain some new knowledge that you may not have been exposed to previously. If you have, awesome!

As always, if you have questions let me know!

Kyle

AgileBits


Please do consider keeping the standalone apps. Not having my passwords stored on someone else's server (encrypted or not) is why I'm a 1Password user (and likely buying an upgrade license this month to load it on my other windows box). Similarly why I've bought and upgraded Arq to store backups on storage I control.


I'm probably being daft but I can't find the Individual Plan on 1Passwords homepage, any idea where I can find out more about it?


Sorry about that, we haven't officially announced it but it is available when you start the sign up process.

https://start.1password.com

It is $2.99/mo when billed annual ($3.99/mo month to month), includes all of the applications as part of the subscription price.

It is otherwise based on the same technology as Family and Teams options. It's basically Families with only 1 user.


I think the point is that this would run in a document belonging to the LastPass extension -- not that it would run in javascript injected into the target site.

The same attack you describe could be applied to basically any javascript you cared to write (say, String.prototype.length). The safest approach is to treat the output of injected javascript as untrusted third-party input to your extension code and work from there.


At least in Chrome, I'm imagining the raw url would be sent to a background process that is sandboxed from the webpage and would then do the createElement stuff.


But that shouldn't be necessary here, if I understand the problem correctly. The code Lastpass was looking for was simply `document.location.hostname`.


Please correct me if I am mistaken, but couldn't this have been implemented into an iframe that when ran could send the passwords to another remote server?

If so, I am a little taken back by LastPass only offering $1,000 to the researcher that found and reported it for fixing. He or she could have taken a different path and resulted in this being used in some complex targeted attack against tech corporations via short-url redirect interstitial pages, or an ad network's javascript, etc. Given the potential damage, I'd say there is a missing zero or two on that reward amount, in my opinion.


Normally I like bike shedding about bug bounty payouts just about as much as complaints about paywalls. If you are going to go poking around someone's code for fun or profit, the terms of the bounty program are readily available [1] so you can't complain after the fact for earning the maximum payout. LastPass isn't Facebook, and they never claimed they would pay more than $1,000 even for a full compromise or RCE.

On the other hand, using regexp to parse the URL when it's such an obviously security critical code path... just, why?!

[1] - https://bugcrowd.com/lastpass


The concern with the low payout is that it's supposed to be a way to compensate white hat hackers and dissuaded them from going to the black market with security problems like this. Given the business that LastPass is in wouldn't you agree that it's extremely crucial they make sure white hat hackers are aptly compensated for serious problems they find? In fact I'd think it'd be reasonable for them to pay more than Facebook for certain classes of bugs(like this one). After all all your passwords are more valuable than your Facebook account.


No, that is not at all what a bug bounty is meant to do. We are not expected to pay people to avoid them launching criminal conspiracies against us.

The purpose of a bug bounty is to incentivize researchers to target specific pieces of software so that vendors can benefit from that attention.


Let's assume that there is a spectrum of honesty (say, from 1-10) and the pool of people capable of discovering vulnerabilities in your product includes people from the entire range.

If you're a 10 you will disclose responsibly regardless of a bounty, and if you're a 1 you will disclose to the highest bidder. The rest will weight profit, ethics, and risk in some ratio depending on where they fall on the scale and decide to act based on that calculation.

The company has to price their bounty on a few factors: how much they can afford to pay, how much a bug is worth to them (eg damage to their reputation, fines in the event of a vulnerability), and how important it is and to have researchers looking at their product instead of another product.

I agree with you that companies should not be required to pay people to prevent them from launching criminal conspiracies. But this is not a perfect world and people are not so black and white in their actions and motivations. There is no point trying to optimize your bounty program for the 1's or the 10's. Therefore, when optimizing for the rest it makes sense to pay as much as possible within the constraints I mentioned (in the previous paragraph) in order to tip the scales in your favor for the largest part of the spectrum possible. Right now the tech community knows about this problem with LastPass. If this exploit had made it to the wild things would've been much worse for them from a PR perspective.

I am hoping that the $1000 cap on the bounty program came from careful consideration of these factors, but my gut tells me it was a number handed down from management.


The point is to get more tens to even look at the code, not encourage people that have already found vulnerabilities to share them. I also think you vastly overestimate the percentage of criminals.


I think it's a bit of bucket A and bit of bucket B. Still even if one accept the definition you put forth the argument that having such low bounties makes LastPass look bad/like they're not caring is still valid.


No, it is not at all "bucket A" and "bucket B", and suggesting otherwise is a grave insult to hundreds of researchers who would never dream of attempting (and, of course, inevitably failing) to "sell bugs to the black market". Finding interesting vulnerabilities in software makes you clever and talented, not sociopathic.


> and suggesting otherwise is a grave insult to hundreds of researchers who would never dream of attempting (and, of course, inevitably failing) to "sell bugs to the black market".

No, suggesting otherwise is saying that a bounty program with high enough rewards can reach both legitimate security researchers and sketchy folks. This is in no way a slight on the first group.


So the people on this thread saying that this particular researcher didn't get paid enough to "do the right thing" just mean that this person seems a little sketchy?


Clearly not - merely that this bug could just as easily have been discovered by someone 'a little sketchy' and $1000 wouldn't be a big enough reward to skip setting up a watering hole or two for lulz.


What he's saying is "raise the bid"

Your rationale would be a valid rebuttal in your world no matter what the amounts in question were. $500? Incentive! $50? Incentive!


This is a non-sequitur response to my comment, whose whole purpose is to point out that a bug bounty is not a bid in an auction against organized crime.


You wish it was a non sequitur when it is completely relevant

We can agree to disagree because the perspective really wasn't for you, it was for everyone else reading that will share a sentiment they've felt but never articulated


In practice, in many cases, bug bounties are de facto a bid in an auction against organized crime. It doesn't need to be 1-to-1 equivalent bid, and it's not for all sources of found bugs, but the intent and the effect is definitely there.


No, they are virtually never a bid against organized crime.

There are two kinds of vulnerabilities in the world:

The kind organized criminals will pay tens of thousands of dollars for, and the kind they, like any Internet rando, will pay $50 for lulz.

If you think this dumb regex bug is worth the same to organized criminals as a Chrome sandbox escape or drive-by reliable Flash RCE... well, people think that about a lot of bugs, I guess.

This LastPass bug is terrible. I was already inclined to warn friends against using it (but my other friends have beat me to that punch many times before). The bug looks terrible for LastPass and its mere existence is damaging to that project.

But that doesn't mean the bug has significant monetary value. As someone else here cleverly put it on the last dumb bug bounty thread: you can smash a car with a sledgehammer, but that doesn't make the sledgehammer worth the value of the car.


> you can smash a car with a sledgehammer, but that doesn't make the sledgehammer worth the value of the car.

Perfect analogy, I'm putting that in my back pocket.


No, but it makes sledgehammer-prevention worth something greater than zero and something less than the cost of sledgehammer repairs.

Bug bounty programs, presumably, prevent unsavory exploits at some point in the future. Having this responsibly disclosed was damaging still, but cost LastPass less money than having it exploited later.

I'm not sure where that falls on your "significance" scale.


I can think of few vulnerabilities with more monetary value than an arbitrary exploit of a password manager in broad use by a class of people who have access to huge numbers of private systems.


There are many people capable of finding this specific bug and reporting it who might be motivated to take a look by a bug bounty, but who would never even consider trying to sell an exploit on the black market. I agree there is one cohort where you are trying to offer them an alternative to illegally monetizing their exploits. Then there is another cohort who you are just trying to encourage them to spend some time with your code versus someone else's. I could only guess at the relative sizes of the two groups, but the optimist in me thinks bug bounties are less about the former than the latter.

As we can see from avlidienbrunn2's response [1] sometimes it's not about the money. It's just fulfilling a natural curiosity about a product, maybe getting your killer write-up of a shocking bug to hit the top of the HN frontpage, etc. So in this case perhaps the bounty program is as much about establishing a legal structure for a whitehat to operate under than to fairly compensate ad hoc pen-testers. I wish they paid 10x or more for this bug. But I'm glad at least pen-testers can report these bugs without [as much] fear of reprisal.

[1] - https://news.ycombinator.com/item?id=12171753


I agree with the cohort theory, but to me it's not so much about the risk of someone selling an exploit on the black market, all though it's still a risk. To me it's more about how it reflects on a company where security is key to their product. Low bounties kinda gives of a vibe of not caring about the security of their product and maintaining it.

Personally I lost a lot of confidence in them when they got acquired and switched to 1Password, paying very low bounties for critical security flaws further hurts my confidence in them.


Most companies, including companies far more security-sensitive than LogMeIn, pay no bug bounties at all. Meanwhile, the companies that pay the largest bounties are themselves routinely harangued online for underbidding the black market --- despite the fact that outbidding crime is in no way the purpose of a bug bounty.

From my vantage point, the logical conclusion to the comment you just wrote is that companies should avoid offering bug bounties. They just attract negative attention.

(I won't use LastPass, and have recommended 1Password --- but Tavis Ormandy is looking at 1Password right now, and I'm guessing they're going to end up disappointing HN too.)


It's true that not all companies pay bug bounties and you might very well be right that paying them, especially if they are much lower than other companies that operate bug bounties, might have a worse affect on public opinion then not having bug bounties at all. To me it's still concerning that Facebook pays 10x more for problems that are less severe and it does still make LastPass look like they don't care as much in comparison.


If this was a thread about a Facebook vulnerability, the exact same things would be said about Facebook. To verify for yourself, use the search box at the bottom of the page to find a thread about a Facebook bounty.


Wouldn't a true white hat hacker report the bug no matter what the bounty? Therefor, the bounty is in place to encourage black-hat hackers to report the bug instead of trying to profit from exploiting it. But I do agree that it is in a security company's best interest to offer high dollar sums for reporting crucial bugs. I am just arguing semantics :-)


It isn't a choice between "bother to submit or not", it's a case of a white-hat might be encouraged to look into this product rather than another product because of the bounty.

So the end effect is more bugs found by "white hats" rather than "black hats" because the bounty has focused the "white hat" efforts on your program. (Or encouraged them to look at all.)

I'm likely to poke around a site with a bug bounty even with small sums just because it hints at a more formal process and also likely means they have a sensible policy about not going after testers.

Bug bounties are as much about signalling than encouraging "black hats" to suddenly turn to the light side.


I mostly agree, but I would say that if the amount of a bounty affects your decision on whether to responsibly disclose it or sell to the highest black-market bidder, then you are at the very least a grey hat.


"On the other hand, using regexp to parse the URL when it's such an obviously security critical code path... just, why?!"

Why not? URIs are at least able to be tokenized perfectly well by a regular expression. You have to do it right, but there's little guarantee that your non-regexp code will do it right either. I glanced at that regexp and immediately recognized several potential problems with it... will I be able to do that with your non-regexp code?

To concretize the "several potential problems": 1. You generally don't want to parse arbitrary protocols, you should do something like (http|https|file) or whatever set of protocols you are ready to receive. Usually you're better off treating anything else as "not a URL", but consult your local security context for details. 2. Failing that, you want at the very least .⁎? to stop matching at the first :, or if your engine doesn't have that, the protocol ought to be matched with something much tighter like [a-z]+. And I do mean + and not ⁎, because you probably don't mean to support an empty protocol before the colon. (You may mean to permit URLs with no protocol, but that's (.⁎?:)? .) 3. Domains should be parsed more tightly than "not a slash". 4. Also, I have no idea what the @ was doing there. Perhaps it was trying to be $; URL parsing should always end with the "end of string" matcher to avoid problems similar to this. It should also start with the start-of-string matcher, which this one doesn't, for similar reasons. 5. Bonus critique, anything using regular expressions to URL-encode or decode is very suspicious; strongly prefer built-in functions that do this.

I literally saw all this faster than I could type it; does your non-regular-expression based code have this property?

Regular expressions aren't bad. They're hard to write properly, but still probably easier to write properly than anything else. It turns out the underlying problem is fundamentally hard.

(Had to use an alternate asterisk to get the RE expressions correct with HN trying to format it.)


Heh.

https://mathiasbynens.be/demo/url-regex

https://lostechies.com/chadmyers/2010/11/20/parsing-a-url-wi...

https://stackoverflow.com/questions/27745/getting-parts-of-a...

What do all these have in common? They all demonstrate that it is hard to write a regex that parses URLs.

Regex's hide programming mistakes because they not only become harder for humans to parse as they get more complicated, but also there isn't simple programming code to handle potential security vulnerabilities in-line with the code. It also hides the [at least] two considerations of secure programming: designing a secure function, and handling the function securely.


It is hard to write code that parses URLs, period.

You can't look at regexs in isolation, see that a task is hard, then declare them unfit. You have to consider them as one of the many choices and analyze the cost/benefits of the whole suite of options.

I guarantee you that anyone who has said "Oh, gosh, this is hard, I'll just start using indexOf and substring operations" has written code that is just as broken, only in ways much harder to tell.

Which is probably why everyone here thinks it's better to not use regex. You didn't write better code... you wrote code that hid its brokenness better. That's not a good thing!

Again, my real point here is not "regexes are awesome in every way"... my point is that I literally glanced at that code and saw several ways in which it was wrong. Does your alternative have that property?

Also, some of the difficulties of regexes are accidental, not essential. Take something like the recent Perl 6 efforts for parsing and you're far better off in every way using that stuff than trying to bash together string-manipulation-based parsing, or whatever other alternatives you may be thinking of. The Perl 6 constructs will be more readable and more maintainable. (Perl 6 is crazy in a lot of ways but the parsing support is best-of-breed.)


Regular expressions describe finite state machines and in programming there's nothing simpler than finite state machines / finite automatons. Your handling of vulnerabilities inline is anything but simple. This is CS 101.


The handling of security is anything but simple. Hence, a simple solution is anything but secure. This is Security 101.


I can't even parse that. First sentence is false. Second sentence wouldn't follow from it if it were true, but then a false sentence can imply anything. And I've literally taken Security 101 in college.

You might also want to check the definition of "simple". Probably doesn't mean what you think it means.


> using regexp to parse the URL

A while back I whipped this up: https://gist.github.com/pmarreck/2956396

which seemed to work well (although it was a bit slower, I probably didn't know about exponential backtracking at the time and that could probably be revisited). It won't gather multiple name/value pairs though, but it will cut out and name basically every other part of the URL.


Wait what?

"Why not? URIs are at least able to be tokenized perfectly well by a regular expression."

"5. Bonus critique, anything using regular expressions to URL-encode or decode is very suspicious; strongly prefer built-in functions that do this."


Encoding or decoding is not tokenization.

And the problem is probably more accurately stated as "be suspicious of any function implementing encoding or decoding" rather than focusing on the regex part. Use the correct standard function. Don't bash something together yourself. They're actually pretty easy functions to write if you know what you're doing, but it's even easier to use some tested already-existing function. In fact, it's so easy that the fact that you see someone bashing together a URL encoding or decoding function almost certainly proves that they don't know what they are doing, which in turn means the URL encoding or decoding function was written by someone who doesn't know what they are doing. Unsurprisingly, these are, well, to quote myself, "suspicious".

Yes, that logic applies to URL parsing as well! Unfortunately, browsers make URL parsing extra hard, which is really stupid, so you end up with more crap in Javascript than anywhere else. Even then you ought to prefer someone else's tested solution over just smashing out a regular expression; however, it is not a knock on the tested solution if it is a regular expression-based solution.


> Why not?

This article is a perfect example of why not.


you can't complain after the fact for earning the maximum payout

Why not? Sure, you can't accuse them of being dishonest, but why would simply announcing an action make it beyond reproach?


At the time I submitted this, they didn't even have a bug bounty. Considering that, I think $1,000 is great :)


I think paying only $1000 for a potentially company-imploding bug like that is incredibly short sighted.

It's far too low to motivate a lot of people to look for bugs, and to me suggests they're not serious about protecting their reputation if someone does find such a company-destroying bug.


HN has weird beliefs about the company-imploding properties of all sorts of bugs, from this to CSRFs that let you delete photos from Facebook. After all, a competitor could use it to erase all the photos on Facebook and then take over the market!

That was an actual argument on a thread about Facebook underpaying bounties.


To be fair, this bug is pretty nasty because it allows anyone to get all your stored passwords. That's like the core business of LastPass. LastPass leaking your login credentials for e.g. online banking is really not comparable to deleting Facebook photos.


How does paying extra money address the underlying concern that LastPass has absolutely trivial regex bugs that entirely defeat the security of the product? I agree that the bug is terrible, but the bounty and the impact of the bug to the company are largely orthogonal, unless the bounty includes a confidentiality term.


I guess the point people (including me) are making is that it should pay off to do the right thing and report a bug that is capable of killing your (core) business. While OP obviously is a honourable person, others might not be and are more interested in getting money than doing the right thing.

Of course it's illegal/wrong to sell an exploit to third parties, but that doesn't stop people from doing illegal things as long as they get money for it. You just don't know about the issues that are sold because that's obviously not going public.


This doesn't make any sense logically. We don't need to pay people to prevent them from committing felonies. The suggestion that we do is actually pretty offensive to people who find vulnerabilities. Most of us --- in fact, the overwhelming majority of us --- are not torn at all about whether we should sell flaws to the black market.

(This is of course orthogonal to the fact that the black market does not want these vulnerabilities.)


No, you pay people to bother looking in the first place.

Criminals will always be looking, but the odds of finding vulns against a company that pays decent bounties should be far lower than against one paying a pittance, since more people should be looking due to the greater potential reward.

Also, in this case, I think that the amount of damage the company has avoided due to the vuln leaking through non-responsible disclosure is far more than $1000. Deleting photos on FB is nowhere near the same class of seriousness.

The company STORES PASSWORDS. Leaking them is serious.


And somebody looked, so clearly the bounty worked! But the cost to find a bug has practically nothing to do with the impact of the bug. The incentive is to find bugs, not a particular world ending bug.


How do you know it hasn't already been found and actively exploited?

Regardless, if a company isn't willing to demonstrate they value security to my satisfaction I won't be a customer.


I am absolutely OK with the idea that you'd stop using LastPass because they have a bug this dumb. I'm even OK with you believing that LastPass should pay more than other companies because they are so clearly reliant on external researchers to work on spec to find the simplest possible flaws in their code.

The only problem I have is with the virulently bogus meme that companies should pay more for vulnerabilities because otherwise the "black market" will outbid them. No:

* The "black market" does not in fact want these vulnerabilities.

* Finding a vulnerability and then not using it to to enter into a criminal conspiracy simply isn't praiseworthy, and reasonable people don't have to paid not to do that. It's hard enough to do this kind of work in a society that believes there's something sketchy about finding vulnerabilities at all, without the constant chatter about how maybe they could just make a living by enabling crime.

* The argument doesn't even make logical sense. If the vulnerability is easy to find and exploit (as this one was), then no matter how severe it is, it doesn't command a high price because you could spend less money to independently rediscover it. Moreover, there are surely many other vulnerabilities to be found in the same target. The economics of the argument are all wrong.


> I am absolutely OK with...

That's a weight off...

I have no idea who you think you're replying to, but they're not my points dude...


So you don't believe there are blackhats out there? Because somebody has to be breaching online services and it's rather unlikely it's a godly entity doing that.

Felonies exist and people still commit them. Should they? God no. But people with a lower moral code exist and they can be flipped to do "good work" if there's enough money for them (and I think you should get more money in general for your important work anyway). I find the notion of your profession only consisting of good people highly offending to the rest of the world.


The people who are not the majority of researchers would be... Wait for it... A minority of researchers.


So... a minority of people aren't capable of causing trouble? I don't see your point.


This is a crazy argument. HN is a community populated in large part by software developers, most of whom will at many different times in their careers ship vulnerable code they wrote. You're saying that if you start a new company, you should either (a) get your code absolutely perfect, which nobody ever manages to do, including people who go to great expense to try, or (b) be held hostage by extortion schemes to pay greater sums for vulnerabilities lest the discoverers exploit them to cause the most possible damage to your company.

You know who does fine in a world where that's the norm? Facebook. No matter where vulnerabilities get valued at, they will be a rounding error expense to Facebook.

You know who does not do fine in that world? Anyone smaller than Facebook.

Thankfully, that's not the norm in the real world. Unfortunately, the real norm is: if you pay a bounty at all, random people on Twitter and message boards will claim you're being negligent by not paying more for them. The lesson then is: don't offer a bug bounty. All you're doing is attracting negative attention.

You know who does fine in the real world where that's the norm? Apple and Cisco. Really, so does Facebook, despite the bullshit flak they take for their bounties.

You know who does not do fine in the real world? End-users.


Nothing in tptacek's comment implied that blackhats don't exist.


They sold their future. The next bug will be sold to the highest bidder.


People find and disclose bugs regularly even where there isn't a bounty. Most (at least 99.99%) developers don't want to see a useful, successful product fail even if they can personally gain from it. The likelihood that an exploit for Lastpass will be discovered by an attacker and sold to a nefarious actor is very small.

Further to that though, we now know that this problem is fixed in LastPass. We don't know about other password managers. To that end, LastPass is now a better option than it's rivals.


To that end, LastPass is now a better option than it's rivals.

Only when you believe that all password managers are equally secure from the start.

There are many reasons to believe that this is not the case. Storing passwords in a cloud service is quite a red flag. Then there is a former employee stating on Twitter that part of the codebase is very neglected:

https://twitter.com/ejcx_/status/758081553712820225


I never understood why security-conscious people would choose to use a service (e.g. Lastpass) that stores all of your passwords in the cloud. Why not just use KeePass instead? Yes, it's a little bit more hassle, but all of the other password managers have been subject to serious exploits like the OPs that put people's data at serious risk of compromise.


Bounties aren't just monetary motivation - they show that the company understands security and responsible disclosure. For example, I've found pretty bad flaws in some white label web-based CCTV DVR software (privilege escalation and session hijacking). I went to the company website and couldn't even find a technical support contact. Given there's no bug bounty or other evidence they take security seriously, I don't want to risk sending this to the wrong person and receiving legal threats etc so it will remain undisclosed.


I have become a bit of a skeptic -- we know that a problem like this existed in the code-base and is now fixed. So, should we then conclude that LastPass is now "more secure" because of it, or is the existence of this face-palm bug in production code actually evidence that LassPass is "less secure"? Certainly I would not go so far as to claim that this bugfix somehow makes LassPass a better option than its rivals.

I put more/less secure in scare quotes, because my point is really that fixing one particular bug certainly closes that one particular attack vector, but security is not a progress bar that goes from 0 to 100.

What this write-up does in my mind is really highlight the risks that come along with using a complex piece of software to manage your passwords. We tell users they can use password managers to safeguard their passwords and increase their security. We talk a lot about the usability trade-offs which password managers entail, but perhaps not as much about the security trade-offs!


It depends on the nature of the bug, right? In this case, the bug would make me much less likely to ever recommend LastPass.


> Further to that though, we now know that this problem is fixed in LastPass. We don't know about other password managers.

Um...it was a really stupid mistake. Writing your own bug-prone regex here instead of using an existing, trustworthy function is just really bad. Especially when the consequences of a bug mean a hacker can steal someone's passwords.

You should really hope that any company that prides itself (and bases itself) on security would never release this bug. It absolutely lowers the reputation of lastpass.


Perhaps LassPass users might like to donate to show their gratitude -- after all, you just protected an awful lot of people's passwords.

Have you got a mechanism you could post here for them to do so?


You may donate by spreading the word about multi-factor auth :)


I wish I could upvote more than once. :-) Good on you, great reporting and all. Thanks for keeping my passwords more secure! And yes, I need Google Authenticator to log into my Lastpass.


That's a great response. I really like my Yubikey (Neo) and wish I could use it with more sites.


The fact that LastPass consider that a flaw in their system that could have put them on their knees is only worth 1K is quite frightening if you are relying on them for your security.


Exactly this. I'm abandoning them now.


I want an alternative, got a good one?


If you're using a *nix system: https://www.passwordstore.org/ I switched over from LastPass a few months ago. It uses gpg for encryption and supports git for password syncing between systems. Pretty simple to set up and use. There are quite a few third party apps for it already (both desktop and mobile)


Does this still have the problem of leaking metadata (site names, etc.) in plain text? I don't want to manually obfuscate them.


If you don't like manually obfuscating things, just keep your passwords in a txt file.


I've been amazed by Pass, but couldn't find a thorough review between Pass and KeePass(x). Is one safer than the other?


`pass` is based on well-established cryptography implementations: GnuPG. GnuPG is recommended by many security experts and used widely by journalists dealing with sensitive disclosures, e.g. the edward snowden documents.

It also doesn't try to NIH some complicated database format or syncing technology but instead uses well-established software (git, plain directory structure and gpg-encrypted text files) which makes it robust, flexible and future-proof, and also responsive to changes in cryptography as it benefits from upstream GnuPG updates. You can use any PGP key structure you want, or even hardware PGP devices like the YubiKey.

KeePass on the other hand seems to be based on mostly homegrown techniques written by people with no or limited understanding of cryptography. (see e.g. [0]) That said, I don't know how much KeePassX continues this trend - but it's based on the same file format so it presumably has to reimplement at least some of KeePass's homegrown crypto.

I don't know how much more convincing you need, but personally I wouldn't even dare consider using anything other than `pass`.

[0] https://news.ycombinator.com/item?id=9727297


Thanks! I'll definitely migrate to pass soon.


One big difference: pass only encrypts the password. All metadata is plaintext, so anyone can see a full listing of what online accounts you have.


pass is as safe as your gpg installation and your gpg key because that's the encprytion it uses.


That's a dangerous oversimplification. By that logic "LastPass is as safe as AES as that's what it uses" which is obviously not the case.

A system is as secure as its weakest component.


I tried LastPass, but didn't trust them, so I found https://www.passwordstore.org/ some year ago. I can't emphasize enough how good it is, mainly because it is so dead simple and transparent in how it works, and also because it has great bash integration, and uses git which makes it easy to sync between your machines. There is also a firefox plugin that integrates with it, but I don't really see that you need it: it is so easy to use at a prompt.


I use password store to, and it works really well. I'm on MacOS but having it to work under Android and Windows was a breeze.


That's brilliant, thanks a lot!

I never trusted "cloud" (read: not yours) password stores. I have been using KeePass and manual syncing, but I had my doubts about it too.

This looks perfect and simple!


Don't use anything that runs in the DMZ (browser), if you care about your secrets.

I use keepassx, which requires manual search, copy, paste but it can store its vault on a cloud drive, mobile etc. and can have a key file or password.


Worth mentioning that one of the major benefits of Keepass is that it is open source. Many of the other providers mentioned here are not.


What do you mean? Autotype is available in KeepassX.


Autotype is a bit risky because it assumes you've got the correct window/element focused. All it takes to expose your passwords is for a pop-up (e.g. instant message) to appear at the right moment.

Even if you don't hit the enter key/submit the form it is still possible for that incorrect window/app to grab your keystrokes.


I had this once, "auto typed" a password into a messenger window. So be careful it can happen at any time. Better use Ctrl+C and Ctrl+V.


I switched to 1Password after Lastpass got acquired. I obviously have no special knowledge how secure it is but it's serving me well. OSX browser integration excellent, iOS integration mediocre.


Disclosure: I work for AgileBits, makers of 1Password.

If you're interested, all our data formats are well documented for review: https://blog.agilebits.com/2013/03/06/you-have-secrets-we-do... You might also be interested in the security white paper for our hosted 1Password service: https://1password.com/security/ (White paper is linked at the bottom of the page.)


How easy is it to migrate from Laspass to 1Password? I've had the worst experience with their tech support (reported 2 bugs that have both been scrapped as WONT FIX) and really don't want to support them as a premium subscriber anymore.


Disclosure: I also work for AgileBits :)

We have a dedicated LastPass import option. See here:

https://support.1password.com/import-lastpass/

If you encounter any trouble please write into support at agilebits dot com and mention "Kyle" somewhere in the body of the email and I'll get notified. You should be fine though, but every once in awhile we have someone encounter trouble with the import from LastPass.


Thanks!

I checked out the pricing model and didn't see anything that made sense to me as an individual user. Is there any plan for an affordable individual plan (in the range of 10-20$/ year)?

As a Mac/IOS user, I don't see myself shelling out 60$ for a desktop license and then another 10$ for an IOS license on top of it. I'm sure your profit margin is great, don't get me wrong, but as a buyer that is just overkill.


The individual plan is the lowest cost subscription option, and standalone is an option if you would like to try to spread the cost out between releases, but you would have to pay for any major upgrades as those are not included.

I'd say many people don't need the Pro features in the iOS version, it's possible that maybe you won't either? Depends on how you use it I guess. Probably the biggest reason to get the Pro features is multiple vault support (you can add additional vaults that were created from the desktop versions). With the free version you only get the one vault.

If you use the app like most people, you'll be using it dozens of times a day. Even if it's in small interactions those do add up. I've been trying to convince the team to add some sort of individual statistics that were stored locally for users to see, but I suspect this would probably help you decide that regardless of price it would be worth while :)

In the end, the choice is yours though. We certainly want to hit the price point for all users that we can, but we do have to keep the lights on or the product disappears. We aren't priced at a point where we're trying to acquire users in bulk so we can sell to another company. AgileBits is privately owned and has never taken outside funding. Something to be aware of when you're talking pricing I suppose. At least one factor.

Kyle

AgileBits


I appreciate the honest response. I couldn't find an easy link on mobile to explain what those Pro features were and it sounds like I don't need them after all. I just need to be able to share a database of passwords between my few devices for personal use.

Purchasing 1Password for 65$ gets the current major release with no updates?

Subscribing to 1Password Families for 5$/month: Lets me sync passwords between all of my desktops and phones? Can I sync an encrypted password database or is this done as a hosted cloud solution by 1Password?


Sorry for the delay in response here. I eventually had to go do some of my regular duties and that meant closing the web browser at some point yesterday :)

$65 gets you a single license for Mac and Windows. This can be installed on multiple Macs or PCs you own, but is generally for 1 single person.

You get all updates to 1Password 6 for Mac for free, and any updates to 1Password 4 for Windows for free. On the Mac side, we are planning a 6.5 release in the next couple months. Most of the changes in this release will center around 1Password Teams/Families/Individuals (the subscription option). Along with bug fixes that likely impact both. We are likely nearing the end of the road on version 6 after that.

With the $5/mo you can technically do two things...

1. You can use the hosted solution 2. You can create local vaults (like the standalone version does) and sync those using Dropbox, iCloud or Wifi (to mobile devices)

So, with the subscription option, you get both. Whether you use the hosted part of it or not is up to you. However, if the subscription goes into frozen state (unpaid) the app will go into Trial mode, which limits you unless you re-subscribe or purchase a standalone license.

I currently use both local vaults and the vaults for my work Team and Family account. Mostly the local vaults are for testing purposes but it all works fine with a subscription.

Let me know if that helps :)

Kyle

AgileBits


Thanks for the informative response! I may try out the subscription.


I put my elderly parents onto 1Password and they "got" it.

The hardest part of the migration for my parents were 1) demystifying the spaghetti mishmash my Dad had in place to manage his passwords, 2) getting Dropbox set up correctly between Mom & Dad for vault sharing, 3) training my Mom how to use, and 4) educating Data on how to manage website edge cases.

I would hope that 1PW has a LP migration tool, but if they don't, Dad was able to clean up his historical garbage one by one. The password capturing process in 1PW is good enough that this worked nearly seemlessly.

Finally, I've had nothing but positive results from posting questions in the 1PW forum.


Long time 1Password user here. I use it on bunch of Machines and I wish you guys supported Linux. :(

Heck 1Password mostly works under Wine, except perhaps there is no unlock on Secure desktop and bunch of other usability things.


Disclaimer: I work for AgileBits, makers of 1Password

Yea, we hear you there. I (and others on the team) wish we could make this happen, but priorities are a tough one. Linux in general didn't fit all that great in our standalone license model before, along with being closed source. Now with the subscription option for individuals (new today), families and teams we have made the payment side a little less of a concern but we still have the closed source nature of things making Linux a harder target to hit.

We're probably in a better position now than before though. Every time I asked a Linux user who wasn't asking for this they said they had no interest in paying for closed source software. I wanted all the positive response I could get to show to the decision makers but I fell short in getting it.

This is all to say it's simply a complicated situation. It has to either make money to pay for its development, or the others have to offset it enough that it's a win for us so we can keep the lights on.

Hope that helps a little anyway. I know it's not the answer you wanted but I hate leaving people like yourself wondering why it feels like we aren't listening.

Kyle

AgileBits


Is there a feature comparrison or reasoning you may have about why 1password may be better than Keepass? I have been using Keepass as I use Linux, Windows, and Phone for accessing my passwords. I am wondering if 1password has some neat helpful features that Keepass doesn't. I am considering switching to a new password manager.


We don't generally do feature comparisons. So many products operate under different sets of requirements that comparison charts can be very easily rigged to make one thing look significantly better than the other.

I can tell you one thing that is indisputably better about 1Password though.

Support.

Quite literally. We have a team of over 30 customer support personnel (in addition to myself and other developers who pitch in for a part of our day). We're here to help if you run into problems, encounter a bug, have feature requests, or generally just want questions answered about how we do things or why something is done the way it's done.

Keepass, as noble as it is to have an open source and free product, is run and improved by volunteers. I realize that not many people on hacker news really care that much about support since we're all typically very capable people, but as someone who has been with AgileBits for nearly 5 years now and seen a whole lot of the weird edge cases that can exist because some webpage is doing something incredibly weird or some particular computer setup is causing problems. It can be really helpful to know that there are people who can look into these things for you instead of having to know it yourself.

1Password does have a 30 day trial (both for our standalone product and for our individual/family/team subscriptions). You can try it yourself and see how it works for you. And as always, if you have questions during this time you're welcome to get in touch (support at agilebits.com, mention my name if you want and it'll notify me) and we'll help you get things setup. We think the product speaks for itself and we're happy to fill in any gaps if you need more :)

Kyle

AgileBits


Out of the year I have been using Keepass I have never had a time where something was wrong that I would need support for.

I am actually not sure what I would need support for either, it seems pretty basic. I am simply storing passwords. It doesn't seem too complicated. And maybe this is because I am a tech person, so maybe I am looking for the more technical reasons why the software may be better rather than how the support excels. Because if keepass had a problem I know ways to get support anyway, either via a Stackexchange site or IRC. So I am definitely a bias group.

However I do not care if the software is open source or not. I know some people do care about that, but the people I talk to do not. People in my age group seem less concerned about open source or closed source.

I'm more curious if there are some kind of features in the product itself that make it better than keepass? I do not have a family so the family cloud version of 1password is not useful, though I would not be opposed to a cloud version of 1password for an individual. I currently store my keepass in dropbox and have that synced to all the devices I use.


An example I like to give for why 1Password Families has helped me is this:

I work remotely for my job. I do travel several times a year as a result and when I'm gone I have other family members watch my house. Before 1Password Families I had to find a way to easily get my wifi password, my garage door code, and various other instructions and information to whoever was watching my house.

With 1Password Families I simply create a vault in my Family, add my items to it and invite the person who will be watching my house as a guest (or in my most recent case, granted my brother access to the vault).

In the first case, the person simply signed up, installed 1Password and they had access to the data. In the second case, my brother simply unlocked 1Password and the vault was there.

When I get back home, I simply remove access and those things disappear from their devices. None of these are so important that I have to change them, but, that's another step as well if necessary.

But that is how easy it is to share and use vaults in 1Password Families (and Teams).

I also love that using this I can add family members, like my parents, and it handles all the syncing for them so I don't have to micro manage it with backups and other stuff. It's a far more seamless experience. And since I hold the keys to the family kingdom, I can also reset their master password for them if they forget it.

Now, you might think you have no use for this, and that's fine, but it's an example of how someone who doesn't have an immediate family (I'm single, and childless) was able to use 1Password Families in a way that wasn't obvious when I first set out to use it for myself.

In terms of features that differentiate us from Keepass, I have never used Keepass so I am not able to speak to what we do differently. I'm sure there are things each of us do better though.

There is a trial version of 1Password, so, you could use it and see how it stacks up for yourself. I'd be very curious what you find better or worse so I can pass that feedback along to our team. Completely optional of course.

Kyle

AgileBits


Sure, I'll give some of my thoughts about it when I first fired up the trial.

The installer gave me an option to create desktop icon, but gave me no option to start the program when it was finished installing. It was odd having to go find and run the program once it was done installing, it is typical for most installers to give me an option to run after install. Not a big deal, but I thought it was worth a mention.

When I opened up 1Password I clicked "I am new to 1Password", and noticed that the prompt to select a location to store my keychain is under the program itself. This is annoying as I have to move it around to properly use the file explorer. Seems like a bug. Here is an image of what I am talking about: http://i.imgur.com/0Z6xTTq.png . Clicking on the file dialogue does not bring it above the 1Password application, it is stuck hiding behind it.

Entering the master password makes me enter my password twice, which makes sense, however it is odd that there is one password strength bar for both the "new" password and "re-enter" password section. The passwords should be identical, why tell me the same thing twice? http://i.imgur.com/ySXxT8g.png

I am quite confused with how I can import Keepass data into 1Password. Some googling shows I may need to use some perl scripts someone made to import them properly. I tried exporting my keepass database to csv and importing that but there were many problems. I used a lot of specific Keepass things like folders, as well as having a duplicate record that makes reference to another password entry.

Scrolling through the list of passwords is quite choppy and not smooth at all.

The search is slower than Keepass.

For the use cases you gave of sharing passwords I'd just print them out on a sheet of paper to be honest. It actually seems easier to me than sharing passwords via a program.

And on the top of micro managing and backups. I just use dropbox which by default keeps version history so managing backups is not really a thing for me.

So in my honest opinion for now I will likely be sticking with Keepass, for the reasons above, as well as because it does not support all of the platforms I use, which in my opinion is quite a critical feature as I want my passwords on every device.


Thanks for the feedback. I'm afraid most of my experience is with the Mac and iOS applications, since I work directly on those. However, the Windows application you are using has more or less been sunset and we're working on a new Windows app that you can read more about here:

https://discussions.agilebits.com/discussion/64591/help-us-w...

We are targeting a release soon. This version is a complete rewrite so it'll be missing some of the things that our Mac, iOS and Android applications have, but over time we'll be continuing to improve it. Having a base we can build on was the critical goal for this upcoming release though.

So, not to brush off your concerns for the version you tried (it is the one that we are making available to users still) there will likely be an entirely different set of concerns with the new one, but mostly because it lacks other features that you may expect to be present. But I do believe it solves most of the concerns you did raise :)

Thanks a ton for taking the time to give it a shot and let me know how it was for you. I am sorry it was, what appears to be anyway, an unpleasant experience. Our Windows app has traditionally been one that has lagged behind our Mac version but we are attempting to right that now.

If we can ever answer any questions for you, or help at all in the future, please let us know!

Thanks again!

Kyle

AgileBits


Coincidentally, a bunch of Dropboxers are working on a version of 1Password for Linux written in Rust (it's Dropbox's "Hack Week" right now). Hopefully we can open source it soon. Looking good so far!


Hi there!

If you have any questions that we might be able to answer, please shoot me an email. kyle at agilebits.com, or support at agilebits.com. I work on our Mac/iOS teams and security teams. I can probably answer most of your questions and at least get them in front of people who can answer them.

I really hope you're not making this work with AgileKeychain, we've put that one out to pasture. :)

Kyle

AgileBits


Purely OPVault!

We've got pretty good OPVault support going, but your guys' RPC protocol is not open, right? Between mini and the browser plugins?


Great to hear you're at least using OPVault :)

And also correct on the mini to extension protocol, there is no public documentation for that, primarily due to that being something we really need to be able to change as necessary.

We are really curious to see what you've come up with though :) So please keep me in the loop if possible!

Kyle

AgileBits


I have been using 1Password since version 3 and highly recommend it. I personally am quite happy with the iOS support, synchronization, and mobile Safari extension.


Dashlane is really good. Running 100% in AWS and leveraging a lot of their security features.

Here is their security white paper : https://www.dashlane.com/download/Dashlane-Security-Whitepap...


I just read the whitepaper (I am a long time Dashlane user) and they have a section on security of their javascript/browser extensions. They say that their extensions all use c++ so execute entirely outside of the javascript context. This would not have prevented the Lastpass exploit since all that was required as a malformed URL, but it is nice to see that Dashlane is thinking about this stuff. Also, had Lastpass not used js this exploit would've been harder to find (though not impossible).


Hello Julsimon, this is Simon from Dashlane's Support team. Thank you for your feedback. We have indeed ran multiple checks on our end and can confirm that we are not vulnerable to this type of issue. The code used for our auto-fill functions is shared on all our platforms and has been audited multiple times.


I've been using Pass for several months and I love it. https://www.passwordstore.org/


Within Pass is there a best practice for sharing passwords with another person or team?


I don't know about best practise but it integrates closely with Git. I store the encrypted passwords in a remote git repository. That means if someone else had the same GPG key and the password for that key, they could simply clone the repo and obtain the passwords. Equally they could add passwords and push them to the repo.

So that seems like a reasonable way for people to share them. However, I only use it for myself so I may not have thought of all the gotchas.


Check out Enpass password manager. https://www.enpass.io/

I found this alternative when LastPass was acquired by log me once. I was not happy with this. This app doesn't have hacking or vulnerability history like LastPass.

They also have a dedicated import for LastPass. https://www.enpass.io/docs/desktop-mac/import_lastpass.html


1Password is very nicely integrated if you're on a Mac and/or iOS. It's not free like LastPass, but I consider it a reasonable one-time* purchase.

*every few major releases


KeePass, but I'm not 100% on that one either.


Why not? I've been using it for about a year now (switched from LastPass) and haven't had any issues. Kind of miss the in-browser features of LastPass, but seeing as how those are what's being exploited, maybe not so much!


There are browser extensions that work with KeePass. This LastPass vulnerability makes me wonder, too. I wish the KeePass site would be 100% HTTPS, though, but the maintainer is a jerk in that regard.


Be careful about browser integration https://github.com/pfn/keepasshttp/issues/258


I use KeePass as well, but I have never tried it with a browser extension. That seems a little dangerous to me.


Any good alternatives for LastPass Enterprise-style multi-user sharing?

(Apart from "don't use services that require you to share passwords for a single account". Alas.)


My team and I have been using 1Password Teams (https://1password.com/teams/) for this. They also have a Families service if for some reason you want to do the same thing with family and friends.


Does it need to have Windows client? I'm guessing yes. If not there is [SFLVault](http://sflvault.org/)


I switched myself and my family to use 1Password Family. Been very happy with it. Syncs across all user and devices (except IE lol)


enpass.io, it supports pretty much every platform


Work on your memory, it's very hard to hack.


That's a very bad recommendation. Very few people are capable of remembering unique 10-character passwords for each site. I have like 100 passwords and accounts for various systems and I'm certainly not able to remember each of them. So either I start reusing passwords or I use a password manager.


You can vary the password based on the domain name with a predictable algorithm that only you know.


And hope you never have to change a password.


For work and home I have nearly 500. The GP recommendation is absolutely terrible advice.


No one is under any obligation to provide bug bounties.


And no one is obligated not to take that into consideration when deciding whether to use the product.


No, exactly -- at their peril.


I was surprised by them giving such a tiny amount too. The potential damage to their users here is staggering. If this was used to grab someone's twitter,facebook,email,linkedin an attacker could take full control of their online presence :S


Let's do a little calculation to see if the payout is worthwhile.

Using something illegally means you run the risk of going to prison. Let's say there's a 1% chance you get caught, the prison sentence is 10 years, and the evil hackers will pay you $20,000 for your bug. Let's also say that you're a mid-career software engineer in the US, and over the next 10 years you expect to make $2M (after taxes).

This means your expected outcome over 10 years is $20,000 + (0.99 * $2M) = $1.98M. With Lastpass's bounty you end up with $2.001M.

With these assumptions, you should be paying Lastpass to find bugs in their software! Of course, if you're not in the US, you probably make a more reasonable salary (read: less), taxes are higher, and the risk of getting caught is lower.


> over the next 10 years you expect to make $2M (after taxes)

That would be $300K per year pre-tax (assuming current 2016 tax rate of 33% for the 200-400K bracket). Is that really a normal mid-career salary?

I need to change jobs if that's the case...


At elite big-name tech companies in the Bay Area, if you're selling your stock as it vests, that might be a little high but in the ballpark.


Now let's bring that salary estimate back down from outer space. $200,000 per year TAKE HOME, is not realistic, except for the very top percent of developers. And I'm talking the very top.


There is also the reputation boost that the researcher receives for discovering this exploit and disclosing it in a responsible manner. The value of that is incalculable.


In most places doing gray/black-hat things rarely results in going to prison, especially for someone who hasn't been convicted before.

https://en.wikipedia.org/wiki/List_of_computer_criminals paints a picture that prison time is mostly a US-only thing.


You are approaching from the wrong angle. How much was the exploit "worth" to the company?

Some people want to watch the burn. An attacker could make it known anonymously and LastPass will never recover from that onslaught.


Is it still illegal when Lastpass actually stimulates you financially to pry into their systems?


They authorize you to pry into their systems if, and only if, you report security bugs back to them. If you don't, they don't authorize you to pry into their systems, and it's illegal.


>If so, I am a little taken back by LastPass only offering $1,000 to the researcher that found and reported it for fixing.

I am a lot taken back by it. This wasn't a minor bug. I don't care if $1,000 was the published maximum payout under their bug bounty program - for something like this, the payout needs to be representative of the damage that would have been done to their reputation had this bug been discovered and exploited by bad actors. Given that reputation is everything in this space, any well-publicized incident using this would have effectively rendered the company dead within days.

Here's hoping they reconsider the award amount (though I'm certain they won't).


Yes, my thoughts exactly. He could had made 100x that money on the black market, so no wonder we still have problems with 0days traded there.

How long would you work for $1,000? Some days, a week, two? If you spend more than a week on this problem it seems not worth to report it... On the other hand, if you set the incentive for bug bounty too high I imagine all sorts of cranks pop up, that want to show off bugs that are not there, and resources will be bound to this task -- they have to be verified, and analyzed even if its a bogus report (and in the worst case it will not accomplish anything).

Where is the middle ground?


"You agree not to disclose the full amount awarded you as part of this bug bounty award contract."


If the full amount is <=1000 it's irrelevant what you're actually awarded for a bug as serious as this.


Oh, no - I mean, if you want to reward people fairly, but not get a stampede to your door, tell them to report a smaller bounty than was received. They can spread private word to their network (presumably, other people who are going to actually be correct) but still provide hooks to the public.

Probably doesn't work out, but it's what came to mind as a way to deal with the balancing act.


> How long would you work for $1,000? Some days, a week, two?

You might not work for long on a $1,000 problem, but other people sure will. College or high school students, people in a country with low salaries such as Ukraine...


He could have basically killed LastPass, the company, if he didn't go white-hat. And caused all sorts of other mayhem that would also have been far more profitable for him.

It does seem like an extremely low bounty for a security bug that severe.

I mean, in a 100% libertarian world, this hole would have been put up for auction to the highest bidder and LastPass would have had to ensure they were the highest bidder in order to close up the hole and basically save their business.


Seems like LastPass' bounty program is a joke. Their max reward is $1,000.

https://bugcrowd.com/lastpass


Hi, newbie sec researcher here. Just wanna ask, how do we actually ask for a bounty considering that sometimes the severity of the breach is BIG (this, Shell Access, etc).

I really don't wanna ask the companies for money but it just seem so... underwhelming for me. (3 out of 3 rather big companies just gave some thanks)


No matter what it is, you don't just give someone something they didn't ask for, and then expect money in return.

It would be like someone walking up to you on the street, handing you something they think is valuable, and then hoping that you'll want it and pay them for it.

The first thing you should do is check and see if they have an official bug bounty, if they don't then contact them and ask them if they had one.. say something like "because you saw some things on their site that concerned you, but wanted to know if it was worth the time exploring further" .. this is assuming you already found something. The goal of this is to get them to try and offer a bounty.

If they don't offer a bounty, then if you want to be responsible, you can just disclose their vulnerabilities to them, and accept whatever thanks you get.

If you're explicitly doing what you're doing to try and get some money out of it, then your time would be better spent focusing on companies that have well published bug bounties.


Something to consider is a mis-alignment of incentives.

When LastPass gets breached, they're not directly responsible for what an attacker does with the passwords.

When another site/service gets breached, they have to spend a lot of time making it right to the customer again (e.g. rolling back transactions, compensating for lost or stolen funds, etc.)


I don't think of the bounty as a reward for choosing not to break the law. Staying out of jail is the reward for not breaking the law; the $1000 is just a token of appreciation for someone that could have otherwise not bothered to report the bug.


>Staying out of jail is the reward for not breaking the law

I think it works the other way around.


I've been using LastPass for about 3 years, and now I'm seriously thinking about all the times people told me about how storing passwords in someone else's cloud is bad.

I've been defending LastPass and recommending it to everyone till today. Now I'm thinking about how I might have to 'pay' for a software vulnerability in some private (read:unauditable by me) code. All the comments about offline, local backups make sense to me.

But the points I usually make are still valid, like:

1. I can go to any computer with chrome and get access to all my passwords, so don't have to carry my passwords with me everywhere.

2. Don't have to worry about storing passwords properly since lastpass is a good company and they know their stuff about protecting the customers' data.

3. Password capture. It might seem like a tiny feature, but I'm too lazy to remember opening an app and entering my credentials whenever I create an account or login into an old account.

4. Mobile login, although a paid feature, this really changes my life. If I don't trust a computer enough to login via chrome or something else, or want my secret notes, I just open up my phone.

But all the above features meaning nothing when it comes to the chance of compromising all my passwords (except bank info, of course)

I'd like to hear the thoughts of anyone else who uses lastpass and what they think.


I think you could do a lot worse than lastpass. You could also do better, by sacrificing some usability. On the extreme side, you could use a separate, offline device, just for password storage.

But I don't think it's worth getting excited about a single lastpass bug. Everything is vulnerable. There will be more of them. Chrome itself had 105 security issues, just this year (https://www.cvedetails.com/product/15031/Google-Chrome.html?...) - a few of them potentially leading to your passwords being exposed without any extensions.

Upgrade often, don't do stupid stuff, keep backups, and you'll be more secure than 99% of people. Evaluate your choices from there.


>Everything is vulnerable.

Well, that put it in perspective for me. I just googled the vulnerabilities in offline password managers like Keepass/X and 1Password. And oh man, I was pretty shocked to see even the offline ones could be broken into.

I think I just had a crisis of faith.

>you'll be more secure than 99% of people

Thanks. I guess since I don't store very sensitive info (financial, etc.), and the important services - Google, Github, Atlassian, AWS use 2FA. I guess I don't have to be paranoid.


You need to consider the exploit paths though. Remote or local. With or without user interaction.


I do not use LastPass exactly because of what you describe. I use a KeePass Password safe without autofill. I use other software to sync the file. It used to be Dropbox, later I was using BitTorrent Sync, but what tool sync shouldn't really matter. As I see it: the tool only gets to see and sync an encrypted file. You could even use a USB stick and not sync at all. Or only sync on LANs.

I love it how I get to decide who or what gets to see the encrypted file.

Now hopefully the Keepass audit will not reveal any issues in the encryption.


Similar here, also using KeePass. Fairly happy to sacrifice some of the usability for more control and less "cloud".


Lastpass also only syncs data after it's encrypted locally, so the threat model is the same.


Not entirely, since you download the encryption code way more often (for example, when you open the "Lastpass Vault", which is just a website like any other). Parts of Lastpass are simply a website, not part of the browser extension, and as an avid Lastpass user in all honesty I don't know which parts.

This matters because even if it's client-side encryption, the encryption code just got downloaded when you opened the site so if the server or the network was compromised, you got compromised. [0]

With Keepass, the only time you run that risk is when you download Keepass.

[0] As far as I can tell, this is the core argument of tptacek's "javascript crypto considered harmful" rant (https://www.nccgroup.trust/us/about-us/newsroom-and-events/b...). I'm not sure, because it's written worse than his most drunken HN comment, but I believe it is.


I'm pretty sure when using the Chrome extension, all the HTML/JS is downloaded locally once when installing the extension, as logging in via the extension brings you to a chrome-extension:// URL. When logging in via lastpass.com, of course, you will be redownloading the crypto code every time.


Ah, yes, I was assuming the website would be avoided. I didn't realize it was hard to distinguish (I don't personally use LastPass, I prefer Firefox Sync).


You're right about that. The threat model is equal when using Dropbox. It's still different when you use a local LAN share or a USB stick though.


I was hoping for someone to audit, keepass. Lets see what happens.


I'd say some of the points could be easily covered by something like KeePass which, unlike cloud, doesn't have to depend on questionable security of third-party services.

For example. I use KeePass to store all my password. I keep my KeePass database in Google Drive, so any change to the file will be updated. because of that I can use KeePass on any machine that has access to Google Drive (I also keep executables for various systems in drive). Furthermore, there are number of free mobile applications for KeePass which can hook into GDrive and you can use KeePass on the phone too. And lastly - browser extensions which let you use your KeePass to automatically fill & save passwords (I don't use it, though).

Sure, KeePass requires a bit more of an effort compared to all-in-one solutions such as LastPass. That is the price you pay for not thinking about possible security breaches in the cloud.


It's not really very much more effort. I use KeeFox (Firefox) and Keepass2Android (you can guess). I love both tools, they've made password management trivial, and I used to be a die-hard "one password for everything is just so much more convenient" fan.


> I use KeeFox (Firefox)

Integrating with the browser is probably a bad idea, it shortens the exploit path from a webpage to your password store.

Using a standalone application and using the clipboard would require a malicious website to break out of the browser and then break into the password store process, which could in principle run under a different user and interact with the clipboard through some broker process.


Given how broken clipboards are, using a clipboard isn't much more secure. Though, an extension can probably request credentials so it is a trade-off.


How do you sync the two?


I keep the file in Dropbox, Keepass2Android automatically syncs it every time I open the database and merges any conflicts. It's pretty nifty, I've never had a problem.


What you do does seem pretty good.


> 1. I can go to any computer with chrome and get access to all my passwords, so don't have to carry my passwords with me everywhere.

Maybe a computer you can trust but I wouldn't say any computer. I consider the shared PC you'd find in a hotel business center to be the digital equivalent of a diseased hooker. I'd be impressed if it didn't have a key logger installed.

> 2. Don't have to worry about storing passwords properly since lastpass is a good company and they know their stuff about protecting the customers' data.

Not being OSS I don't think that can be proven. It boils down to "Trust us, we're smart".

> I'd like to hear the thoughts of anyone else who uses lastpass and what they think.

Trust noone and put your faith in OSS (KeepassX, pass, etc).


> Maybe a computer you can trust but I wouldn't say any computer. I consider the shared PC you'd find in a hotel business center to be the digital equivalent of a diseased hooker. I'd be impressed if it didn't have a key logger installed.

I think you'll be impressed in a lot of cases than. I would be surprised if more than 15% of shared PCs have keyloggers active on them.

Still doesn't mean i'm going to login to anything on them though.


LastPass does at least provide a convenient on-screen keyboard to foil key loggers.


... to foil cheap keyloggers.


I use Lastpass for work and can't stand it. I use 1Password for personal stuff (and some private work stuff now that I think of it) and highly recommend it. It's got a Chrome browser extension, mobile app, and like someone else mentioned below you can sync the encrypted db to a cloud service (iCloud, Dropbox, etc) so you can access it from all of your devices.


>I use Lastpass for work and can't stand it

I don't mean to be the advice bird, but maybe you can point all the points you made to your superiors and make them re-evaluate their choice. If they're a huge enterprise, then I understand


I work for a company with 3 owners and approximately 40 people. It would be okay but we need the shared 'team' aspects of a password manager -- I could be mistaken but I don't think 1password can handle a team sharing logins. I'm sure there are other options out there.


It even runs on Linux with Wine with browser integration.


That's awesome! Did not know that.


> I've been using LastPass for about 3 years, and now I'm seriously thinking about all the times people told me about how storing passwords in someone else's cloud is bad.

This bug doesn't seem to have anything to do with the cloud.

FTA:

> The bug that allowed me to extract passwords was found in the autofill functionality.


I meant the software as a whole and the fact that there can be vulnerabilities in the browser extension right now.


I have never understood the password manager market honestly. To me it's very obvious that the CONCEPT of a "single point of failure" is a terrible idea. Putting faith in one or the other is just like humans backing politicians, they think they are backing something when really they just got manipulated into an opinion which they slowly defend more and more.

Don't use a password manager, remember your passwords, or reset them all the time. It's a conceptual vulnerability, and if you read hacker news you are better than this.


Are you saying that you remember a unique and sufficiently random password for every website/app/etc you use? If so, you've got a far better memory that me.


Not the GP, but yes, and it doesn't require a good memory. The main things I do:

1. "Salt" my email usernames with the name of the service (johndoe+reddit@example.com)

2. Use multiple (long) password bases depending on the type of service (eg website vs app)

3. Combine the password bases with a cipher/salt based on the service name and my username

I'm guilty of not rotating passwords on a regular basis, however.


So do you use encryption on that combined version? If yes, how do you deal with different requirements (one website says symbols required and more than 8 characters, another says symbols forbidden and less than 8 characters). If no, what stops someone who finds one password from changing the service name part and trying it somewhere else?


No encryption or hashing, since that would require (easy-access to) an external tool and lacks control over length and characters. It's not possible to simply change the "name part" of one of my passwords since the general format looks something like: {password_base}{service_cipher}{username_cipher}{special_chars}.

Depending on the type of service, `password_base` changes. For example, HN uses a separate one from Gmail for Business. Likewise, `service_cipher` and `username_cipher` are simply that: truncated ciphers of the service name and username. Lastly, `special_chars` is used for pesky sites that want special characters outside the range provided by my password base.

I'd like to think my system is very difficult for someone to crack without gaining access to a large number of passwords. The only limitation is that a few sites have limits on password length(!) which requires using a shorter base or even truncating the password entirely.



The post does point out that this would not work if multifactor authentication is on. I would never dream of using my LastPass account without that anyway.

Like with all decisions this is balancing risk/reward. The reward are all the points you have already expressed that I also love about LastPass. Currently I believe the risk is fairly minimal assuming you use 2 factor-authentication. Though I might turn off autofill now as an extra precaution.


MFA for the end site, not for lastpass. This bug would still have been exploitable with lastpass MFA.


> I'm seriously thinking about all the times people told me about how storing passwords in someone else's cloud is bad.

This was a client-side bug and so surely doesn't depend on the fact that your passwords are 'stored in someone else's cloud'?

i.e. If there was only local storage of passwords this vulnerability would still be there.

(Also worth noting that lastpass encrypts your remote and local store with a key which is presumably only stored hashed and salted on their side)


repeating my other comment: 'I meant the software as a whole and the fact that there can be vulnerabilities in the browser extension right now.'


Consider https://salty.pw/

The idea is good, just not sure about SHA-256...


How do you deal with sites that don't accept the passwords generated by salty?


Good point. Perhaps a modification can be made that is restricted to generally safe characters, then you can add your own stuff as the website demands. Which then leaves you to remember which stuff you need to add, on every site - so not that great.

Or there could be several modes and a database of websites that automatically picks a mode based on the website. Which leaves you remembering modes in the worst case scenario, or trying a few of them out.

I think an acceptable solution can be made by analysing the password requirements of the top N websites, then coming up with a good scheme that works on most, and an alternate scheme that works on the rest. One mistake is usually allowed everywhere.


Applications are open for YC Summer 2023

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: