Commit graph

56 commits

Author SHA1 Message Date
NZSmartie c9a10631de
Gallagher key checking is now supported on MIFARE Desfire
Both `hf mfdes auth` and `hf mfdes chk` now support Key Diversification for
AN10922 and as special treat, Gallagher issued cards.

For `hf mfdes auth`:
```
    -d, --kdf <kdf>                Key Derivation Function (KDF) (0=None, 1=AN10922, 2=Gallagher)
    -i, --kdfi <kdfi>              KDF input (HEX 1-31 bytes)
```

And for `hf mfdes chk`:
```
    -f, --kdf <kdf>                Key Derivation Function (KDF) (0=None, 1=AN10922, Gallagher)
    -i, --kdfi <kdfi>              KDF input (HEX 1-31 bytes)
```

Examples:
- `hf mfdes auth -a 2081f4 -m 3 -t 4 -d 2 -n 2 -k 00112233445566778899aabbccddeeff`
  Will diversify the key for key `2` on AID `2081F4` for Gallagher issued cards

- `hf mfdes chk -f 1 -i 00112233 -d mfdes_default_keys`
  Will read in all the default keys from the dictionary, and diversify them
  using AN10922 with the input data `00112233`

- `hf mfdes chk -f 2 -d mfdes_default_keys`
  Will read in all the default keys from the dictionary, and diversify them
  using AN10922 but with input data generated from the card's UID, AID and
  key number.
2020-11-02 01:41:48 +13:00
NZSmartie b788054aca
Add initial suport for MIFARE Key Diversification
This adds two new options to `hf mfdes auth`

```
    -d, --kdf <kdf>                Key Derivation Function (KDF) (0=None, 1=AN10922)
    -i, --kdfi <kdfi>              KDF input (HEX 1-31 bytes)
```

