RfidResearchGroup / proxmark3

Iceman Fork - Proxmark3
http://www.icedev.se
GNU General Public License v3.0
3.94k stars 1.04k forks source link

`hf 14b dump` incorrect with SRT512 tag #1778

Closed DidierA closed 2 years ago

DidierA commented 2 years ago

Describe the bug hf 14b dump on an STR512 tag dumps incorrect value for bloc 15, shows bloc 16 and 17 that should not exist, and incorrect value for bloc 0xFF. The data in the dump file is incorrect as well.

If I check the trace with hf 14b list, the commands and answers are all correct: blocs 0 to15 and 255 have been read. It seems the dump command does something wrong when dumping bloc 15. If I directly read blocs 15 or 0xFF with hf rdbl -b xx the correct value is returned.

To Reproduce

[usb] pm3 --> hf 14b dump
[+] found a SRT512 tag
[=] reading tag memory from UID D00233677A61D2F7
[=] .................
[+] Unknown tag
[=]  block#  | data         |lck| ascii
[=] ---------+--------------+---+----------
[=]   0/0x00 | 30 E0 40 51  |   | 0.@Q
... (all correct  / expected values for bloc1 to 14)
[=]  15/0x0F | FF FF FF FF  |   | ....         <= wrong
[=]  16/0x10 | 00 00 00 00  |   | ....         <= should not be there, there is no bloc 16
[=]  17/0x11 | 4B 7F 00 00  |   | K...         <= ditto
[=] 255/0xFF | 00 00 00 00  |   | ....         <= wrong
[=] ---------+--------------+---+----------
[usb] pm3 --> hf 14b rdbl -b 15
[+] block 15 : 7C 2B DB 84  | |+..         <= correct
[usb] pm3 --> hf 14b rdbl -b 255
[+] block 255 : FF FF FF FF  | ....         <= correct
[usb] pm3 --> hf 14b rdbl -b 16
[#] [!] expected 6 bytes from tag, got less...
[usb] pm3 --> hf 14b rdbl -b 17
[#] [!] expected 6 bytes from tag, got less...

Expected behavior Blocs 0 to 15, and 255 should be dumped to screen and file.

Desktop (please complete the following information):

(*) Q factor must be measured without tag on the antenna

[+] Displaying LF tuning graph. Divisor 88 (blue) is 134,83 kHz, 95 (red) is 125,00 kHz.

iceman1001 commented 2 years ago

True, 14B still needs more love,
thanks for the PR, I see if I can get it merged today