“Sites like these give PHP a bad reputation”
medium.com
medium.com
<shameless plug>Padlock[2] is a penetration-tested, open source alternative that also has a (open source!) cloud storage solution[3] that you can even deploy to your own server if you don't trust the official one. All of this based on zero-knowledge (the server has no way of acquiring your master password or reading any of your clear-text data). Disclaimer: I'm the main contributor.</shameless plug>
[1]: http://www.martinvigo.com/even-the-lastpass-will-be-stolen-d... [2]: https://padlock.io [3]: https://github.com/maklesoft/padlock-cloud
serving .php files directly is not security issue, but as you said nobody knows what's going on under the hood.
Also lastpass has a history of security issues: https://en.wikipedia.org/wiki/LastPass#Security_issues
If you want to use a password manager, you should use something like pass[1].
- What LastPass gets is ciphertext, not your unencrypted
passwords. Important detail.
- There are opportunities for LastPass to receive your
master password (i.e. if you enter it on their website).
I haven't audited LastPass. After Tavis Ormandy looked at it earlier this year and published his findings, I wouldn't be surprised if the crypto was totally and hopelessly broken.But to eschew the fact that their app does encrypt passwords before sending them to their servers isn't fair.
You have to put a lot of faith in them and the question why would you always remains.
The thing here is motive and incentive, LastPass has not motive or incentive to handle your passwords in an unencrypted form, it has no motive or incentive to want to know your master password ever since both of those things are just a huge liability for them.
Every password manager, every browser, every OS, every hardware can be backdoored and compromised by their maintainer/manufacturer in a way nearly impossible to detect even in some cases if the source code is fully or partially available, heck how many people ever verify that the package they just grabbed via the package manager was built using an unaltered version of the source code?
To function you need to have some level of trust, you can try to add additional security measures e.g. like not storing highly sensitive passwords in a password manager but even then really depending on how you maintain those passwords you are likely to increase your risk rather than reduce it.
The only other option is to use something like this to-do it yourself.
github.com/ezWebDevTools/ezCryptoJS
Native apps, on the other hand, tend to have signed updates and such. I'd pick a native password manager over a web-based one any day, but the theoretical risk is still there.
Credentials being "remotely stored" would be the case regardless of if you run any other viable storage such as Dropbox. I suppose you can remotely store on your own server, but I'm about a million times more likely to screw up than even a bad cloud company or password manager - so that's a non starter.
I'm sure there are alternatives to LastPass/1pass and similar, but storing encrypted passwords in a local file solves only a small part of the problem.
What people need is centralized & turnkey password management. This has drawbacks , but remember: it competes on security with the only other alternative: using the same password for all sites - That's the most common password management system out there!
To Set this up i need for every new device around... 10 minutes
It isn't THAT hard. Im pretty sure there is a dropbox(or $urCloudProvider) App that Can sync your files too :-)
It's not as straightforward as you assume,now apply it to non-devs.
https://fossdroid.com/a/openkeychain.html https://fossdroid.com/a/password-store.html
When it comes to ease of setup and general UX polish every open solution leaves a lot to be desired. In the choice between insecure and cumbersome, insecure wins every time. Case in point: gmail is what people want in terms of usability. A more secure solution (such as any pgp solution on standalone mail client) is not really an option.
On the other: It says volumes about LastPass's code quality.
This is an unknown, and we can argue until we're both blue in the face about whether or not information about app A tells you information about app B, if produced by the same company, but you don't know if the same people within said company produced both apps.
But I say that point doesn't really matter: Their quality controls are either lopsided or inadequate. Neither is a good outcome for a security company.
The site probably isn't the application per se, nor where the data is stored.
How got this submission to 30 points? Voting ring?
See https://news.ycombinator.com/item?id=12884523 for how the detail covered in the article could adversely affect the quality of their software and the security of their service.
I wish they had done more research in this realm, seems like they pressed "publish" far too early.
In the end the server side of things is really not critical since it only stores an encrypted version of the blob. Sure, it looks a bit sloppy, but if it works...
The real weakness of lastpass is and always will be the clients, in particular those browser extensions that can update in the background and are difficult to audit. But these browser extensions are also the reason I'm not using something like "pass" or even a custom GnuPG-based solution. It just works on any machine regardless of the OS without any hassle.
So far the C code of the CLI client looks decent enough. Not amazing but nothing really stands out, besides maybe the key derivation algorithm they use: they query the server for the number of rounds to use when deriving the keys and if the server replies "1" they fallback on a single round of SHA256 salted with the username. It's probably some kind of compatibility mode but that seems rather weak to me.
If somebody compromised the server they could have it tell the client that the number of rounds for any client is 1 which will cause the clients to send a "simple" SHA256 of username+password which will be a lot easier to bruteforce than the default 5000 rounds of PBKDF2.
And I am a LastPass customer!
(edit: clarification, I meant to portray my disdain for php. I still like (and trust) LastPass!)
https://github.com/paragonie/halite/blob/master/src/Symmetri...
(Disclaimer: My project.)
// Split our keys
list($encKey, $authKey) = self::splitKeys($secretKey, $salt, $config);
Also what's happening here? This could do with a comment for more junior devs. It's impossible to Google "function with a colon on the end of it in php" public static function decrypt( [..] ): HiddenString { [..] }
Edit: Re-phrased my wording to be a bit less boorishThanks for looking through the code. I'll make the comments more meaningful on my next run through.
> Also what's happening here? This could do with a comment for more junior devs. It's impossible to Google "function with a colon on the end of it in php"
That's a PHP 7 feature called return type declarations. If it doesn't return an instance of HiddenString, PHP will throw a TypeError.
The way I worded it is implying I'm digging at you sorry. I mean the literal what does this do, I've not come across formatting things like this before
EDIT: https://github.com/paragonie/halite/compare/v3.1.1...3b95d85...
Judging from the URLs, it seems that each action is handled by a different standalone script. This is very common in legacy code bases, and it typically (not always) means that:
1) all those scripts need the same bootstrapping boilerplate copy-pasted into them, which is a maintenance nightmare. Even if you simplify it to one or two lines of boilerplate that includes a central boostrap file (or use some configuration magic to automatically run an additional script before the script you requested), it's still worse than having a single centralized entry point that handles routing, auth, and so on. There's always a chance that someone forgets or botches an auth check in one of these files and it goes unnoticed.
2) you will probably be able to make an HTTP request directly to some file that was not intended as an entry point (the author mentions header.php – this is a perfect example), and then who knows what happens, because you never planned for this and your bootstrap code doesn't run and possibly variables expected by that script are not defined, or errors thrown by the script are not handled by a pretty error handler... kinda like doing an assembler jmp into the middle of another function, after any sanity checks it might have had.
3) I have been working with PHP for 8 years now, and almost inevitably, where this pattern shows up, there's most likely outdated and insecure practices like SQL queries from string concatenation (leading to SQL injection) or unescaped HTML output (leading to XSS, XSRF, or other security problems). It's basically an "easy target" sign for hackers.
Front Controller pattern [1] is a recommended alternative.
If you combine the article's findings with this observation, one could foresee sending a crafted /footer.php?args=SQL+Injection+goes+here type request that skips past where input is "sanitized" and results in code injection.
(Further details are NDA'd, but I've found similar issues before in production systems.)
I have personally have found bliss in Password Hasher Plus (https://chrome.google.com/webstore/detail/password-hasher-pl...) (Hash it! App on android)
Basically it hashes your password together with the domain name you want to login in together with a very long private key to generate an arbitrarily long password as a final pass. The chrome extension and app provide some nice utilities to make all this pretty easy and transparent to use.
Advantages: * Only one password to remember. * Different final passwords for all services * Hashed with a unique private key * Arbitrarily generate any pasdword length you want * Passwords are not shared with anyone (automatically generated on your device) * Plus many more (that i will do a bad job describing)
Disadvantages: * More of a script approach not a full blown application (matters to some) * Different approach for desktop and mobile (extension vs app)
1) Many password managers are designed specifically to survive the website being owned. I use LastPass and I'm not sharing my passwords with them, I'm sharing my encrypted passwords with them. It's an important consideration!
2) You don't want to trust a third party so you use a Chrome extension that is made by a third party and has permission to access any website? You are trusting a third party.
The point is that I do NOT want to store (even hashed) passwords with a third party in the hopes that they will be able to protect my passwords, when I can generate them on the spot from the device I'm using. But that's just me.
My post was just a comment on how people find third party password managers so secure. I can't be the only paranoid about this...
I do have to point out a couple of things though. Password managers don't store "hashed" passwords with a third party - they store encrypted ones. I also wouldn't personally use the phrase "in the hopes that they will be able to protect my passwords" - I don't rely on LastPass protecting squat. If their entire database leaked, my passwords are still safe. I think that element of the design is very important and wouldn't use a system where hope was required!
You certainly aren't the only paranoid one and lots of people on HN seem pretty wary of password managers :)
Everything will OK. Just don't be evil ;)
Until the day I forgot my 'master password' (I don't know what happened... I just couldn't remember it)
And almost all my passwords were gone. Resetting everything was a real pain
The DB is encrypted locally using your password (wich lastpass does not have because they store only the hash)