By specifying `-d 1` and some kdf data `-i 00112233`, the key will be
diversified using AN10922.
2020-10-31 21:17:35 +13:00
iceman1001 64f9bb5e01 style 2020-10-06 18:00:00 +02:00
iceman1001 235cca276d moved old type 2020-10-02 14:32:16 +02:00
iceman1001 46352dfccc 14b_chaining 2020-09-30 17:06:39 +02:00
iceman1001 50d2597fcb remove some cluttering down of list when cardhelper is active 2020-07-29 10:19:25 +02:00
Bjoern Kerler 7aa27cfefb Auth of des, 3des and aes working. 2020-04-12 17:10:27 +02:00
Bjoern Kerler 637103224d Fixes 2020-04-11 11:32:31 +02:00
iceman1001 fe0d9c8d9f hf mfdes enum - fixes WIP 2020-03-17 11:37:38 +01:00
Thomas Sutter bb53a40adb Add auth1 output - experimental.
Add auth2 command - experimental.
2019-12-17 13:09:14 +01:00
Thomas Sutter a65cfc5f4b Fix auth1 response. 2019-12-17 08:19:42 +01:00
Thomas Sutter 601b8d281a Add command request system code.
Add command request specification version.
Add command reset mode.
Make Style.
2019-11-04 10:24:29 +01:00
Thomas Sutter 2e60cb4fa6 Add write without encryption command. 2019-10-29 11:14:38 +01:00
Thomas Sutter 498c4b8377 Refactor FeliCa structs. 2019-10-29 10:22:47 +01:00
Thomas Sutter bfd5214cd5 Add read_without_encryption command. 2019-10-24 16:08:44 +02:00
Thomas Sutter 3b0447fbb3 Draft read without encryption 2019-10-24 08:44:20 +02:00
Thomas Sutter 1f7dd3e2a7 Add request response command for felica Mode. 2019-10-23 14:48:23 +02:00
Thomas Sutter 3f56116615 Add felica request service all nodes command.
Make style.
2019-10-22 17:03:54 +02:00
Thomas Sutter 6144e2d09b Add felica request service command.
Add cmd parser functions.
2019-10-22 15:56:05 +02:00
iceman1001 065a1b6848 chg: enforce PACKED on more structs 2019-10-17 22:32:09 +02:00
merlokk 20d13d5509 added PACKED attribute for structures and reorganize include folder 2019-07-16 14:50:38 +03:00
Eloff 66ee8dc09e used predefined constants, common types moved to common header files 2019-04-23 21:14:20 +03:00
vratiskol 3b06c9d8ee Merge remote-tracking branch 'upstream/master' into hf_mf_sim 2019-03-21 20:46:56 +01:00
iceman1001 ca9061bd32 changed byte_t -> uint8_t 2019-03-21 15:19:18 +01:00
vratiskol c2c4aac7ff Merge remote-tracking branch 'upstream/master' into hf_mf_sim 2019-03-18 21:51:29 +01:00
vratiskol cfe2b2797e Revert "Merge branch 'master' into hf_mf_sim"
This reverts commit cbea5d9d02, reversing
changes made to b66152feb2.
2019-03-15 21:45:00 +01:00
vratiskol cbea5d9d02 Merge branch 'master' into hf_mf_sim 2019-03-15 21:17:44 +01:00
vratiskol 6a52b6074f Sync from Upstream 2019-03-15 21:17:07 +01:00
vratiskol 64c3ae8b34 hf mf sim 2019-03-15 21:04:25 +01:00
iceman1001 1d63258388 add: 'hf 14b raw' - added -t timeout option. see https://github.com/RfidResearchGroup/proxmark3/issues/125 2019-03-12 14:41:23 +01:00
Philippe Teuwen 0373696662 make style 2019-03-10 00:00:59 +01:00
Philippe Teuwen 9502b54aa0 include: fix mix of spaces & tabs 2019-03-09 18:41:30 +01:00
Philippe Teuwen 60f292b18e remove spurious spaces & tabs at end of lines 2019-03-09 08:59:13 +01:00
merlokk 3b21b17509 move mifare stuff to its folder 2019-02-21 19:15:46 +02:00
merlokk cf21f046d8 arm side 2019-01-30 18:15:47 +02:00
merlokk 1b3d96ab2d add apdu chaining to arm side 2019-01-29 19:30:15 +02:00
merlokk f32088e25c fix states and get rid of INS code in receive (that code checks by controller) 2018-12-18 14:33:28 +02:00
merlokk 1941b9ca8b sdd sc raw t0 2018-12-17 23:48:05 +02:00
Chris 73230c8d15 chg: 'trace list 7816' - missing command
chg: 'sc raw' - inverted select logic
2018-11-13 22:29:33 +01:00
Chris 714de99f82 chg: i2c fixes. all working.
chg: 'sc info'  now prints url to atr decoder.
chg: 'sc reader' has more options  A, S
2018-07-09 11:22:51 +02:00
Chris fca841122f chg: 'sc reader' - hooked up atr. 2018-07-05 16:32:10 +02:00
Chris 5a22a72e9c chg: some preparations for iso15 refactor 2018-06-23 06:37:08 +02:00
iceman1001 b06579e0d5 chg: 'hf felica reader' the felica_select_card struct got more properties 2018-01-30 03:32:33 +01:00
iceman1001 29c15b3480 cHG.. missing 2018-01-29 13:48:18 +01:00
iceman1001 a4b4a1a9a2 FIX: iso-14443a RATS optional (piwi) 2017-10-01 22:06:06 +02:00
iceman1001 a8569849d6 part of monstermerge.. 2017-07-27 20:58:59 +02:00
iceman1001 99136c6eef CHG: finalized the merge between peter filmoores 14atagfuzz branch (emv). I seriously doubt anything works. 2017-03-01 21:51:23 +01:00
iceman1001 84bdbc1917 FIX: 'hf 14a sim x' - adjusted and shows messages when verbose.
FIX: 'hf mf sim x i' - same as above.

In general we only use Moebius attack for "sim x",  that means a clean up on device side code. simpler to understand. It still tries to gather 8 different collections of nonces combo. When one is complete, it get sent to client which runs moebius direct.
2017-01-29 23:09:23 +01:00
iceman1001 bf5d7992ce ADD: @micolous random nonce, adjusted to fit in. Icemanfork only uses Moebius attack, so no need for an extra parameter in client.
ref: https://github.com/Proxmark/proxmark3/pull/209
2017-01-26 14:21:51 +01:00
iceman1001 e7470660c2 ADD: added the nonce_struct needed for @marshmellow42 's enhanced "sim x" attack. 2016-07-07 02:14:03 +02:00