A look at password managers
As we noted in an earlier article, passwords are a liability and we'd prefer to get rid of them, but the current reality is that we do use a plethora of passwords in our daily lives. This problem is especially acute for technology professionals, particularly system administrators, who have to manage a lot of different machines. But it also affects regular users who still use a large number of passwords, from their online bank to their favorite social-networking site. Despite the remarkable memory capacity of the human brain, humans are actually terrible at recalling even short sets of arbitrary characters with the precision needed for passwords.
Therefore humans reuse passwords, make them trivial or guessable, write them down on little paper notes and stick them on their screens, or just reset them by email every time. Our memory is undeniably failing us and we need help, which is where password managers come in. Password managers allow users to store an arbitrary number of passwords and just remember a single password to unlock them all.
But there is a large variety of password managers out there, so which one should we be using? At my previous job, an inventory was done of about 40 different free-software password managers in different stages of development and of varying quality. So, obviously, this article will not be exhaustive, but instead focus on a smaller set of some well-known options that may be interesting to readers.
KeePass: the popular alternative
The most commonly used password-manager design pattern is to store passwords in a file that is encrypted and password-protected. The most popular free-software password manager of this kind is probably KeePass.
An important feature of KeePass is the ability to auto-type passwords in forms, most notably in web browsers. This feature makes KeePass really easy to use, especially considering it also supports global key bindings to access passwords. KeePass databases are designed for simultaneous access by multiple users, for example, using a shared network drive.
KeePass has a graphical interface written in C#, so it uses the Mono framework on Linux. A separate project, called KeePassX is a clean-room implementation written in C++ using the Qt framework. Both support the AES and Twofish encryption algorithms, although KeePass recently added support for the ChaCha20 cipher. AES key derivation is used to generate the actual encryption key for the database, but the latest release of KeePass also added using Argon2, which was the winner of the July 2015 password-hashing competition. Both programs are more or less equivalent, although the original KeePass seem to have more features in general.
The KeePassX project has recently been forked into another project now called KeePassXC that implements a set of new features that are present in KeePass but missing from KeePassX like:
- auto-type on Linux, Mac OS, and Windows
- database merging — which allows multi-user support
- using the web site's favicon in the interface
So far, the maintainers of KeePassXC seem to be open to
re-merging the project
"if the original maintainer of KeePassX in the future will be more
active and will accept our merge and changes
". I can confirm that,
at the time of writing, the original
KeePassX project now has 79
pending pull requests and only one pull request was merged since the
last release, which was 2.0.3 in September 2016.
While KeePass and derivatives allow multiple users to access the same database through the merging process, they do not support multi-party access to a single database. This may be a limiting factor for larger organizations, where you may need, for example, a different password set for different technical support team levels. The solution in this case is to use separate databases for each team, with each team using a different shared secret.
Pass: the standard password manager?
I am currently using password-store,
or pass, as a password manager. It aims to be "the standard Unix
password manager
". Pass is a GnuPG-based password
manager that
features a surprising number of features given its small size:
- copy-paste support
- Git integration
- multi-user/group support
- pluggable extensions (in the upcoming 1.7 release)
The command-line interface is simple to use and intuitive. The following, will, for example, create a pass repository, a 20 character password for your LWN account and copy it to the clipboard:
$ pass init $ pass generate -c lwn 20
The main issue with pass is that it doesn't encrypt the name of
those entries: if someone were to compromise my machine, they could
easily see which sites I have access to simply by listing the passwords
stored in ~/.password-store
. This is a deliberate design
decision by the
upstream project, as
stated
by a mailing list participant, Allan Odgaard:
Odgaard goes on to point out that there are alternatives that do encrypt the entire database (including the site names) if users really need that feature.
Furthermore, there is a
tomb plugin for
pass that encrypts the
password store in a LUKS
container (called a "tomb"), although it requires
explicitly opening and closing the container, which makes it only
marginally better than using full disk encryption system-wide. One
could also argue that password file names do not hold secret
information, only the site name and username, perhaps, and that doesn't
require secrecy. I do believe those should be kept secret, however, as
they could be used to discover (or prove) which sites you have access
to and then used to perform other attacks. One could draw a
parallel with the SSH known_hosts
file, which used to be plain text
but is now hashed so that hosts are more difficult to discover.
Also, sharing a database for multi-user support will require some sort
of file-sharing mechanism. Given the integrated Git support, this will
likely involve setting up a private Git repository for your team,
something which may not be accessible to the average Linux
user. Nothing keeps you, however, from sharing the ~/.password-store
directory through another file sharing mechanism like (say)
Syncthing or Dropbox.
You can use multiple distinct databases easily using the
PASSWORD_STORE_DIR
environment variable. For example, you could have
a shell alias to use a different repository for your work passwords
with:
alias work-pass="PASSWORD_STORE_DIR=~/work-passwords pass"
Group support comes from a clever use of the GnuPG multiple-recipient encryption support. You simply have to specify multiple OpenPGP identities when initializing the repository, which also works in subdirectories:
$ pass init -p Ateam me@example.com joelle@example.com mkdir: created directory '/home/me/.password-store/Ateam' Password store initialized for me@example.com, joelle@example.com [master 0e3dbe7] Set GPG id to me@example.com, joelle@example.com. 1 file changed, 2 insertions(+) create mode 100644 Ateam/.gpg-id
The above will configure pass to encrypt the passwords in the
Ateam
directory for me@example.com and joelle@example.com. Pass
depends on GnuPG to do the right thing when encrypting files and how
those identities are treated is entirely delegated to GnuPG's default
configuration. This could lead to problems
if arbitrary keys can be
injected into your key ring, which could confuse GnuPG. I would therefore
recommend using full key fingerprints instead of user identifiers.
Regarding the actual encryption algorithms used, in my tests, GnuPG 1.4.18 and 2.1.18 seemed to default to 256-bit AES for encryption, but that has not always been the case. The chosen encryption algorithm actually depends on the recipient's key preferences, which may vary wildly: older keys and versions may use anything from 128-bit AES to CAST5 or Triple DES. To figure out which algorithm GnuPG chose, you may want to try this pipeline:
$ echo test | gpg -e -r you@example.com | gpg -d -v [...] gpg: encrypted with 2048-bit RSA key, ID XXXXXXX, created XXXXX "You Person You <you@example.com>" gpg: AES256 encrypted data gpg: original file name='' test
As you can see, pass is primarily a command-line application, which may make it less accessible to regular users. The community has produced different graphical interfaces that are either using pass directly or operate on the storage with their own GnuPG integration. I personally use pass in combination with Rofi to get quick access to my passwords, but less savvy users may want to try the QtPass interface, which should be more user-friendly. QtPass doesn't actually depend on pass and can use GnuPG directly to interact with the pass database; it is available for Linux, BSD, OS X, and Windows.
Browser password managers
Most users are probably already using a password manager through their web browser's "remember password" functionality. For example, Chromium will ask if you want it to remember passwords and encrypt them with your operating system's facilities. For Windows, this encrypts the passwords with your login password and, for GNOME, it will store the passwords in the gnome-keyring storage. If you synchronize your Chromium settings with your Google account, Chromium will store those passwords on Google's servers, encrypted with a key that is stored in the Google Account itself. So your passwords are then only as safe as your Google account. Note that this was covered here in 2010, although back then Chromium didn't synchronize with the Google cloud or encrypt with the system-level key rings. That facility was only added in 2013.
In Firefox, there's an optional, profile-specific master password that unlocks all passwords. In this case, the issue is that browsers are generally always open, so the vault is always unlocked. And this is for users that actually do pick a master password; users are often completely unaware that they should set one.
The unlocking mechanism is a typical convenience-security trade-off: either users need to constantly input their master passwords to login or they don't, and the passwords are available in the clear. In this case, Chromium's approach of actually asking users to unlock their vault seems preferable, even though the developers actually refused to implement the feature for years.
Overall, I would recommend against using a browser-based password manager. Even if it is not used for critical sites, you will end up with hundreds of such passwords that are vulnerable while the browser is running (in the case of Firefox) or at the whim of Google (in the case of Chromium). Furthermore, the "auto-fill" feature that is often coupled with browser-based password managers is often vulnerable to serious attacks, which is mentioned below.
Finally, because browser-based managers generally lack a proper password generator, users may fail to use properly generated passwords, so they can then be easily broken. A password generator has been requested for Firefox, according to this feature request opened in 2007, and there is a password generator in Chrome, but it is disabled by default and hidden in the mysterious chrome://flags URL.
Other notable password managers
Another alternative password manager, briefly mentioned in the previous article, is the minimalistic Assword password manager that, despite its questionable name, is also interesting. Its main advantage over pass is that it uses a single encrypted JSON file for storage, and therefore doesn't leak the name of the entries by default. In addition to copy/paste, Assword also supports automatically entering passphrases in fields using the xdo library. Like pass, it uses GnuPG to encrypt passphrases. According to Assword maintainer Daniel Kahn Gillmor in email, the main issue with Assword is "interaction between generated passwords and insane password policies". He gave the example of the Time-Warner Cable registration form that requires, among other things, "letters and numbers, between 8 and 16 characters and not repeat the same characters 3 times in a row".
Another well-known password manager is the commercial LastPass service which released a free-software command-line client called lastpass-cli about three years ago. Unfortunately, the server software of the lastpass.com service is still proprietary. And given that LastPass has had at least two serious security breaches since that release, one could legitimately question whether this is a viable solution for storing important secrets.
In general, web-based password managers expose a whole new attack surface that is not present in regular password managers. A 2014 study by University of California researchers showed that, out of five password managers studied, every one of them was vulnerable to at least one of the vulnerabilities studied. LastPass was, in particular, vulnerable to a cross-site request forgery (CSRF) attack that allowed an attacker to bypass account authentication and access the encrypted database.
Problems with password managers
When you share a password database within a team, how do you remove access to a member of the team? While you can, for example, re-encrypt a pass database with new keys (thereby removing or adding certain accesses) or change the password on a KeePass database, a hostile party could have made a backup of the database before the revocation. Indeed, in the case of pass, older entries are still in the Git history. So access revocation is a problematic issue found with all shared password managers, as it may actually mean going through every password and changing them online.
This fundamental problem with shared secrets can be better addressed with a tool like Vault or SFLvault. Those tools aim to provide teams with easy ways to store dynamic tokens like API keys or service passwords and share them not only with other humans, but also make them accessible to machines. The general idea of those projects is to store secrets in a central server and send them directly to relevant services without human intervention. This way, passwords are not actually shared anymore, which is similar in spirit to the approach taken by centralized authentication systems like Kerberos. If you are looking at password management for teams, those projects may be worth a look.
Furthermore, some password managers that support auto-typing were found to be vulnerable to HTML injection attacks: if some third-party ad or content is able to successfully hijack the parent DOM content, it masquerades as a form that could fool auto-typing software as demonstrated by this paper that was submitted at USENIX 2014. Fortunately, KeePass was not vulnerable according to the security researchers, but LastPass was, again, vulnerable.
Future of password managers?
All of the solutions discussed here assume you have a trusted computer you regularly have access to, which is a usage pattern that seems to be disappearing with a majority of the population. You could consider your phone to be that trusted device, yet a phone can be lost or stolen more easily than a traditional workstation or even a laptop. And while KeePass has Android and iOS ports, those do not resolve the question of how to share the password storage among those devices or how to back them up.
Password managers are fundamentally file-based, and the "file" concept seems to be quickly disappearing, faster than we technologists sometimes like to admit. Looking at some relatives' use of computers, I notice it is less about "files" than images, videos, recipes, and various abstract objects that are stored in the "cloud". They do not use local storage so much anymore. In that environment, password managers lose their primary advantage, which is a local, somewhat offline file storage that is not directly accessible to attackers. Therefore certain password managers are specifically designed for the cloud, like LastPass or web browser profile synchronization features, without necessarily addressing the inherent issues with cloud storage and opening up huge privacy and security issues that we absolutely need to address.
This is where the "password hasher" design comes in. Also known as "stateless" or "deterministic" password managers, password hashers are emerging as a convenient solution that could possibly replace traditional password managers as users switch from generic computing platforms to cloud-based infrastructure. We will cover password hashers and the major security challenges they pose in a future article.
Index entries for this article | |
---|---|
Security | Passwords |
GuestArticles | Beaupré, Antoine |
Posted Feb 16, 2017 6:44 UTC (Thu)
by brouhaha (guest, #1698)
[Link] (2 responses)
I have not looked into whether it supports any form of browser integration, because I'd rather NOT have my browser have any knowledge of my password manager, which might make it easier for malicious Javascript code running in the browser to steal my other passwords (e.g., if a trojan asked for permission to access one of my passwords, but managed to read others).
Posted Feb 16, 2017 8:16 UTC (Thu)
by spaetz (guest, #32870)
[Link] (1 responses)
Posted Feb 17, 2017 8:50 UTC (Fri)
by hifi (guest, #109741)
[Link]
What I chose to do was to limit myself into updating my chosen password files where I'm physically at when I mainly use them. Work is updated at work and home at home. The file on my home PC is the master file for personal passwords and the file on my work PC is the master file for work related passwords. I synchronize my personal file to Google Drive every time I make an update (at home) and synchronize the work file to OneDrive at work when I update it. After a week or so it became very infrequent when most of my passwords were in so it doesn't bother me at all.
This setup is fairly convenient with Keepass2Android on my phone (note: open source project as well) which has synchronization support for Google Drive so I always have access to my passwords from my phone as long as I push the updates to Google Drive.
Also, if my chosen cloud provider decides to lose my cloud stored file, I still have a copy on my disk (and phone) so it's nearly impossible to completely lose access to them. Since they are well encrypted with enough iterations I should be able to sleep safe in case my cloud provider turns evil and would try to crack it or accidentally leak it somewhere. Same thing if my phone gets stolen.
As a side note, KeePassX has excellent (global keyboard shortcut) auto-type feature on the Linux desktop which makes browser integration almost completely useless as it can type your passwords into forms based on the window title which has the web page title. It's also fairly secure as it doesn't type into hidden fields like integrated ones could.
Posted Feb 16, 2017 9:45 UTC (Thu)
by NAR (subscriber, #1313)
[Link]
Posted Feb 16, 2017 10:47 UTC (Thu)
by cadrian (guest, #544)
[Link]
I am trying to build a web-based password manager, that anyone could install anywhere they want, and with the strongest possible security. I wouldn't shun help ;-)
Despite its name and the light tone, it is quite serious: https://github.com/cadrian/circus
Posted Feb 16, 2017 13:52 UTC (Thu)
by smitty_one_each (subscriber, #28989)
[Link] (1 responses)
Posted Feb 24, 2017 19:36 UTC (Fri)
by drs481 (guest, #56939)
[Link]
Posted Feb 16, 2017 15:55 UTC (Thu)
by bferrell (guest, #624)
[Link]
Posted Feb 16, 2017 18:39 UTC (Thu)
by ms (subscriber, #41272)
[Link] (2 responses)
Posted Feb 16, 2017 18:44 UTC (Thu)
by ms (subscriber, #41272)
[Link]
Posted Mar 3, 2017 17:12 UTC (Fri)
by derobert (subscriber, #89569)
[Link]
The auto-fill vulnerabilities are being fixed. For example, if a site uses HSTS, Firefox won't let you accept an invalid certificate or connect via HTTP.
Posted Feb 16, 2017 22:02 UTC (Thu)
by onelander (subscriber, #92024)
[Link] (6 responses)
Posted Feb 17, 2017 3:23 UTC (Fri)
by anarcat (subscriber, #66354)
[Link] (5 responses)
Posted Feb 17, 2017 12:21 UTC (Fri)
by XTerminator (guest, #59581)
[Link] (4 responses)
Posted Feb 20, 2017 13:20 UTC (Mon)
by fb (guest, #53265)
[Link] (3 responses)
Anecdote 1: All my passwords improved considerably when I started using LastPass. Before that I did my own password management by generating them myself using 'apg' and then storing each entry in a GPG encrypted text file. The trick was that this was so cumbersome that I didn't "manage" all my passwords this way.
Anecdote 2: My (non-tech savvy) wife reused the same password everywhere (including her bank account) until I got her to use LastPass.
It would be interesting if a follow-up article would also assess or look at whether a password manager is 'convenient enough to use' so as to be easily adopted by non-IT users.
Posted Feb 24, 2017 15:54 UTC (Fri)
by fknuckles (guest, #112874)
[Link] (2 responses)
I would also say that Lastpass as far as I can tell has handled their security issues responsibly and promptly.
This makes me inclined to trust them, as it means I can sleep easy knowing they are not knowingly putting my credentials at risk.
To echo your original comment, my passwords improved considerably since I started using lastpass. After several lost Keepass databases, it became evident that I didn't have the temperament for manually synchronising my passwords.
Posted Mar 28, 2017 20:34 UTC (Tue)
by anarcat (subscriber, #66354)
[Link] (1 responses)
Posted Mar 28, 2017 22:19 UTC (Tue)
by pizza (subscriber, #46)
[Link]
Thanks to this article, I started using 'pass' -- and I couldn't be happier with it. It's awesome!
(I finally got to retire two disparate gnome keyrings, yay!)
Posted Feb 17, 2017 10:40 UTC (Fri)
by Zero_Dogg (subscriber, #31310)
[Link]
Posted Feb 17, 2017 19:29 UTC (Fri)
by MattJD (subscriber, #91390)
[Link] (3 responses)
Posted Feb 17, 2017 19:59 UTC (Fri)
by anarcat (subscriber, #66354)
[Link] (2 responses)
I am not sure the second password brings much security: in theory, the *first* password shouldn't be in cleartext anyways, right? So no one should be able to access the data... Yet as the LastPass vulnerabilities have shown, there's more to this than just stealing the password: the list of password names is also sensitive, for example...
So I don't think "your password is as safe as your Google account" is unfair, but it may actually be inaccurate. It would be more accurate to say the password is only as secure as Google's *services.* If someone can hijack your web browser, Google's HTTP traffic or anything else in between, they can inject hostile code to steal whatever password is protecting all that stuff...
There's a whole new and different set of vulnerabilities that come from storing your passwords online, and most of those issues are generally hidden from users by clever and cute UIs... I don't trust that stuff much. ;)
Posted Feb 17, 2017 20:39 UTC (Fri)
by MattJD (subscriber, #91390)
[Link]
The difference regarding the first password is that it only protects outsiders from accessing your account. If Google turns evil, they have access to the key (they don't need the password, they store they key). You know that because when you change your account password through an account recovery, you don't need to change that key.
The second password is actually encrypting that key. You lose that password, you loose the data. I do agree most users may not activate that option, but it is at least a little more forward then chrome:///flags (at least when I set it up so many years ago). But assuming the browser is secure, that second password means everything else doesn't matter (including Google's storage of they key/data).
Posted Feb 21, 2017 20:58 UTC (Tue)
by GregMartyn (guest, #52300)
[Link]
By the way, here's a link to the sync passphrase docs that I'm referring to:
Posted Feb 17, 2017 21:35 UTC (Fri)
by jhoblitt (subscriber, #77733)
[Link]
Posted Feb 18, 2017 10:22 UTC (Sat)
by ttyridal (guest, #53739)
[Link] (2 responses)
Posted Feb 22, 2017 20:39 UTC (Wed)
by kjp (guest, #39639)
[Link] (1 responses)
Posted Feb 22, 2017 22:06 UTC (Wed)
by rahulsundaram (subscriber, #21946)
[Link]
Posted Feb 20, 2017 13:13 UTC (Mon)
by robbe (guest, #16131)
[Link]
Settable via security.ask_for_password in about:config. Details at MozillaZine.
Posted Feb 20, 2017 14:16 UTC (Mon)
by anarcat (subscriber, #66354)
[Link]
Posted Feb 23, 2017 12:08 UTC (Thu)
by oldtomas (guest, #72579)
[Link]
"passwords are a liability and we'd prefer to get rid of them"
I tend to disagree, and have embraced passwords. The (roughly ten) most important I keep in my head. Why?
I think it has something to do with user autonomy. I actually *want* that things get unaccessible once the user is out of the equation. Less convenient? Sure, but with a bit of training, it actually works.
Having thought about my patterns, I found out that password generation is the weakest point, so I currently use pwgen (yes, there are arguably better generators). For those more important things (LUKS for my laptop and for the back up medium, but also for my bank account's token) they are 16 long. Those are typically noted until the wetware cache has them (typically one week) then thrown away.
A password safe comes in handy to keep those passwords not cached in wetware.
Posted Mar 1, 2017 1:40 UTC (Wed)
by anarcat (subscriber, #66354)
[Link]
Posted Mar 17, 2017 12:02 UTC (Fri)
by jondo (guest, #69852)
[Link]
Posted Nov 21, 2017 19:43 UTC (Tue)
by yguy (guest, #119777)
[Link] (2 responses)
#1 Most web passwords are not necessary in the first place. There is a huge password mania out there by web designers.
#2 A service with an inconvenient password mechanism will not be used at all, so without browser-based password managers many websites would not exist, which often is no big loss.
#3 You fail to mention the main con of NON-browser-based password managers : They are a huge hassle , often do not work as one would think or as they are advertised. Browser-based password managers are simple and just work. Why ever change a running system ? Keepass is so much more of a hassle than the firefox manager and you give no weighed reasons why to put up with this huge disadvantage.
Posted Nov 22, 2017 19:23 UTC (Wed)
by mathstuf (subscriber, #69389)
[Link] (1 responses)
But yes, for the Joe Schmoe, a cloud-backed browser manager may work, but I'd think that this audience is more likely to have the use cases or inclinations that make browser-based managers a no-go.
Posted Nov 22, 2017 21:28 UTC (Wed)
by spaetz (guest, #32870)
[Link]
A look at password managers
A look at password managers
A look at password managers
Keep it on Google Drive?
A look at password managers
A look at password managers
KeePassXKCD
A look at password managers
A look at password managers
A look at password managers
A look at password managers
A look at password managers
A look at password managers
I use the lastpass both private and professional. It can be used for zero cost without mobile sync etc. To say that it it has had issues in the past with security is perhaps unfair as nobody has ever been able to get their hands on user's vault contents
A look at password managers
LastPass or any other password manager
LastPass or any other password manager
Anyone still considering using LastPass should seriously reconsider. Read this article then consider if it's really that important to have your passwords available online in a proprietary software if on the other side it may give attackers remote code execution on your machine...
Really, password managers shouldn't be online, with all that implies.
LastPass or any other password manager
LastPass or any other password manager
There's also gpgpwd written by yours truly, which isn't mentioned in the linked comparison. It shares a lot of similarities with assword, as far as I can tell. It, too, uses a monolithic single-file encrypted JSON-database, integrates with git etc. Its data format is documented so that implementing support for it in any other app should be easy enough, and one advantage of gpgpwd could be its comprehensive test suite.
A look at password managers
A look at password managers
A look at password managers
A look at password managers
A look at password managers
https://support.google.com/chrome/answer/1181035?visit_id...
A look at password managers
A look at password managers
GPL, various platforms and browser plugins.
A look at password managers
A look at password managers
Firefox's built-in password manager can prompt for the master password on browser start (least secure), every time (least friendly), or every i minutes.
A look at password managers
Another project I forgot to mention is the nascent keysafe project. While it is not a password manager per se, it can be used to backup secret keys (e.g. your OpenPGP private key or your password manager master password) in a safe way...
A look at password managers
Liability or asset?
A look at password managers
Firefox password manager
"Overall, I would recommend against using a browser-based password manager."
"Overall, I would recommend against using a browser-based password manager."
"Overall, I would recommend against using a browser-based password manager."
There are chrome/firefox extensions that connect keepassx/c with browser password entry. Best of both worlds as long as you trust those FF extensions....