Files
proxmark3/tools
iceman1001andClaude Opus 5 (1M context) 3b078f2c57 pm3_online_tests: make desfire_value gate the communication mode
The six plain/mac assertion pairs differed only by -m, and the file they ran
against was created with no --amode and no --rawrights - so plain mode, free
access. Free access is served in plain whatever the file says, and the client
derives the mode from the file settings rather than from -m, so both halves of
every pair sent the same bytes:

  --op credit -m mac    ->  90 0C 00 00 05 02 0A 00 00 00 00
  --op credit -m plain  ->  90 0C 00 00 05 02 0A 00 00 00 00

They passed on a client that could not do MAC mode at all, which is how
e1598cd62 shipped: it had removed CREDIT/DEBIT/LIMITED_CREDIT from
EV1D40TransmitMAC, and this suite stayed green.

Build a fixture that makes the client answer a different question per file
instead, and drop the -m flags, since deriving the mode is the thing under
test:

  data  00  mac      EEEE   free access, MACed file
  data  01  mac      0000   key protected
  data  02  encrypt  EEEE   free access, enciphered file
  data  03  encrypt  0000   key protected
  value 10  mac      00E0   credit plain, debit MAC, same file
  value 11  mac      0000   key protected
  value 12  plain    EEEE   the original case
  value 13  encrypt  0000   plus FreeValue, so GetValue is plain

File 10 is the one worth having: credit is granted by read & write only, which
is free there, while debit is also granted by the write right, which is key 0.
A single communication mode for the whole file cannot satisfy both.

Also dump the application. It has no ISO file ids, so the client's
GetISOFileIDs probe is refused and the PICC ends the session on it; a dump
that does not notice reads the first file's plain content as a response CMAC
and reports it as no data.

Checked against a client built at 08e389c0b, before the three fixes: the free
access data writes fail -20, the MACed value credit fails -20, and the dump
loses file 00. The 00E0 and FreeValue cases pass there too - they guard the
derivation against future regressions rather than reproducing an old bug.

Co-Authored-By: Claude Opus 5 (1M context)
2026-09-13 00:04:38 +02:00
..
2023-05-27 17:00:28 +02:00
2026-08-19 19:28:17 +02:00
2026-07-15 16:39:15 +02:00
2026-06-07 23:01:20 +02:00
2022-12-31 10:03:17 +01:00
2025-04-29 11:33:22 -04:00
2026-08-29 17:15:52 +02:00
2021-10-06 20:06:17 +02:00
2024-01-07 18:05:48 +01:00
2022-02-13 12:19:06 +01:00
2021-10-06 20:27:55 +02:00
2026-09-03 19:31:56 +02:00
2023-10-15 10:11:27 +02:00
2021-10-06 20:27:55 +02:00
2021-10-06 20:27:55 +02:00
2024-09-13 13:44:16 +02:00
2021-10-06 20:27:55 +02:00
2026-03-23 22:36:47 +01:00