Commit graph

39015 commits

Author SHA1 Message Date
Moritz Maxeiner
09f9af17b4 Update to the Yubikey PBA
Security-relevant changes:
 * No (salted) passphrase hash send to the yubikey, only hash of the salt (as it was in the original implementation).
 * Derive $k_luks with PBKDF2 from the yubikey $response (as the PBKDF2 salt) and the passphrase $k_user
   (as the PBKDF2 password), so that if two-factor authentication is enabled
   (a) a USB-MITM attack on the yubikey itself is not enough to break the system
   (b) the potentially low-entropy $k_user is better protected against brute-force attacks
 * Instead of using uuidgen, gather the salt (previously random uuid / uuid_r) directly from /dev/random.
 * Length of the new salt in byte added as the parameter "saltLength", defaults to 16 byte.
   Note: Length of the challenge is 64 byte, so saltLength > 64 may have no benefit over saltLengh = 64.
 * Length of $k_luks derived with PBKDF2 in byte added as the parameter "keyLength", defaults to 64 byte.
   Example: For a luks device with a 512-bit key, keyLength should be 64.
 * Increase of the PBKDF2 iteration count per successful authentication added as the
   parameter "iterationStep", defaults to 0.

Other changes:
 * Add optional grace period before trying to find the yubikey, defaults to 2 seconds.

Full overview of the yubikey authentication process:

  (1) Read $salt and $iterations from unencrypted device (UD).
  (2) Calculate the $challenge from the $salt with a hash function.
      Chosen instantiation: SHA-512($salt).
  (3) Challenge the yubikey with the $challenge and receive the $response.
  (4) Repeat three times:
    (a) Prompt for the passphrase $k_user.
    (b) Derive the key $k_luks for the luks device with a key derivation function from $k_user and $response.
        Chosen instantiation: PBKDF2(HMAC-SHA-512, $k_user, $response, $iterations, keyLength).
    (c) Try to open the luks device with $k_luks and escape loop (4) only on success.
  (5) Proceed only if luks device was opened successfully, fail otherwise.

  (6) Gather $new_salt from a cryptographically secure pseudorandom number generator
      Chosen instantiation: /dev/random
  (7) Calculate the $new_challenge from the $new_salt with the same hash function as (2).
  (8) Challenge the yubikey with the $new_challenge and receive the $new_response.
  (9) Derive the new key $new_k_luks for the luks device in the same manner as in (4) (b),
      but with more iterations as given by iterationStep.
 (10) Try to change the luks device's key $k_luks to $new_k_luks.
 (11) If (10) was successful, write the $new_salt and the $new_iterations to the UD.
      Note: $new_iterations = $iterations + iterationStep

