Commit Graph

11874 Commits

Author SHA1 Message Date
iceman1001 ba8a68f37c fixes entering bootload messages to be less scary 2024-09-10 14:29:47 +02:00
Philippe Teuwen 0a22929eac Fix buffer overflow
Strangely only detected by Ubuntu 18.4 gcc 7.5.0

```
[-] CC src/cmdhflist.c
In file included from /usr/include/string.h:494:0,
                 from src/cmdhfict.c:21:
In function 'memcpy',
    inlined from 'diversify_mifare_key' at src/cmdhfict.c:151:5,
    inlined from 'derive_mifare_key' at src/cmdhfict.c:189:5,
    inlined from 'CmdHfIctReader' at src/cmdhfict.c:199:12:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:34:10: error: '__builtin___memcpy_chk' writing 8 bytes into a region of size 6 overflows the destination [-Werror=stringop-overflow=]
   return __builtin___memcpy_chk (__dest, __src, __len, __bos0 (__dest));
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'memcpy',
    inlined from 'diversify_mifare_key' at src/cmdhfict.c:151:5,
    inlined from 'derive_mifare_key' at src/cmdhfict.c:189:5,
    inlined from 'CmdHfIctReader' at src/cmdhfict.c:203:12:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:34:10: error: '__builtin___memcpy_chk' writing 8 bytes into a region of size 6 overflows the destination [-Werror=stringop-overflow=]
   return __builtin___memcpy_chk (__dest, __src, __len, __bos0 (__dest));
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```

```c
    uint8_t diverse[MIFARE_KEY_SIZE]; // = 6
    diversify_mifare_key(uid, diverse);
```

```c
static int diversify_mifare_key(const uint8_t *uid, uint8_t *app_key) {
...
    uint8_t output[8];
...
    memcpy(app_key, output, sizeof(output));
```
2024-09-10 09:02:46 +02:00
Philippe Teuwen 13cad28d2a fix experimental_client_with_swig cmake tests 2024-09-10 00:09:55 +02:00
Philippe Teuwen b91f7742c1 fix experimental_lib/example_c/test_grab: no fork&pipe needed, use pm3_grabbed_output_get 2024-09-09 23:57:32 +02:00
Philippe Teuwen ce650f472f remove tabs 2024-09-09 23:04:39 +02:00
Antiklesys 3253e2c288 Reverted buggy changes to hf iclass dump
Reverted code back to the original as it would "read" a card's AA1 without the correct keys.
2024-09-09 22:46:49 +08:00
Antiklesys 8e961aaa04 Re-fixed indent 2024-09-09 18:01:02 +08:00
Antiklesys 96b1b6d72c Fixed indent
Fixed indent
2024-09-09 17:58:47 +08:00
Antiklesys 041f6244cb Fixed AA2 dump with Kc only
Fixed issue preventing iclass dump to dump AA2 only when only using Kc
2024-09-09 17:54:57 +08:00
Philippe Teuwen 157af8c31b fm11rf08s script check python version 2024-09-08 15:16:23 +02:00
iceman1001 dd9bc4d363 the select param was handled wrong and it was tested for CRC which will not work. Thanks @RebornBrain for suggesting a fix 2024-09-08 14:25:40 +02:00
Philippe Teuwen 69d7a7e0c3 fm11rf08s: get advanced verification sector keys as well 2024-09-08 11:57:53 +02:00
Philippe Teuwen 846b273583 add fm1208-10 to hf 14a info 2024-09-08 09:58:30 +02:00
iceman1001 e50459b2c5 style 2024-09-06 22:59:23 +02:00
iceman1001 72900d1bf9 fix and style 2024-09-06 22:36:44 +02:00
Philippe Teuwen 715f149413 fm11rf08s script: optimize when default keys 2024-09-06 12:26:13 +02:00
iceman1001 996429fa9e fix some const params 2024-09-06 10:13:02 +02:00
iceman1001 7549f53b63 we use calloc 2024-09-06 10:07:06 +02:00
iceman1001 076bfb2ec5 fix consts 2024-09-06 09:31:07 +02:00
iceman1001 cfd218dd6f fix bad return value 2024-09-06 09:22:38 +02:00
Iceman b77099e195 Merge pull request #2490 from douniwan5788/fix_exit
fix: exit status
2024-09-06 08:53:46 +02:00
Philippe Teuwen 46a8bea230 hf mf info: FM11RF32 detection 2024-09-05 15:32:52 +02:00
douniwan5788 9b879b0dc0 fix: exit status 2024-09-05 19:31:37 +08:00
Marcel Barbulescu 1d5dec3ed3 fix help on lf hitag hts read and lf hitag hts write commands 2024-09-04 20:51:59 -04:00
douniwan5788 740ab6bb33 fix: mfDarkside hangs 2024-09-04 23:28:13 +08:00
douniwan5788 5e9533a792 refactor: mfDarkside error code 2024-09-04 23:28:13 +08:00
douniwan5788 970c2d0999 refactor: remove positive error codes 2024-09-04 22:50:26 +08:00
Philippe Teuwen 17ddc2db82 trying to please codeQL 2024-09-03 23:00:50 +02:00
Philippe Teuwen e6c427fe21 fix bug in fm11rf08s_recovery list of found keys 2024-09-03 18:28:02 +02:00
Philippe Teuwen de86cd85d1 Added support for dumping FM11RF08S data at once 2024-09-03 11:43:57 +02:00
Iceman 258e2892ec Merge pull request #2484 from siowu/master
fm11rf08s_recovery: Specify the encoding as UTF-8 when opening the MFC dictionary file.
2024-09-03 11:37:48 +02:00
Philippe Teuwen c73e2ea623 Added support for collecting all fm11rf08s nT/{nT}/par_err at once 2024-09-02 23:11:36 +02:00
siowu 08fd383713 Specify the encoding as UTF-8 when opening the MFC dictionary file in the Python script. 2024-09-03 02:43:04 +08:00
Philippe Teuwen df1c24c42a typo 2024-09-02 14:47:29 +02:00
Philippe Teuwen a6d0b40fa3 fm11rf08s_recovery: prioritize known keys and estimate total time. Beware options x/y are now inverted:
as running fchk before and after the core script does not make much sense,
now the default is to *not* run fchk. Use -x or -y to reenable the old behavior.
2024-09-02 14:41:08 +02:00
Iceman be7b0ecf69 Merge pull request #2482 from ry4000/master
R&Y: Added PACS CA RBH Access AID to aid_desfire.json
2024-09-02 12:16:09 +02:00
Philippe Teuwen e6c29ce6e0 Merge pull request #2447 from siowu/fix-readline-url
Corrected an incorrect Readline library URL in client CMakeLists.txt
2024-09-02 10:10:38 +02:00
siowu 11006981d6 Corrected an incorrect Readline library URL in client CMakeLists.txt 2024-09-02 13:05:34 +08:00
ry4000 994152a3de R&Y: Added PACS CA RBH Access AID to aid_desfire.json
**Added PACS CA RBH Access Technologies, Inc. AID**
- Based on discussions and screenshots on the Server with another Member.

