this post was submitted on 21 Apr 2024
31 points (97.0% liked)

Privacy

32506 readers
1010 users here now

A place to discuss privacy and freedom in the digital world.

Privacy has become a very important issue in modern society, with companies and governments constantly abusing their power, more and more people are waking up to the importance of digital privacy.

In this community everyone is welcome to post links and discuss topics related to privacy.

Some Rules

Related communities

much thanks to @gary_host_laptop for the logo design :)

founded 5 years ago
MODERATORS
 

Inspired by this post, I decided to see if I could identify any single points of failure in my own setup.

Prerequisites

There are two notable systems that should be mentioned:

The 3-2-1 rule

The 3-2-1 rule can aid in the backup process. It states that there should be at least 3 copies of the data, stored on 2 different types of storage media, and one copy should be kept offsite, in a remote location (this can include cloud storage). 2 or more different media should be used to eliminate data loss due to similar reasons (for example, optical discs may tolerate being underwater while LTO tapes may not, and SSDs cannot fail due to head crashes or damaged spindle motors since they do not have any moving parts, unlike hard drives). An offsite copy protects against fire, theft of physical media (such as tapes or discs) and natural disasters like floods and earthquakes. Physically protected hard drives are an alternative to an offsite copy, but they have limitations like only being able to resist fire for a limited period of time, so an offsite copy still remains as the ideal choice.

The factors of authentication

The ways in which someone may be authenticated fall into three categories, based on what is known as the factors of authentication: something the user knows, something the user has, and something the user is. Each authentication factor covers a range of elements used to authenticate or verify a person's identity before being granted access, approving a transaction request, signing a document or other work product, granting authority to others, and establishing a chain of authority.

Security research has determined that for a positive authentication, elements from at least two, and preferably all three, factors should be verified. The three factors (classes) and some of the elements of each factor are:

  1. Knowledge: Something the user knows (e.g., a password, partial password, passphrase, personal identification number (PIN), challenge–response (the user must answer a question or pattern), security question).
  2. Ownership: Something the user has (e.g., wrist band, ID card, security token, implanted device, cell phone with a built-in hardware token, software token, or cell phone holding a software token).
  3. Inherence: Something the user is or does (e.g., fingerprint, retinal pattern, DNA sequence (there are assorted definitions of what is sufficient), signature, face, voice, unique bio-electric signals, or other biometric identifiers).

What KeePassXC offers

KeePassXC is an open-source cross-platform password manager. It mainly stores password databases locally, but you can simply store the file on the cloud for cloud sync. However, this method is botch-y at best, and adds the additional complexity of storing the credentials for the cloud drive.

The database can be protected with any of the following:

Password: This is something the user knows. It can be a password or a passphrase. This can be written down to become something the user has physically, or stored in a file to become something the user has digitally. Storing it in a file is generally not safe due to temporary file leaks.

Key File: This is something the user has. This is stored digitally. This file should either be kept on a separate drive, encrypted with something like LUKS or VeraCrypt, or both. It is possible to convert it to readable text and print it as a physical copy, but reversing the process every time you want to unlock your database would be cumbersome.

Hardware Key: This is something the user has. This is stored physically. You can use hardware security keys such as the YubiKey or OnlyKey for this.

Quick Unlock: This is something the user is. Quick Unlock is only available on Windows and macOS as a form of biometric authentication. It is only available for devices that have a built-in biometric scanner, or by using an attachable biometric scanner. There is most likely a way to achieve this on Linux, but the documentation is scarce.

