Commit graph

936 commits

Author SHA1 Message Date
iceman1001 f78ec337ef adapt device side non-printing 2022-07-30 10:07:05 +02:00
iceman1001 834023b132 add a pwd to ntag215 sim if empty 2022-07-30 10:03:51 +02:00
nvx e2fe92ee3d Fix gallagher desfire kdf for default application card master key 2022-07-20 17:49:51 +10:00
iceman1001 372ab2af98 style 2022-06-12 11:51:50 +02:00
Doridian 83943aafc8 and done 2022-06-11 16:16:56 -07:00
iceman1001 652affbfb1 rework start screen to be shorter 2022-02-26 17:17:14 +01:00
Philippe Teuwen bbf49ab560 Add a fingerprint of the ARM OS source files to detect when a client expects another ARM image 2022-02-17 01:43:39 +01:00
Philippe Teuwen d0526d3ba9 Remove mkversion.pl 2022-02-17 01:43:00 +01:00
Philippe Teuwen 623169fe02 fix some CodeQL warnings 2022-02-16 20:28:38 +01:00
iceman1001 0f6061c16f remove debug message 2022-02-11 22:12:46 +01:00
iceman1001 22c1078b85 added pwd generator for NTAG tools. md5 of uid 2022-01-29 16:57:31 +01:00
Philippe Teuwen 140a7f34a4 make style 2022-01-23 20:02:57 +01:00
iceman1001 b9bc5f7a38 fix xiaomi pack algo 2022-01-23 14:38:42 +01:00
iceman1001 0587845c56 added another pwdgen algo 2022-01-23 01:32:14 +01:00
Matt Moran a6280e2978 Merge remote-tracking branch 'upstream/master' into feat/hf-gallagher-remove-aid-limits 2022-01-15 12:11:12 +13:00
iceman1001 1731695483 Revert "Release v4.14831 - Frostbit"
This reverts commit 0b65f2bc9e.
2022-01-11 19:17:19 +01:00
iceman1001 0b65f2bc9e Release v4.14831 - Frostbit 2022-01-11 19:17:19 +01:00
Philippe Teuwen 5a4584358c make style 2022-01-09 14:10:26 +01:00
iceman1001 0942ce7a68 refactory parity files a bit 2022-01-09 13:34:54 +01:00
iceman1001 fe9348768d use calloc instead 2022-01-09 00:33:33 +01:00
Philippe Teuwen 30aa7aa7d1 Adapting license headers, WIP 2022-01-08 00:40:52 +01:00
iceman1001 89a05b47a8 cppcheck fixes const 2022-01-07 19:31:19 +01:00
Matt Moran 69049a6621 Remove incorrect AID validation 2022-01-07 19:31:36 +13:00
iceman1001 6bb301f4da cppcheck fixes for const 2022-01-06 23:07:47 +01:00
iceman1001 869ae27f35 cppcheck 2022-01-06 22:11:57 +01:00
iceman1001 7efd02b6e0 cppcheck fixes 2022-01-06 22:08:28 +01:00
iceman1001 deb48d2311 cppcheck fix const 2022-01-06 21:53:39 +01:00
iceman1001 05576ba06b cppcheck fixes 2022-01-06 21:00:16 +01:00
Philippe Teuwen e618fbcd28 typo 2022-01-06 20:14:58 +01:00
iceman1001 e1bcbd8159 select card before trying to send apdu, makes the pm3 not get stuck 2022-01-03 22:09:42 +01:00
iceman1001 0bad12fcac cppcheck 2022-01-01 17:45:43 +01:00
Philippe Teuwen eb3c48cd25 make style 2021-12-30 12:41:23 +01:00
Philippe Teuwen 85def31a8d hitag1/S trace: add crc check
Example:

[usb] pm3 --> trace load -f traces/lf_HitagS256_dump.trace
[+] loaded 272 bytes from binary file traces/lf_HitagS256_dump.trace
[+] Recorded Activity (TraceLen = 272 bytes)
[?] try `trace list -1 -t ...` to view trace.  Remember the `-1` param
[usb] pm3 --> trace list -t hitags -c
[=] downloading tracelog data from device
[+] Recorded activity (trace len = 272 bytes)
[=] start = start of start frame end = end of frame. src = source of transfer
[=] Hitag1 / Hitag2 / HitagS - Timings in ETU (8us)

      Start |        End | Src | Data (! denotes parity error)                                           | CRC | Annotation
