Skip to content
This repository has been archived by the owner on Feb 20, 2025. It is now read-only.

Commit

Permalink
Security: Storage of challenges in path with restricted permissions
Browse files Browse the repository at this point in the history
The previous instructions create a global word-writeable path for challenge files. This is a security issue because all users and unprivileged processes can create challenge files for arbitrary users. This enables an attacker to bypass the second factor for authentication.
  • Loading branch information
thomaspatzke authored Feb 23, 2017
1 parent 80b7bff commit 0d61b26
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions doc/Authentication_Using_Challenge-Response.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -68,16 +68,18 @@ $ ykpamcfg -2 -v
Stored initial challenge and expected response in '/home/alice/.yubico/challenge-123456'.
$
------
If your /home/user folder is encrypted you should move the challenge file in a different path (i.e. /var/yubico) and then set the right permission for the user to create the files. To do this do as follow:
From security perspective, it is generally a good idea to move the challenge file in a system-wide path that is only read- and writable by root. To do this do as follow:

----
$ mkdir /var/yubico
$ chmod +t /var/yubico
$ chmod 777 /var/yubico
$ ykpamcfg -2 -v -p /var/yubico
$ sudo mkdir /var/yubico
$ sudo chown root.root /var/yubico
$ sudo chmod 700 /var/yubico
$ ykpamcfg -2 -v
...
Stored initial challenge and expected response in '/var/yubico/alice-123456'.
$
Stored initial challenge and expected response in '$HOME/.yubico/challenge-123456'.
$ sudo mv ~/.yubico/challenge-123456 /var/yubico/alice-123456
$ sudo chown root.root /var/yubico/alice-123456
$ sudo chmod 600 /var/yubico/alice-123456
----

It is important that the file is named with the name of the user that is going to be authenticated by this YubiKey.
Expand Down

0 comments on commit 0d61b26

Please sign in to comment.