Any combination of these methods can be used to protect a KeePassXC database. At least one must be used. However, if you use multiple methods, all of them must be used to unlock the database (e.g. if you set up a password and a key file as the methods to unlock the database, you can't only use the password or only use the key file to unlock it, you must use both.)

The problems

Each method has a single point of failure, and the fact that you can't set up multiple methods of authentication but choose one to unlock the database means that the more methods you choose to protect your database with, the likelier it will be that one method fails.

Password: This can be forgotten, lost or stolen from a piece of paper (if it's written down), keylogged or shoulder surfed, leaked through temporary files or stolen (if it's stored digitally), corrupted or permanently encrypted (if it's stored digitally), have the drive physically lost or stolen (if it's stored digitally), unconsciousness (if you only stored it mentally and needed someone else to unlock it for you), or forced our of you with torture.

Key File: This can be leaked through temporary files (if not stored properly), hacked and stolen, corrupted, permanently encrypted (if you are unable to decrypt it), or have the drive physically lost or stolen.

Hardware Key: This can be damaged, stolen, or lost.

Quick Unlock: This can be spoofed (if not set up properly), damaged, general failure to authenticate, damage to you (e.g. facial damage in a fire), or hacked with zero-day vulnerabilities (since Windows and macOS are proprietary).

If any one of these fails, the database is permanently locked.

Some solutions

There are some improvements that you can use to mitigate some of the single points of failure. All methods of authentication can be redone if something happens, but you need to unlock the database to do so (e.g. you can change your database password if it gets leaked, but you need to be able to unlock the database first, so it doesn't help if you lose your password).

Password: You can store your password using something like a password card. Passphrases are also easier to remember than passwords. Both passwords and passphrases can be safely written down on paper by enciphering them first. However, this introduces new complexities and single points of failure if you are unable to decipher the password.

Key File: The use of the 3-2-1 rule can help make sure the key file never gets lost, but extra care should be taken to make sure the file never gets stolen.

Hardware Key: You can set up multiple hardware security keys in order to make sure if one gets lost you can use the other. One key should be kept with you at all times, and the other should be safely stored somewhere else (such as a safe deposit box).

Quick Unlock: I have never used this feature, but assuming it's anything like FaceID, you should set up multiple people (such as trusted friends and loved ones) to be able to unlock with biometrics. This ensures that if something happens to you, someone else can unlock it in an emergency or other reasons you may need someone to unlock it for you.

Plugins

While I may be wrong, KeePassXC does not support plugins directly. Ideally you should be able to have plugins for things such as proper cloud sync, TOTP database protection, and changing the all-or-nothing nature of unlocking the database. However, since KeePassXC is open source, someone could make a fork of KeePassXC that supports plugins (please, call it KeePlugXC).

Database syncing

Besides not being able to unlock your database, your database file itself is largely subject to the same single points of failure as a key file. The difference is the database is completely encrypted, and is safe (although not ideal) if it gets leaked. You can store your database in as many places as you'd like, to make sure it never gets corrupted, but the issue is syncing the database as that would be a manual task. The solution presented is the botched cloud storage, but for those who want a local solution, that is not ideal.

Final notes and questions

KeePassXC is very feature rich, so there are other things that can be used to aid the process of preventing database lockouts; but even so, it's a very difficult task. How is your KeePassXC database set up? Are there any single points of failure? How have you fixed some of the issues listed here? Is there a perfect or near-perfect system for eliminating lockouts?

you are viewing a single comment's thread
view the rest of the comments
[–] Charger8232@lemmy.ml 1 points 8 months ago (1 children)

My method is that I have a passphrase with some special symbols that unlocks my database and it is decently long.

Where is your password stored? If it's only by memory, what happens if you forgot it or needed someone else to unlock it in an emergency?

[–] shortwavesurfer@monero.town 2 points 8 months ago* (last edited 8 months ago) (1 children)

Yeah, its memory only. I have been toying with proper ways of securing it and very seriously thought about splitting it in three parts and keeping one and giving the other two to different people so that they would have to collude to break it.

Like "cheeseburger" would be

Person 1: c--e--b--g--

Person 2 : -h--s--u--e-

Person 3: --e--e--r--r

As long as the other people do not know each other, and I leave instructions say in a lock box that one other person has the key to and leave the phone number for the other person, then they could talk if I am incapacitated and crack the password.

[–] Charger8232@lemmy.ml 1 points 8 months ago (1 children)

You could technically achieve this by giving one person the password, another person the key file, and the third person the security key.

[–] shortwavesurfer@monero.town 2 points 8 months ago* (last edited 8 months ago) (1 children)

You know that is quite a good point. You would have all three and they would all three also be held by somebody else. But different people.

Edit: I just did think of one potential issue with this, and that's the fact that in your possession would be at least two of the three items, the physical key that you need, and the key file that you need. So someone who got to you would have at least two of the three by default.

[–] Charger8232@lemmy.ml 1 points 8 months ago (1 children)

So someone who got to you would have at least two of the three by default.

Both are useless without the third, and can be easily regenerated. Also, you can be tortured for your passwords.

[–] shortwavesurfer@monero.town 2 points 8 months ago (1 children)

True, I wasn't necessarily thinking torture. I was thinking more along incapacitation lines. But if somebody is torturing you, there's a good chance you're going to give up the database. No matter what.

[–] Charger8232@lemmy.ml 1 points 8 months ago

Also, someone can hijack your contacts and bribe/torture all 3 people into giving them your credentials.