hf mf supercard - UID write on super card generation 2

The gen2 branch refused `-u` with "Not supported on this card". These
cards do take a UID write: a five command knock, the new UID one byte
per command (always seven commands, zero padded), then a HLTA which
commits it. The card answers the halt instead of staying silent, and
without it everything before is discarded when the field drops - which
is why the sequence is absent from the vendor app, whose HLTA is emitted
by the Android NFC stack on teardown.

The new UID must match the card's current UID length, the parts are
physically 4b or 7b. Outcome is decided by re-selecting and comparing
the UID, not by the status byte.

Verified on a 4 byte card. The 7 byte path is inferred from the sequence
always carrying seven UID bytes and is untested.

A refused -r / -u now returns an error instead of PM3_SUCCESS.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Mykhailo ShevchukandClaude Opus 5 committed 2026-11-05 16:05:13 +02:00
1 parent 1b71dfbbd4
commit c2f83fc314
4 files changed
+235 -9

No files matched your search

+2 -2
View File
@@ -7102,7 +7102,7 @@
"options": [
"-h, --help This help",
"-r, --reset Reset card",
"-u, --uid <hex> New UID (4 hex bytes)",
"-u, --uid <hex> New UID (4 hex bytes, or 7 on generation 2)",
"--furui Furui detection card"
],
"usage": "hf mf supercard [-hr] [-u <hex>] [--furui]"
@@ -16812,6 +16812,6 @@
"metadata": {
"commands_extracted": 936,
"extracted_by": "PM3Help2JSON v1.00",
"extracted_on": "2026-10-23T22:15:17+00:00"
"extracted_on": "2026-11-05T11:51:27+00:00"
}
}
+36
View File
@@ -1698,6 +1698,39 @@ CF <passwd> CE <1b block number> // Backdoor read 16b block
CF <passwd> FE <4b new_password> // Change password
```
UID write without the Gen4 backdoor, all frames raw ISO14443-A with CRC, in one field session
after a normal anticollision + select:
```
30 F3 // knock, 5 commands
30 2A
30 BD
30 EF
30 01
30 <uid[0]> // new UID, one byte per command
30 <uid[1]> // always 7 commands, zero padded for a 4b UID
...
50 00 // HLTA, commits the write
```
Every command is answered with 16 bytes plus CRC: status byte, the echoed argument, the CRC of
the command frame the reader sent, then 12 bytes constant for the session. Status is `11` while
accepting commands and `22` on the halt.
```
Rdr |30 5D 62 21|
Tag |11 5D 62 21 6000720F 8CB1A65B E3553815|+crc
Rdr |50 00 57 CD|
Tag |22 00 57 CD 6000720F 8CB1A65B E3553815|+crc
```
The halt is the commit. A compliant tag stays silent on HLTA, this one answers, and without it
the card discards everything above when the field drops. Afterwards the card is busy writing:
the next WUPA gets no answer and the one after that returns the new UID, so allow ~150ms and
more than one activation attempt.
The UID length can't be changed, the parts are physically 4b or 7b.
### MIFARE Classic Super Furui
^[Top](#top)
@@ -1764,6 +1797,9 @@ hf mf info
[usb] pm3 --> hf mf supercard --furui
...
[usb] pm3 --> hf mf supercard -u 11223344
...
```
# MIFARE Ultralight