KeePassXC Password Manager

From Kicksecure
Jump to navigation Jump to search

KeePassXC Icon

Introduction[edit]

KeePassXC is: [1]

...a free and open-source password manager. It started as a community fork of KeePassX (itself a cross-platform fork of KeePass). ... The Electronic Frontier Foundation mention KeePassXC as "an example of a password manager that is open-source and free." The tech collective PrivacyTools has included KeePassXC in their list of recommended password manager software because of its active development.

KeePassXC is recommended by the EFF in their Surveillance Self-Defense guide [2] and it is considered a feature-rich, modern and fully cross-platform password manager; refer to the features list and FAQ for more detail. The benefits of a password manager include: [3]

  • Strong and unique passwords can be created and stored by the one application.
  • Responses to security questions can be safely stored. [4]
  • All passwords can be protected by a single master password/passphrase.
  • This methodology prevents the reuse of passwords across multiple services, which is a poor security practice.
  • This provides better account protection, particularly when combined with Two-factor Authentication (2FA).

Note that KeePassXC does not automatically save changes when it is used, so this should be changed in the settings (otherwise unsaved password changes could be lost).

Reliable, open-source password managers are a useful tool but they also come with risks:

  • Password managers create a single point of failure.
  • Research suggests coding vulnerabilities are present in many password managers.
  • Highly capable adversaries are likely to target password managers.
  • Avoid storing passwords "in the cloud" (on remote servers) -- this is more convenient but introduces the risk of a cloud vulnerability leading to an exploit.
  • Avoid crossing remote borders with electronic devices containing your password manager -- some jurisdictions can compel/demand password disclosure and the unlocking of devices. [5]

Before using a password manager like KeePassXC, conduct a risk assessment of your personal circumstances. If you are likely to be targeted, then consider creating strong passwords manually instead and storing them in a safe physical location. One suitable method is EFF's Dice-Generated Passphrases via their long wordlist. Note that passphrases should be at least six words long; passphrases of 15 words or more will protect against future quantum computer advancements. [6]

KeePassXC Setup and Use[edit]

Installation[edit]

Info If keepassxc will replace Google Authenticator -- actually time-based, one-time password (TOTP), see: Two Factor Authentication (2FA) -- then a Debian-based VM is more suitable than a Kicksecure ™-based VM. [7]

1. It is recommended to install keepassxc inside an offline (vault) VM.

  • In Qubes:
    • apt package installation can be completed in the Template.
    • Download and verification can also be performed in a temporary TemplateBased AppVM, ideally Qubes DisposableVM. Next move keepassxc to an offline vault VM.
  • In Kicksecure ™: install keepassxc first, then disconnect the Internet and never re-enable internet access. TODO document

2. Install keepassxc.

Note: The packages yubikey-personalization and yubikey-personalization-gui are YubiKey-related. If YubiKey is not in use, skip the installation of these packages and only install keepassxc.

Install keepassxc yubikey-personalization yubikey-personalization-gui.

1. Update the package lists.

sudo apt update

2. Upgrade the system.

sudo apt full-upgrade

3. Install the keepassxc yubikey-personalization yubikey-personalization-gui package.

Using apt command line parameter --no-install-recommends is in most cases optional.

sudo apt install --no-install-recommends keepassxc yubikey-personalization yubikey-personalization-gui

The procedure of installing keepassxc yubikey-personalization yubikey-personalization-gui is complete.

3. Optional: Install the browser plug-in for keepassxc.

It is possible to install the official KeePassXC browser plug-in for FireFox/Tor Browser, see KeePassXC Browser Extension for instructions.

Autostart KeePassXC[edit]

Info This is an optional configuration to autostart keepassxc.

1. Create folder ~/.config/autostart/.

mkdir -p ~/.config/autostart/

2. Create a keepassxc.desktop file.

Open file ~/.config/autostart/keepassxc.desktop in a text editor of your choice as a regular, non-root user.

If you are using a graphical environment, run.

mousepad ~/.config/autostart/keepassxc.desktop

If you are using a terminal, run.

nano ~/.config/autostart/keepassxc.desktop

3. Paste the following content.

[Desktop Entry] Type=Application Name=keepassxc Exec=keepassxc

4. Save the file.

The process is now complete.

KeePassXC Usage[edit]

1. It is recommended to use an offline (vault) VM.

2. Ensure the clock setting is correct.

Kicksecure ™ is unsuitable due to Boot Clock Randomization and sdwdate clock randomization. (Unless disabled and offline.)