------------+------------+-----+-------------------------------------------------------------------------+-----+--------------------
          0 |          0 | Rdr |18(5)                                                                    |     |
        117 |        117 | Tag |21  a5  b4 [73]                                                          | !crc|
          0 |          0 | Rdr |00(5) 21  a5  b4  73 [8c]                                                |  ok |
        117 |        117 | Tag |c9  00  00  aa [75]                                                      |  ok |
          0 |          0 | Rdr |0c(4) 00 [ab]                                                            |  ok |
        117 |        117 | Tag |21  a5  b4  73 [53]                                                      |  ok |
          0 |          0 | Rdr |0c(4) 01 [b6]                                                            |  ok |
        117 |        117 | Tag |c9  00  00  aa [75]                                                      |  ok |
          0 |          0 | Rdr |0c(4) 02 [91]                                                            |  ok |
        117 |        117 | Tag |48  54  4f  4e [2c]                                                      |  ok |
          0 |          0 | Rdr |0c(4) 03 [8c]                                                            |  ok |
        117 |        117 | Tag |4d  49  4b  52 [1e]                                                      |  ok |
          0 |          0 | Rdr |0c(4) 04 [df]                                                            |  ok |
        117 |        117 | Tag |00  00  00  00 [a6]                                                      |  ok |
          0 |          0 | Rdr |0c(4) 05 [c2]                                                            |  ok |
        117 |        117 | Tag |00  00  00  00 [a6]                                                      |  ok |
          0 |          0 | Rdr |0c(4) 06 [e5]                                                            |  ok |
        118 |        118 | Tag |00  00  00  00 [a6]                                                      |  ok |
          0 |          0 | Rdr |0c(4) 07 [f8]                                                            |  ok |
        118 |        118 | Tag |57  5f  4f  4b [88]                                                      |  ok |
          0 |          0 | Rdr |0c(4) 08 [43]                                                            |  ok |