Known (software) attack vectors:

 * A MITM attack on the keyboard can recover $k_user. This, combined with a USB-MITM
   attack on the yubikey for the $response (1) or the $new_response (2) will result in
   (1) $k_luks being recovered,
   (2) $new_k_luks being recovered.
 * Any attacker with access to the RAM state of stage-1 at mid- or post-authentication
   can recover $k_user, $k_luks, and  $new_k_luks
 * If an attacker has recovered $response or $new_response, he can perform a brute-force
   attack on $k_user with it without the Yubikey needing to be present (using cryptsetup's
   "luksOpen --verify-passphrase" oracle. He could even make a copy of the luks device's
   luks header and run the brute-force attack without further access to the system.
 * A USB-MITM attack on the yubikey will allow an attacker to attempt to brute-force
   the yubikey's internal key ("shared secret") without it needing to be present anymore.

Credits:

 * Florian Klien,
   for the original concept and the reference implementation over at
   https://github.com/flowolf/initramfs_ykfde
 * Anthony Thysse,
   for the reference implementation of accessing OpenSSL's PBKDF2 over at
   http://www.ict.griffith.edu.au/anthony/software/pbkdf2.c
2014-02-08 14:59:52 +01:00
Moritz Maxeiner
8e74e1fded Replace the current Yubikey PBA implementation with the previous one.
Rationale:
  * The main reason for choosing to implement the PBA in accordance
    with the Yubico documentation was to prevent a MITM-USB-attack
    successfully recovering the new LUKS key.
  * However, a MITM-USB-attacker can read user id and password when
    they were entered for PBA, which allows him to recover the new
    challenge after the PBA is complete, with which he can challenge
    the Yubikey, decrypt the new AES blob and recover the LUKS key.
  * Additionally, since the Yubikey shared secret is stored in the
    same AES blob, after such an attack not only is the LUKS device
    compromised, the Yubikey is as well, since the shared secret
    has also been recovered by the attacker.
  * Furthermore, with this method an attacker could also bruteforce
    the AES blob, if he has access to the unencrypted device, which
    would again compromise the Yubikey, should he be successful.
  * Finally, with this method, once the LUKS key has been recovered
    once, the encryption is permanently broken, while with the previous
    system, the LUKS key itself it changed at every successful boot,
    so recovering it once will not necessarily result in a permanent
    breakage and will also not compromise the Yubikey itself (since
    its secret is never stored anywhere but on the Yubikey itself).

Summary:
The current implementation opens up up vulnerability to brute-forcing
the AES blob, while retaining the current MITM-USB attack, additionally
making the consequences of this attack permanent and extending it to
the Yubikey itself.
2014-02-03 22:50:17 +01:00
Domen Kožar
e96bc485db retroshare: 0.5.1d -> 0.5.5c 2014-02-03 21:54:45 +01:00
Vladimír Čunát
3fe1656376 libav: bugfix updates for both branches; maintain 2014-02-03 21:43:55 +01:00
Bjørn Forsman
15eed826b6 psqlodbc: update from 8.3 to 9.3 (fixes build) 2014-02-03 21:08:27 +01:00
Shea Levy
b4a9fff1aa Update node packages
Signed-off-by: Shea Levy <shea@shealevy.com>
2014-02-03 14:43:21 -05:00
Peter Simons
c19547ad42 haskell-shelly: update to version 1.4.4 2014-02-03 18:30:02 +01:00
Peter Simons
a2d903d213 haskell-pipes-network: update to version 0.6.2 2014-02-03 18:30:02 +01:00
Peter Simons
dae7d83454 haskell-doctest: update to version 0.9.10.1 2014-02-03 18:30:02 +01:00
Peter Simons
55bcf1bcc5 haskell-atomic-primops: update to version 0.6 2014-02-03 18:30:02 +01:00
Peter Simons
aaa462c4bc haskell-abstract-deque: update to version 0.2.2.1 2014-02-03 18:30:02 +01:00
Karn Kallio
26ea10a775 proofgeneral: fix build with earlier version of texinfo. 2014-02-03 18:26:20 +01:00
Georges Dubus
8677b19c9d silver-searcher: updated to 0.19.2
Also fixed the "libgcc_s.so.1 must be installed for pthread_cancel to
work" problem.
2014-02-03 18:21:43 +01:00
Bjørn Forsman
700c1323b8 sqliteodbc: fix library location
Commit d7d3c8fd82 (sqliteodbc: update to
0.995, add more metadata) mistakenly moved libraries from $out/lib to
$out (or rather stopped moving them from $out to $out/lib).

Move them back to $out/lib where they're expected to be and referred to
by the /etc/odbcinst.ini snippet.
2014-02-03 18:13:26 +01:00
Bjørn Forsman
34484e65f3 arp-scan: new package
Arp-scan is a command-line tool that uses the ARP protocol to discover
and fingerprint IP hosts on the local network.

http://www.nta-monitor.com/tools-resources/security-tools/arp-scan
2014-02-03 12:37:51 +01:00
Vladimír Čunát
9dd9e52c0c pidgin: bugfix 2.10.8 -> .9
Fixes connection to some servers broken by the previous update.
2014-02-03 10:05:47 +01:00
Shea Levy
2cf7bc982b idris requires llvm-general-3.3 currently
Signed-off-by: Shea Levy <shea@shealevy.com>
2014-02-02 20:40:29 -05:00
Shea Levy
134546bca2 clang: Fix linking with -flto
Signed-off-by: Shea Levy <shea@shealevy.com>
2014-02-02 20:39:16 -05:00
Shea Levy
06ef22bcdd llvm-general: Fix build
Signed-off-by: Shea Levy <shea@shealevy.com>
2014-02-02 20:36:50 -05:00
Shea Levy
86c587134b llvm-3.4: Try to fix build on darwin
Signed-off-by: Shea Levy <shea@shealevy.com>
2014-02-02 19:47:59 -05:00
Peter Simons
710ddf7662 haskell-trifecta: update jail-breaking code 2014-02-02 23:36:22 +01:00
Peter Simons
c6053075bd haskell-hakyll: jailbreak to fix build with recent versions of regex-tdfa
https://github.com/NixOS/nixos/issues/281
2014-02-02 23:16:29 +01:00
Peter Simons
e3651da23e haskell-lens: add version 4.0 2014-02-02 22:36:13 +01:00
Peter Simons
f16f44662f haskell-aeson: fix build of version 0.7.x 2014-02-02 22:36:13 +01:00
Peter Simons
422eda499e haskell-hlint: update to version 1.8.56 2014-02-02 22:36:13 +01:00
Peter Simons
4675368065 haskell-yesod-form: update to version 1.3.5 2014-02-02 22:36:13 +01:00
Peter Simons
012006bd96 haskell-yesod-core: update to version 1.2.6.6 2014-02-02 22:36:12 +01:00
Peter Simons
c21822f64f haskell-yesod-bin: update to version 1.2.5.8 2014-02-02 22:36:12 +01:00
Peter Simons
b5041566b4 haskell-web-routes: update to version 0.27.5 2014-02-02 22:36:12 +01:00
Peter Simons
1dfed43619 haskell-web-routes-boomerang: update to version 0.28.2 2014-02-02 22:36:12 +01:00
Peter Simons
c162ba42e5 haskell-warp: update to version 2.0.2.1 2014-02-02 22:36:12 +01:00
Peter Simons
f834ae003f haskell-snap: update to version 0.13.2.2 2014-02-02 22:36:12 +01:00
Peter Simons
b409b23fa0 haskell-shelly: update to version 1.4.3.1 2014-02-02 22:36:12 +01:00
Peter Simons
e78bcf3b16 haskell-safe: update to version 0.3.4 2014-02-02 22:36:12 +01:00
Peter Simons
99c930d791 haskell-pipes: update to version 4.1.0 2014-02-02 22:36:12 +01:00
Peter Simons
599d0e193c haskell-pipes-safe: update to version 2.0.2 2014-02-02 22:36:12 +01:00
Peter Simons
3212a49491 haskell-pipes-parse: update to version 3.0.0 2014-02-02 22:36:12 +01:00
Peter Simons
7ff0169247 haskell-pipes-concurrency: update to version 2.0.2 2014-02-02 22:36:12 +01:00
Peter Simons
dd5010edc9 haskell-pipes-bytestring: update to version 2.0.0 2014-02-02 22:36:12 +01:00
Peter Simons
cf68071ed1 haskell-pipes-aeson: update to version 0.2.1 2014-02-02 22:36:12 +01:00
Peter Simons
88c07a66b6 haskell-llvm-general: update to version 3.4.0.0 2014-02-02 22:36:12 +01:00
Peter Simons
1ca50c0d56 haskell-llvm-general-pure: update to version 3.4.0.0 2014-02-02 22:36:12 +01:00
Peter Simons
2b81f1da45 haskell-hsimport: update to version 0.2.7 2014-02-02 22:36:12 +01:00
Peter Simons
4cffcb7002 haskell-haxr: update to version 3000.10.2 2014-02-02 22:36:12 +01:00
Peter Simons
3dbbe94e4b haskell-happstack-server: update to version 7.3.3 2014-02-02 22:36:11 +01:00
Peter Simons
df7785473d haskell-happstack-lite: update to version 7.3.3 2014-02-02 22:36:11 +01:00
Peter Simons
ec3f8116f8 haskell-fay: update to version 0.19.0.2 2014-02-02 22:36:11 +01:00
Peter Simons
b6ac32fd41 haskell-fast-logger: update to version 2.1.5 2014-02-02 22:36:11 +01:00
Peter Simons
c740b71160 haskell-email-validate: update to version 2.0.1 2014-02-02 22:36:11 +01:00
Peter Simons
997e728458 haskell-diagrams-svg: update to version 1.0.1.1 2014-02-02 22:36:11 +01:00