3. Launch keepassxc.

keepassxc

4. Create a new database.

5. The default file name Passwords.kdbx is acceptable.

If Full Disk Encryption is already configured, a very simple password can be utilized; this is a personal choice.

6. Left click on root.

7. Add a new entry.

  • Navigate to the Menu → EntriesAdd new entry → under Title: write any name name (such as test) → OK.

8. Add a time-based, one-time password (TOTP).

  • Right-click on the new entry (such as test) → Time-based one-time passwordset up TOTPDefault RFC 6238 token settings → paste 2FA code → OK.

9. Reveal a TOTP code.

  • Right-click on the new entry (such as test) → Time-based one-time passwordshow TOTP.

Troubleshooting: Time Fix[edit]

Info These steps are for troubleshooting when TOTP codes do not match. 2FA TOTP codes change every 30 seconds, therefore the clock needs to be reasonably accurate.

These steps are useful for any Offline VMs or computers.

Kicksecure ™ for Qubes users note: Best using a Standalone Qubes since otherwise it is difficult to perform these steps in an App Qube. [8]

Since Kicksecure ™ uses Secure Distributed Web Date (sdwdate), there will be a delay in the TOTP 30-second period. For example, if sdwdate has enforced a 22 second delay, then a TOTP code copied and pasted into a website or service that requires it would not work until the timer reached eight seconds or below. (This result was tested in an offline Kicksecure standaloneVM in Qubes OS.)

To avoid delays, disable sdwdate and bootclockrandomization by running this command:

sudo service sdwdate stop && sudo service bootclockrandomization stop

sudo systemctl disable sdwdate && sudo systemctl disable bootclockrandomization

1. Set the timezone to UTC for simplicity.

sudo cp /usr/share/zoneinfo/Etc/UTC /etc/localtime

2. Confirm the correct time in UTC.

Navigate to timeanddate.com: UTC or similar web resources to confirm the UTC time.

3. Fix the clock.

In the example below, change the date and time accordingly.

sudo date -s "12 SEPT 2021 01:15:25"

4. Confirm the clock is now correct.

date

KeePassXC Browser Extension[edit]

Community Support Only!:
Info

Community Support Only means Kicksecure ™ developers are unlikely to provide free support for wiki chapters or pages with this tag. See Community Support for further information, including implications and possible alternatives.

It is possible to install the official KeePassXC browser plug-in for FireFox/Tor Browser. If utilized, this allows KeePassXC to store passwords and auto-type them into various websites and applications. This configuration is unrecommended because any software vulnerabilities might unintentionally expose sensitive passwords.

1. Install the KeePassXC browser add-on.

Navigate to KeePassXC-Browser and install the add-on.

2. Optional: Install a more recent version of keepassxc.

See: Debian Backports: Instructions.

3. Create the following symlink to have a functional proxy.

cd ~/.tb/tor-browser/Browser/TorBrowser/Data/Browser/.mozilla

ln -s /home/user/.mozilla/native-messaging-hosts native-messaging-hosts

4. Create the .mozilla folder if it does not exist.

For further troubleshooting, refer to keepassxc-browser: Troubleshooting guide.

Libsecret Integration[edit]

libsecret is a GNU/Linux library used to access the GNOME or KDE keyring, including passwords, SSH keys, GPG certificates and more. Given that KeePassXC stores similar data (passwords), libsecret integration offers benefits, and keepassxc can handle secrets from various Linux applications such as gajim, and even MSEdge!

Footnotes[edit]

  1. https://en.wikipedia.org/wiki/KeePassXC
  2. It is also recommended by PrivacyTools, see here (v3 onion).
  3. https://ssd.eff.org/en/module/creating-strong-passwords
  4. It is recommended to provide fictional information to security questions in order to limit personal disclosures. Honest answers might be discoverable by adversaries who then utilize it to bypass your passwords completely.
  5. The US border is a case in point, see: Digital Privacy at the U.S. Border: Protecting the Data On Your Devices.
  6. Quantum computers halve the number of iterations required to brute-force a key. This means doubling the length of symmetric keys to protect against future (hypothetical) quantum attacks.
  7. This is because accurate time is a precondition for TOTP -- Kicksecure ™ randomizes this value due to Boot Clock Randomization and sdwdate.
  8. Patches welcome.


Unfinished: This wiki is a work in progress. Please do not report broken links until this notice is removed, use Search Engines First and contribute improving this wiki.