2021-12-30 01:46:41 +01:00
Philippe Teuwen 62a9f5dcc2 make style 2021-12-29 16:28:50 +01:00
iceman1001 0d38da5de2 make style 2021-12-27 19:36:42 +01:00
iceman1001 2837cfa64f make crc8 hitag1 / zx fct 2021-12-27 17:43:00 +01:00
Philippe Teuwen 17b369cc52 Backport mbedtls fix for gcc 11.1 2021-12-18 23:42:25 +01:00
iceman1001 644da79a50 add legic crc16 to lua 2021-10-23 23:53:59 +02:00
Philippe Teuwen 88308ea727 typos 2021-10-10 01:35:45 +02:00
iceman1001 d3696ee2c3 Revert "Release v4.14434 - crimson"
This reverts commit 2c4c676db2.
2021-09-18 21:44:56 +02:00
iceman1001 2c4c676db2 Release v4.14434 - crimson 2021-09-18 21:44:55 +02:00
Philippe Teuwen 3cadd2906e Fix clang-13 warnings about unused variables 2021-08-25 10:10:46 +02:00
Philippe Teuwen 8280fc3c07 rename global version_information and its struct type 2021-08-21 20:11:22 +02:00
Philippe Teuwen d88c98a786 Reduce scope of a number of globals:
APDUInFramingEnable atsFSC uid_label_map apdu_in_framing_enable uidmapping KENC_type KMAC_type jpeg_header jpeg2k_header *card_types card_app2_limit iclass_config_types jooks jooks_figures nfc_secret desdefaultkeys aesdefaultkeys k3kdefaultkeys CardAddresses default_3des_keys default_pwd_pack UL_TYPES_ARRAY UL_MEMORY_ARRAY fdxbCountryMapping translateTable invTranslateTable preamble paradox_lut pcf7931_config config DiArray FiArray FArray crc64_table signalprop
2021-08-21 19:56:07 +02:00
Philippe Teuwen ce57637c80 rename globals GraphTraceLen OddByteParity pm3_capabilities 2021-08-21 17:53:54 +02:00
Philippe Teuwen ee22a824ce Add support for Electra demodulation 2021-08-04 15:11:30 +02:00
merlokk 8db2325b13 move byte operations to commonutils 2021-07-25 20:03:15 +03:00
iceman1001 e5fc1d83b2 use partiy.h and textual 2021-07-14 15:01:01 +02:00
iceman1001 f0c1665427 Revert "Release v4.13441 - midsummer"
This reverts commit 55e1b6714b.
2021-06-25 23:39:10 +02:00
iceman1001 55e1b6714b Release v4.13441 - midsummer 2021-06-25 23:39:10 +02:00
Philippe Teuwen 9a00ad0230 rename version.c into version_pm3.c to avoid clash with mbedtls and other future clashes 2021-05-21 00:15:20 +02:00
Philippe Teuwen eee13d9eb0 mbedtls: disable timing, unused and needs tuning on ProxSpace 2021-05-14 14:07:59 +02:00
Philippe Teuwen cd5f9e9b5f mbedtls: remove inline on mpi fcts to avoid warning:
call is unlikely and code size would grow [-Werror=inline]
2021-05-14 14:07:59 +02:00
Philippe Teuwen 9d8fd0f2bb mbedtls: stack warning fix, cf 17bce5fb5a 2021-05-14 14:07:59 +02:00
Philippe Teuwen ec8ec893c6 mbedtls: memset, cf 996ed197fb 2021-05-14 14:07:59 +02:00
Philippe Teuwen 07a62da2d9 mbedtls: add secp128r1, cf 996ed197fb 2021-05-14 14:07:59 +02:00
Philippe Teuwen 463d19773b mbedtls: port previous config 2021-05-14 14:07:59 +02:00
Philippe Teuwen b1d6eaf2f7 mbedtls: make style 2021-05-14 14:07:59 +02:00
Philippe Teuwen 6324e2e746 mbedtls 2.26.0 2021-05-14 14:07:59 +02:00
Philippe Teuwen 62c310f750 fix gcc 11.1 warning on mbedtls 2021-05-13 20:42:47 +02:00
iceman1001 7cd278290a fix cppchecker 2021-05-07 13:42:57 +02:00
iceman1001 f2b3f2d632 fix cppchecker 2021-05-07 13:37:22 +02:00
iceman1001 73aade314d fix cppchecker 2021-05-07 13:34:23 +02:00
iceman1001 e41708f3ea fix cppchecker 2021-05-07 12:37:35 +02:00
iceman1001 0eddd72025 fix cppcheck warnings 2021-05-07 11:13:56 +02:00
iceman1001 305903c513 rework ISO15693 defines, removing duplicates 2021-05-03 09:35:38 +02:00
iceman1001 58d8fa0e3b style 2021-04-27 19:16:21 +02:00
iceman1001 15d14f8259 clang... 2021-04-17 13:16:39 +02:00
iceman1001 27184d7f5b style 2021-04-08 10:44:31 +02:00
iceman1001 8a05a4d1d7 smart raw - now use NG.\nhf iclass config - added more support for keyrollning (WIP)\n 2021-04-08 09:34:11 +02:00
iceman1001 d19da982f0 looping for smart card, inverted the silent to verbose, updated cardhelper stuff 2021-04-04 17:01:43 +02:00
iceman1001 a9aea6c726 fix in nr demodulation , which fixes a crash in "lf em 4x05 info" 2021-04-04 07:48:53 +02:00
iceman1001 4620c0b21e cppchecker fixes 2021-02-23 23:00:29 +01:00
iceman1001 602c9d1542 added some default generators 2021-02-20 13:04:58 +01:00
iceman1001 17bce5fb5a stack warning fix, dont like to fiddle with mbedtls but all our tests works.. 2021-02-19 13:42:15 +01:00
DarkMatterMatt a4da1476b6 Fix Gallagher data decoding & CRC checks
Descramble function was re-scrambling the data
Skip constant magic prefix `7FEA` to get correct data to decode
Fix offsets & bitmasks to correctly decode card and region codes
Fix CRC refin & refout parameters (both now false)
2021-02-10 15:47:14 +13:00
Anže Jenšterle cd36770c5e
make style 2021-02-09 16:56:55 +01:00
iceman1001 63739b25d3 started to add touch nd go keygen algo from metrodroid 2021-02-04 22:02:07 +01:00
iceman1001 c50c0f1630 cppchecker fix, removed odd loop 2021-01-29 19:28:13 +01:00
iceman1001 4320486a3b cppchecker fixes 2021-01-29 19:04:35 +01:00
iceman1001 3f370438e5 cppchecker noticed ct vs pt is swapped. Question is where was the error introduced? pt (plaintext) ct (cryptotext) 2021-01-29 18:59:50 +01:00
iceman1001 84bc138841 cppchecker fix - might be called with UID == NULL 2021-01-28 12:46:26 +01:00
iceman1001 02c1034caa fix #1175 - biphase demod identification of value clocks now fails if no changes detected 2021-01-28 00:35:14 +01:00
iceman1001 3f4a98901d analyze nuid - now uses cliparser, and refactored to generators 2021-01-09 11:43:49 +01:00
Philippe Teuwen 7cd80611d3 #makestyleday 2020-12-12 14:46:40 +01:00
cyberpunk-re 7a3faa7de8 fix parsing for psk 2020-12-11 00:17:51 +00:00
tharexde 8a1558757c Merge branch 'master' into allin
update 201110
2020-11-10 00:47:13 +01:00
iceman1001 eec3bc595b coverity warning 2020-11-09 10:48:37 +01:00
tharexde 836ca5da40 Merge branch 'master' into allin
update 201101
2020-11-01 22:57:07 +01:00
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
tharexde 3ce365ee2b Merge branch 'master' into allin
update
2020-10-26 00:31:27 +01:00
Philippe Teuwen 18a6d3e92a typos 2020-10-23 01:24:58 +02:00
tharexde 069018e72a Merge branch 'master' into allin
update
2020-10-22 01:01:59 +02:00
Philippe Teuwen 76701af8a7 Make clear current FDX in Pm3 is FDX-B only 2020-10-11 22:38:52 +02:00
Philippe Teuwen 3eea2e20bb askdemod_ext: update startIdx in case of weak demodulation too 2020-10-07 22:50:22 +02:00
Philippe Teuwen 3f9ddf9b29 make style 2020-10-06 18:41:15 +02:00
Philippe Teuwen 6fc6517ccb LZ4: silent AddressSanitizer false positive? int8_t x = 0; <= writing 2 bytes?? 2020-10-06 18:01:05 +02:00
Philippe Teuwen 02d861d304 skip address read oob in lz4 for now 2020-10-06 17:44:44 +02:00
Philippe Teuwen b073a1df65 apply our patch on latest lz4 2020-10-06 17:43:55 +02:00
iceman1001 e9480b8e69 update lz4 from repo 2020-10-06 17:43:49 +02:00