Closed ikarus23 closed 7 years ago
More information:
hf legic info
of the "official" PM3 repository displays different information (maybe some length fields are interpreted in a different way?)This issue is already known from the PM3 forum: http://www.proxmark.org/forum/viewtopic.php?id=3889
Something might be broken in the decoding. At least in my sample all the B7
are actually 00
bytes. Also, the length and the CRC of segment 02 are wrong. And there should be 5 segments...
yeah, the info command doesnt work yet, see thread for reasons, but the main problem was a way of identifying the tag to know how much memory should be allocated on client. This command can be fixed with some attention
@ikarus23 will you fix this one? Looking forward for a PR
I will look into it. But no promises.
for this command to work, it need to get the current tagtype, you know how large tagmemory the info command needs to reserve and iterate. thats why I started the hf legic reader that usbcmd should return a usbcmd with tagtype. So hf legic info needs to call this one first.
then if you want an offline mode (ie load a tag dump) , it can be based on filesize. With this piece of information you have all you need to fix the loops inside hf legic info for it not to crash anymore.
Ok, here is something else broken. I think it's hf legic reader
. The "official" repository reads segment 0 of the tag as follows:
Segment 00: raw header=16 40 0a 30, flag=4 (valid=1, last=0), len=0022, WRP=10, WRC=03, RD=0, CRC=af
WRC protected area:
fb 0a 01
Remaining write protected area:
02 02 00 67 58 01 6d
Remaining segment payload:
00 00 00 00 00 00 00
As far as I can tell, this is correct. The "iceman-fork" decodes the data as
Segment 01
raw header | 0x16 0x40 0x0A 0x30
Segment len: 22, Flag: 0x4 (valid:1, last:0), WRP: 10, WRC: 03, RD: 0, CRC: 0xAF (OK)
WRC protected area: (I 27 | K 0| WRC 3)
row | data
-----+------------------------------------------------
[00] | FB 0A 01
Remaining write protected area: (I 30 | K 30 | WRC 3 | WRP 10 WRP_LEN 7)
row | data
-----+------------------------------------------------
[00] | 02 02 00 67 CE CE CE
Remaining segment payload: (I 37 | K 37 | Remain LEN 7)
row | data
-----+------------------------------------------------
[00] | CE CE CE CE CE CE CE
-----+------------------------------------------------
It seams the decoding breaks in the middle of "Remaining write protected area". However, at a first glimpse, I can't see any error in the decoding code. Therefore I believe the hf legic reader
must be broken somewhere.
hf legic reader works as it should. hf legic info only reads 22 bytes of data, but downloads 1024bytes. I'll push some fixes for it soon.
I have fixed the problems, it was how device EML was used and not being downloaded as it should.
Thanks. Could you push the fix to the master?
this one should be fixed now.
closing.
The client (and/or the PM3?) crashes on executing
hf legic info
: (Some data has been replaced by XX for privacy reasons)