Signed-off-by: ry4000 <154689120+ry4000@users.noreply.github.com>
2024-09-02 11:27:24 +10:00
Philippe Teuwen 7eb71e0b06 grabber: make sure grabbed_output always return a string 2024-08-31 15:16:45 +02:00
Philippe Teuwen 55cef35b1d grabber: empty buffer after being read, to prevent old buffer to be returned after a command without output 2024-08-31 01:01:51 +02:00
douniwan5788 0710a37429 fix: bitstream_index_map overflow 2024-08-30 16:05:47 +08:00
ry4000 6f7353bfb4 Added SOF Sofia City Card
**Added SOF Sofia City Card**
- *Please note that there is no Bulgarian equivalent name for it; they use the English card name.*

**Updated MAD Public Transport Card**
- *The AID is in an alternative endian, and has been reflected to show this.*

**Various Formatting Updates**
- *`[` and `]` have been replaced in favour of `(` and `)`.*

Signed-off-by: ry4000 <154689120+ry4000@users.noreply.github.com>
2024-08-29 20:43:44 +10:00
iceman1001 7f40ad7f9d style 2024-08-29 12:29:23 +02:00
iceman1001 b5ecdde19e fixes and textual 2024-08-29 12:27:11 +02:00
Lucifer Voeltner ee0f410c27 add static keys for hanoi bus rapid transit system 2024-08-29 00:46:46 +07:00
douniwan5788 4b6653696c fix: CMD_DOWNLOAD_BIGBUF for getSamples() and download_trace() 2024-08-27 23:45:42 +08:00
douniwan5788 112caec054 refactor: lf config renames 2024-08-27 23:45:42 +08:00
Ciprian Ionescu d3f0d7d100 actually fix ELECTRA parsing 2024-08-27 00:36:43 +02:00
Iceman 0e00e6b5ec Merge branch 'master' into electra_decode
Signed-off-by: Iceman <iceman@iuse.se>
2024-08-26 17:24:57 +02:00