@@ -305,19 +305,43 @@ DF_ENCMODE=AES:CBC
305
305
The next PM3 commands are known to work with the Chameleon DESFire tag emulation (using both the RDV4 and Easy device types).
306
306
The sample outputs obtained running the `` pm3 `` command line utility below may vary by usage and proximity to the PM3 hardware.
307
307
308
- #### PM3 logging and debugging setup script
308
+ #### PM3 logging and debugging setup script (run this first)
309
309
310
310
``` bash
311
311
hw dbg -4
312
312
prefs set clientdebug --full
313
313
data setdebugmode -2
314
314
```
315
315
316
+ #### Listing initial tag response
317
+
318
+ ``` bash
319
+ [usb] pm3 --> hf mfdes list
320
+ [= ] downloading tracelog data from device
321
+ [+] Recorded activity (trace len = 146 bytes)
322
+ [= ] start = start of start frame end = end of frame. src = source of transfer
323
+ [= ] ISO14443A - all times are in carrier periods (1/13.56MHz)
324
+
325
+ Start | End | Src | Data (! denotes parity error) | CRC | Annotation
326
+ ------------+------------+-----+-------------------------------------------------------------------------+-----+--------------------
327
+ 0 | 992 | Rdr | 52 | | WUPA
328
+ 2116 | 4484 | Tag | 44 03 | |
329
+ 7040 | 9504 | Rdr | 93 20 | | ANTICOLL
330
+ 10820 | 16708 | Tag | 88 41 92 a0 fb | |
331
+ 19328 | 29856 | Rdr | 93 70 88 41 92 a0 fb 87 d9 | ok | SELECT_UID
332
+ 30916 | 34436 | Tag | 24 d8 36 | |
333
+ 35840 | 38304 | Rdr | 95 20 | | ANTICOLL-2
334
+ 39364 | 45188 | Tag | b2 59 78 41 d2 | |
335
+ 47872 | 58336 | Rdr | 95 70 b2 59 78 41 d2 13 09 | ok | SELECT_UID-2
336
+ 59844 | 63428 | Tag | 20 fc 70 | |
337
+ 65152 | 69920 | Rdr | e0 80 31 73 | ok | RATS
338
+ ```
339
+
316
340
#### Getting a summary of tag information
317
341
318
342
The output of this command will change significantly if the header and
319
343
manufacturer bytes are changed using the Chameleon terminal commands above.
320
- The tag type reeported will also vary depending on which EV0/EV1/EV2 generation of the
344
+ The tag type reported will also vary depending on which EV0/EV1/EV2 generation of the
321
345
DESFire configuration is used:
322
346
``` bash
323
347
[usb] pm3 --> hf mfdes info
@@ -327,14 +351,14 @@ DESFire configuration is used:
327
351
[# ] [WCMD <--: : 08/08] 03 90 af 00 00 00 1f 15
328
352
[# ] pcb_blocknum 0 == 2
329
353
[# ] [WCMD <--: : 08/08] 02 90 af 00 00 00 34 11
330
- [# ] halt warning. response len: 3
354
+ [# ] halt warning. response len: 2
331
355
[# ] Halt error
332
356
[# ] switch_off
333
357
334
358
[= ] ---------------------------------- Tag Information ----------------------------------
335
- [+] UID: F9 D8 1E 14 DF 86 F9
336
- [+] Batch number: DF 86 5B A9 D0
337
- [+] Production date: week 6b / 208e
359
+ [+] UID: 94 76 F1 48 2C 58 94
360
+ [+] Batch number: 2C 58 0F EC 2C
361
+ [+] Production date: week dc / 20f1
338
362
339
363
[= ] --- Hardware Information
340
364
[= ] raw: 04010100011805
@@ -346,28 +370,34 @@ DESFire configuration is used:
346
370
[= ] Protocol: 0x05 ( ISO 14443-2, 14443-3 )
347
371
348
372
[= ] --- Software Information
349
- [= ] raw: C8D70200008000
373
+ [= ] raw: 90AF0401010001
350
374
[= ] Vendor Id: no tag-info available
351
- [= ] Type: 0xD7
352
- [= ] Subtype: 0x02
353
- [= ] Version: 0.0
354
- [= ] Storage size: 0x80 ( 1 bytes )
355
- [= ] Protocol: 0x00 ( Unknown )
375
+ [= ] Type: 0xAF
376
+ [= ] Subtype: 0x04
377
+ [= ] Version: 1.1
378
+ [= ] Storage size: 0x00 ( 1 bytes )
379
+ [= ] Protocol: 0x01 ( Unknown )
356
380
357
381
[= ] --------------------------------- Card capabilities ---------------------------------
358
- [# ] error DESFIRESendRaw Current configuration/status does not allow the requested command
359
- [# ] error DESFIRESendApdu Current configuration/status does not allow the requested command
360
- [# ] error DESFIRESendApdu Command code not supported
361
382
[# ] error DESFIRESendApdu Command code not supported
362
383
[+] ------------------------------------ PICC level -------------------------------------
363
384
[+] Applications count: 0 free memory n/a
364
385
[+] PICC level auth commands:
365
- [+] Auth.............. YES
386
+ [+] Auth.............. NO
366
387
[+] Auth ISO.......... YES
367
- [+] Auth AES.......... NO
388
+ [+] Auth AES.......... YES
368
389
[+] Auth Ev2.......... NO
369
390
[+] Auth ISO Native... NO
370
391
[+] Auth LRP.......... NO
392
+ [+] PICC level rights:
393
+ [+] [1...] CMK Configuration changeable : YES
394
+ [+] [.1..] CMK required for create/delete : NO
395
+ [+] [..1.] Directory list access with CMK : NO
396
+ [+] [...1] CMK is changeable : YES
397
+ [+]
398
+ [+] Key: 2TDEA
399
+ [+] key count: 1
400
+ [+] PICC key 0 version: 0 (0x00)
371
401
372
402
[= ] --- Free memory
373
403
[+] Card doesn' t support ' free mem' cmd
@@ -402,6 +432,35 @@ DESFire configuration is used:
402
432
[+] Setting ISODEP -> inactive
403
433
```
404
434
435
+ #### AES (128-bit) authentication with the PICC and PICC master key
436
+
437
+ ```bash
438
+ [usb] pm3 --> hf mfdes auth -n 0 -t aes -k 00000000000000000000000000000000 -v -c native -a
439
+ [=] Key num: 0 Key algo: aes Key[16]: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
440
+ [=] Secure channel: n/a Command set: native Communication mode: plain
441
+ [+] Setting ISODEP -> inactive
442
+ [+] Setting ISODEP -> NFC-A
443
+ [=] AID 000000 is selected
444
+ [=] Auth: cmd: 0xaa keynum: 0x00
445
+ [+] raw>> AA 00
446
+ [+] raw<< AF EA 8C 8F 55 42 BB 7B 81 7C 26 44 EC EC 73 85 AB 8B AF
447
+ [#] encRndB: EA 8C 8F 55 42 BB 7B 81
448
+ [#] RndB: CA FE BA BE 00 11 22 33
449
+ [#] rotRndB: FE BA BE 00 11 22 33 CA FE BA BE 00 11 22 33 CA
450
+ [#] Both : 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 FE BA BE 00 11 22 33 CA FE BA BE 00 11 22 33 CA
451
+ [+] raw>> AF 04 25 9E 8B C4 49 26 DD 5D 9F 1E 84 1F 2F 13 E4 F1 BD 8E 58 72 AD A6 29 D3 CC 93 91 52 99 BC 71
452
+ [+] raw<< 00 59 2D 75 D8 BE 6A 4B C1 25 E9 9D 95 D4 B1 B0 D2 D1 5D
453
+ [=] Session key : 01 02 03 04 CA FE BA BE 13 14 15 16 00 11 22 33
454
+ [=] Desfire authenticated
455
+ [+] PICC selected and authenticated succesfully
456
+ [+] Context:
457
+ [=] Key num: 0 Key algo: aes Key[16]: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
458
+ [=] Secure channel: ev1 Command set: native Communication mode: plain
459
+ [=] Session key [16]: 01 02 03 04 CA FE BA BE 13 14 15 16 00 11 22 33
460
+ [=] IV [16]: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
461
+ [+] Setting ISODEP -> inactive
462
+ ```
463
+
405
464
### Compatibility with external USB readers and LibNFC
406
465
407
466
The DESFire configurations are known to work with the anticollision and RATS handshaking utility ``nfc-anticol``
0 commit comments