3 # Notes on Magic Cards, aka UID changeable
5 This document is based mostly on information posted on http://www.proxmark.org/forum/viewtopic.php?pid=35372#p35372
9 * [AN10833 MIFARE Type Identification Procedure](https://www.nxp.com/docs/en/application-note/AN10833.pdf)
13 * [Low frequency](#low-frequency)
16 * [ID82xx series](#id82xx-series)
19 * [ID-F8268](#id-f8268)
20 * [H series](#h-series)
22 * [H5.5 / H7](#h55--h7)
23 * [i57 / i57v2](#i57--i57v2)
24 * [ISO14443A](#iso14443a)
25 * [Identifying broken ISO14443A magic](#identifying-broken-iso14443a-magic)
26 * [MIFARE Classic](#mifare-classic)
27 * [MIFARE Classic block0](#mifare-classic-block0)
28 * [MIFARE Classic Gen1A aka UID](#mifare-classic-gen1a-aka-uid)
29 * [MIFARE Classic Gen1B](#mifare-classic-gen1b)
30 * [Mifare Classic Direct Write OTP](#mifare-classic-direct-write-otp)
31 * [MIFARE Classic OTP 2.0](#mifare-classic-otp-20)
32 * [MIFARE Classic DirectWrite aka Gen2 aka CUID](#mifare-classic-directwrite-aka-gen2-aka-cuid)
33 * [MIFARE Classic Gen3 aka APDU](#mifare-classic-gen3-aka-apdu)
34 * [MIFARE Classic USCUID](#mifare-classic-uscuid)
40 * [MIFARE Classic, other versions](#mifare-classic-other-versions)
41 * [MIFARE Classic Super](#mifare-classic-super)
42 * [MIFARE Ultralight](#mifare-ultralight)
43 * [MIFARE Ultralight blocks 0..2](#mifare-ultralight-blocks-02)
44 * [MIFARE Ultralight Gen1A](#mifare-ultralight-gen1a)
45 * [MIFARE Ultralight DirectWrite](#mifare-ultralight-directwrite)
46 * [MIFARE Ultralight EV1 DirectWrite](#mifare-ultralight-ev1-directwrite)
47 * [MIFARE Ultralight C Gen1A](#mifare-ultralight-c-gen1a)
48 * [MIFARE Ultralight C DirectWrite](#mifare-ultralight-c-directwrite)
49 * [UL series (RU)](#ul-series-ru)
53 * [UL, other chips](#ul-other-chips)
54 * [MIFARE Ultralight USCUID-UL](#mifare-ultralight-uscuid-ul)
56 * [NTAG213 DirectWrite](#ntag213-directwrite)
59 * ["DESFire" APDU, 7b UID](#desfire-apdu-7b-uid)
60 * ["DESFire" APDU, 4b UID](#desfire-apdu-4b-uid)
61 * [ISO14443B](#iso14443b)
62 * [Tiananxin TCOS CPU card](#tiananxin-tcos-cpu-card)
63 * [ISO15693](#iso15693)
64 * [ISO15693 magic](#iso15693-magic)
77 The temic T55xx/Atmel ATA5577 is the most commonly used chip for cloning LF RFIDs.
79 A useful document can be found [here](https://github.com/RfidResearchGroup/proxmark3/blob/master/doc/T5577_Guide.md).
83 * 28/24 bytes of user memory (without/with password)
84 * Universal output settings (data rate, modulation, etc)
85 * Password protection (4 bytes), usually "19920427"
87 * Analog frontend setup
91 * Cut down version of T55xx chip (no analog frontend setup, no test mode support).
93 * Seems to be renamed 5200 chip.
95 * Old variant "T5555" is hard to come across
100 [usb] pm3 --> lf search
102 [+] Chipset detection: T55xx
105 This will **not** work if you have a downlink mode other than fixed bit length!
109 *See ATMEL ATA5577C datasheet for sending commands to chip*
111 * *Do not mix* "password read" and "regular write" commands! You risk potentially writing incorrect data.
112 * When replying, the chip will use the modulation and data rate specified in block 0.
118 The EM4305 and EM4205 (and 4469/4569) chips are the 2nd most common used chips for cloning LF RFIDs.
119 It is also used by HID Global (but with a custom chip) for HIDProx credentials.
123 * 36 bytes of user memory
124 * Output settings are limited (ASK only, FSK added on HID variant)
125 * Password protection (4 bytes), usually "84AC15E2"
134 [usb] pm3 --> lf search
136 [+] Chipset detection: EM4x05 / EM4x69
141 *See EM microelectronic EM4305 datasheet for sending commands to chip*
147 These are custom Chinese chips mainly used to clone EM IDs. Often times, these are redesigned clones of Hitag chips.
153 This is the cheapest and most common ID82xx chip available. It is usually sold as T55xx on AliExpress, with excuses to use cloners.
157 * Chip is likely a cut down version of Hitag μ (micro) clone
158 * UID `00 00 00 00 00 00`
159 * Password protection (4b), usually "00000000"(default) or "9AC4999C"(FURUI)
161 * bit 0-1 -> data rate ’00’... 2kbit/s ’01’... 4kbit/s ’10’... 8kbit/s ’11’... 2kbit/s
162 * bit 2 when set, fixed to MC 2kbit/s
163 * bit 3-6 reversed? all blocks always read without password and write with password
164 * bit 7 -> enable TTF
165 * Currently unimplemented in proxmark3 client
170 * The sales of "H5" have been ceased because "the chip was leaked".
175 [usb] pm3 --> lf cmdread -d 50 -z 116 -o 166 -e W3000 -c W00011 -s 3000
176 [usb] pm3 --> data plot
179 Check the green line of the plot. It must be a straight line at the end with no big waves.
183 *Try NXP Hitag µ datasheet for sending commands to chip*
186 # login with pass 00000000
187 lf cmdread -d 48 -z 112 -o 176 -e W3000 -e S240 -e E336 -s 1024 -c W0S0010100010100000000000000000000000000000000000000000000000000000000000000000000000000000000 -k
189 # write EM4100 Data (EMID 0000000000) to block0 and block1
190 lf cmdread -d 48 -z 112 -o 176 -e W3000 -e S240 -e E336 -s 1024 -c W0S001000010100000000011111111100000000000000000000000 -k
191 lf cmdread -d 48 -z 112 -o 176 -e W3000 -e S240 -e E336 -s 1024 -c W0S001000010101000000000000000000000000000000000000000 -k
193 # write config block 05800000(A0010000 in LSB first)
194 lf cmdread -d 48 -z 112 -o 176 -e W3000 -e S240 -e E336 -s 1024 -c W0S001000010101111111100000101100000000000000000000000
201 This is an "improved" variant of ID82xx chips, bypassing some magic detection in China.
205 * Chip is likely a cut down version of Hitag S2048 clone, Characteristics looks exacly same with [8268](#id-f8268) when set CON1 AUT bit
206 * No password protection
208 * The OTP bits appear to be erased to '1'. Write done time is less than 735µs
212 * bit flip 3250-3350µs
214 * page 1 fully changeable. default: `CA 24 00 00`
215 * CON0 RES0 enable some extended TTFM
216 * TTFM 01: page 4, page 5, page 6
217 * TTFM 10: page 4, page 5, page 6, page 7, page 8
218 * TTFM 11: page 4, page 5, page 6, page 7, page 8, page 9, page 10, page 11
219 * CON0 RES3 enable FSK TTF mode 0=RF/10 1=RF/8
220 * page 41 - 43 unknown data, readonly
221 * page 41 fixed `00 00 20 00`
226 * page 43 fixed `68 06 39 E0`
227 * page 44 - 63 readonly to `00 00 00 00`
232 [usb] pm3 --> lf hitag hts rdbl --count 0
237 *Try NXP Hitag S datasheet for sending commands to chip*
243 This is an "improved" variant of ID82xx chips, bypassing some magic detection in China.
247 * Chip is likely a cut down version of Hitag S2048 clone, Characteristics looks exacly same with [8211](#id8211) when clear CON1 AUT bit
248 * Password protection (4b), usually "BBDD3399"(default) or "AAAAAAAA"
249 * page 1 fully changeable. default: `DA A4 00 00`
250 * CON0 RES0 enable some extended TTFM
251 * TTFM 01: page 4, page 5, page 6
252 * TTFM 10: page 4, page 5, page 6, page 7, page 8
253 * TTFM 11: page 4, page 5, page 6, page 7, page 8, page 9, page 10, page 11
254 * CON0 RES3 enable FSK TTF mode 0=RF/10 1=RF/8
256 * page 41 - 43 unknown data, readonly
257 * page 41 fixed `00 00 20 00`
265 * page 43 fixed `68 04 39 E0`
266 * page 44 - 63 readonly to `00 00 00 00`
267 * auth by write password to page 64 after SELECT
271 * K8678 manufactured by Hyctec.
276 [usb] pm3 --> lf hitag hts rdbl --82xx --count 0
281 *Try NXP Hitag S datasheet for sending commands to chip*
287 These are chips sold in Russia, manufactured by iKey LLC. Often times these are custom.
293 Simplest EM ID cloning chip available. Officially discontinued.
297 * Currently almost all structure is unknown
298 * No locking or password protection
299 * "OTP" chip is same chip, but with EM ID of zeroes. Locked after first write
308 First "advanced" custom chip with H naming.
312 * Currently all structure is unknown
313 * No password protection
314 * Only supported by Russian "TMD"/"RFD" cloners
315 * H7 is advertised to work with "Stroymaster" access control
316 * Setting ID to "3F0096F87E" will make the chip show up like T55xx
320 \[ Chip is discontinued, no info \]
324 ## Identifying broken ISO14443A magic
328 When a magic card configuration is really messed up and the card is not labeled, it may be hard to find out which type of card it is.
330 Here are some tips if the card doesn't react or gives error on a simple `hf 14a reader`:
332 Let's force a 4b UID anticollision and see what happens:
335 hf 14a config --atqa force --bcc ignore --cl2 skip --rats skip
339 It it responds, we know it's a TypeA card. But maybe it's a 7b UID, so let's force a 7b UID anticollision:
342 hf 14a config --atqa force --bcc ignore --cl2 force --cl3 skip --rats skip
346 At this stage, you know if it's a TypeA 4b or 7b card and you can check further on this page how to reconfigure different types of cards.
348 To restore anticollision config of the Proxmark3:
358 Referred as M1, S50 (1k), S70 (4k)
360 ## MIFARE Classic block0
364 UID 4b: (actually NUID as there are no more "unique" IDs on 4b)
367 11223344440804006263646566676869
372 ^^^^^^^^^^^^^^^^ Manufacturer data
373 (*) some cards have a different SAK in their anticollision and in block0: +0x80 in the block0 (e.g. 08->88, 18->98)
377 Computing BCC on UID 11223344: `analyse lcr -d 11223344` = `44`
382 04112233445566884400c82000000000
387 ^^^^^^^^^^^^ Manufacturer data
388 (*) all? cards have a different SAK in their anticollision and in block0: +0x80 in the block0 (e.g. 08->88, 18->98)
391 ## MIFARE Classic Gen1A aka UID
405 [+] Magic capabilities... Gen 1a
412 * Wipe: `40(7)`, `41` (use 2000ms timeout)
413 * Read: `40(7)`, `43`, `30xx`+crc
414 * Write: `40(7)`, `43`, `A0xx`+crc, `xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx`+crc
420 * UID: Only 4b versions
422 * all cards play blindly the block0 ATQA bytes, beware!
424 * some cards play blindly the block0 SAK byte, beware!
425 * some cards use a fix "08" in anticollision, no matter the block0
426 * some cards use a fix "08" in anticollision, unless SAK in block0 has most significant bit "80" set, in which case SAK="88"
428 * all cards play blindly the block0 BCC byte, beware!
432 #### MIFARE Classic Gen1A flavour 1
436 * SAK: play blindly the block0 SAK byte, beware!
437 * PRNG: static 01200145
438 * Wipe: filled with 0xFF
440 #### MIFARE Classic Gen1A flavour 2
444 * SAK: play blindly the block0 SAK byte, beware!
445 * PRNG: static 01200145
446 * Wipe: filled with 0x00
448 #### MIFARE Classic Gen1A flavour 3
453 * PRNG: static 01200145
454 * Wipe: filled with 0xFF
456 #### MIFARE Classic Gen1A flavour 4
462 * Wipe: timeout, no wipe
464 #### MIFARE Classic Gen1A flavour 5
470 * Wipe: reply ok but no wipe performed
472 #### MIFARE Classic Gen1A flavour 6
476 * SAK: 08 or 88 if block0_SAK most significant bit is set
478 * Wipe: timeout, no wipe
480 #### MIFARE Classic Gen1A flavour 7
484 * SAK: 08 or 88 if block0_SAK most significant bit is set
486 * Wipe: filled with 0x00
488 ### Proxmark3 commands
503 When "soft-bricked" (by writing invalid data in block0), these ones may help:
507 hf mf cwipe -u 11223344 -a 0004 -s 08
509 hf mf cwipe -u 11223344 -a 0044 -s 18
512 or just fixing block0:
516 hf mf csetuid -u 11223344 -a 0004 -s 08
518 hf mf csetuid -u 11223344 -a 0044 -s 18
522 script run hf_mf_magicrevive
525 To execute commands manually:
528 hf 14a raw -a -k -b 7 40
530 hf 14a raw -k -c A000
531 hf 14a raw -c -t 1000 11223344440804006263646566676869
537 hf 14a raw -a -k -b 7 40
538 hf 14a raw -t 1000 41
547 nfc-mfclassic R a u mydump
548 nfc-mfclassic W a u mydump
551 ## MIFARE Classic Gen1B
555 Similar to Gen1A, but supports directly read/write after command 40
564 [+] Magic capabilities... Gen 1b
571 * Read: `40(7)`, `30xx`
572 * Write: `40(7)`, `A0xx`+crc, `xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx`+crc
574 ## Mifare Classic Direct Write OTP
578 Chip manufactured by iKey LLC as a bypass for Gen1 filters.
579 Support Direct Write as CUID, but block0 can be written only once.
581 The chip had an issue in the protocol implementation.
583 The reader could interrupt radiofield for 2-3 microseconds (standard pause in the bit period of ISO14443-2).
584 After the response to first `26 (7)` command, but before the following `93 70` command. In that case original M1 card will stop the flow, but OTP will continue it.
586 That issue led to the development of the filters against that card and discontinuation of the production.
588 As a successor, [OTP 2.0](#mifare-classic-otp-20) was created.
594 * Initial UID is AA55C396
601 Only possible before personalization.
606 [+] Magic capabilities... Write Once / FUID
609 ## MIFARE Classic OTP 2.0
613 Similar to Gen1A, but after first block 0 edit, tag no longer replies to 0x40 command.
614 Were manufactured by iKey LLC as a replacement for [OTP](#mifare-classic-direct-write-otp)
618 * Initial UID is 00000000
621 * All bytes are 00 from factory wherever possible.
627 Only possible before personalization.
632 [=] --- Magic Tag Information
633 [+] Magic capabilities... Gen 1a
635 [=] --- PRNG Information
636 [+] Prng................. hard
643 * Write: `40(7)`, `43`, `A0xx`+crc, `xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx`+crc
645 ## MIFARE Classic DirectWrite aka Gen2 aka CUID
649 (also referred as MCT compatible by some sellers)
654 * What's so special about this chip in particular..?
663 [+] Magic capabilities... Gen 2 / CUID
672 * issue regular write to block0
678 * UID: 4b and 7b versions
680 * some cards play blindly the block0 ATQA bytes, beware!
681 * some cards use a fix ATQA in anticollision, no matter the block0. Including all 7b.
683 * some cards play blindly the block0 SAK byte, beware!
684 * some cards use a fix "08" or "18" in anticollision, no matter the block0. Including all 7b.
686 * some cards play blindly the block0 BCC byte, beware!
687 * some cards compute a proper BCC in anticollision. Including all 7b computing their BCC0 and BCC1.
689 * some cards don't reply to RATS
690 * some reply with an ATS
692 #### MIFARE Classic DirectWrite flavour 1
697 * ATQA: play blindly the block0 ATQA bytes, beware!
698 * SAK: play blindly the block0 SAK byte, beware!
699 * BCC: play blindly the block0 BCC byte, beware!
703 #### MIFARE Classic DirectWrite flavour 2
711 * ATS: 0978009102DABC1910F005
714 #### MIFARE Classic DirectWrite flavour 3
719 * ATQA: play blindly the block0 ATQA bytes, beware!
721 * BCC: play blindly the block0 BCC byte, beware!
725 #### MIFARE Classic DirectWrite flavour 4
733 * ATS: 0978009102DABC1910F005
734 * PRNG: static 00000000
736 #### MIFARE Classic DirectWrite flavour 5
742 * SAK: play blindly the block0 SAK byte, beware!
747 #### MIFARE Classic DirectWrite flavour 6
751 **TODO** need more info
754 * ATS: 0D780071028849A13020150608563D
756 ### Proxmark3 commands
761 hf mf wrbl --blk 0 -k FFFFFFFFFFFF -d 11223344440804006263646566676869 --force
766 When "soft-bricked" (by writing invalid data in block0), these ones may help:
775 hf 14a config --atqa force --bcc ignore --cl2 skip --rats skip
778 hf mf wrbl --blk 0 -k FFFFFFFFFFFF -d 11223344440804006263646566676869 --force
781 hf mf wrbl --blk 0 -k FFFFFFFFFFFF -d 11223344441802006263646566676869 --force
790 hf 14a config --atqa force --bcc ignore --cl2 force --cl3 skip --rats skip
793 hf mf wrbl --blk 0 -k FFFFFFFFFFFF -d 04112233445566084400626364656667 --force
796 hf mf wrbl --blk 0 -k FFFFFFFFFFFF -d 04112233445566184200626364656667 --force
802 ## MIFARE Classic Gen3 aka APDU
813 [+] Magic capabilities... Gen 3 / APDU ( possibly )
822 * issue special APDUs
826 90 F0 CC CC 10 <block0> - write block 0
827 90 FB CC CC 07 <uid> - change uid (independently of block0 data)
828 90 FD 11 11 00 - lock permanently
831 It seems the length byte gets ignored anyway.
833 Note: it seems some cards only accept the "change UID" command.
835 It accepts direct read of block0 (and only block0) without prior auth.
837 Writing to block 0 has some side-effects:
839 * It changes also the UID. Changing the UID *does not* change block 0.
840 * ATQA and SAK bytes are automatically replaced by fixed values.
841 * On 4-byte UID cards, BCC byte is automatically corrected.
847 * UID: 4b and 7b versions
852 ### Proxmark3 commands
861 # lock (uid/block0?) forever:
868 script run hf_mf_gen3_writer -h
875 hf 14a raw -s -c -t 2000 90FBCCCC07 11223344556677
877 hf 14a raw -s -c 3000
879 hf 14a raw -s -c -t 2000 90F0CCCC10 041219c3219316984200e32000000000
880 # lock (uid/block0?) forever:
881 hf 14a raw -s -c 90FD111100
884 ## MIFARE Classic USCUID
888 TLDR: These magic cards have a 16 byte long configuration page, which usually starts with 0x85.
889 All of the known tags are using this, except for Ultralight tags, are listed here.
891 You cannot turn a Classic tag into an Ultralight and vice-versa!
898 * ATQA: always read from block 0
899 * SAK: read from backdoor or configuration
900 * BCC: read from memory, beware!
910 [+] Magic capabilities... Gen 4 GDM / USCUID ( Magic Auth/Gen1 Magic Wakeup/Alt Magic Wakeup )
913 Possible tag wakeup mechanisms are:
923 * Magic authentication: select, `8000+crc`, `[Crypto1 Auth: 000000000000]`
924 * Backdoor read: `38xx+crc`
925 * Backdoor write: `A8xx+crc`, `[16 bytes data]+crc`
926 * Read configuration: `E000+crc`
927 * Write configuration: `E100+crc`; `[16 bytes data]+crc`
928 * Magic wakeup (A: 00): `40(7)`, `43`
929 * Magic wakeup (B: 85): `20(7)`, `23`
930 * Backdoor read main block: `30xx+crc`
931 * Backdoor write main block: `A0xx+crc`, `[16 bytes data]+crc`
932 * Read hidden block: `38xx+crc`
933 * Write hidden block: `A8xx+crc`, `[16 bytes data]+crc`
934 * Read configuration: `E000+crc`
935 * Write configuration: `E100+crc`
938 * Set main memory and config to 00 `F000+crc`
939 * Set main memory and config to FF `F100+crc`
940 * Set main memory and config to 55 (no 0A response) `F600+crc`
941 * Set backdoor memory to 00 `F800+crc`
942 * Set backdoor memory to FF `F900+crc`
943 * Set backdoor memory to 55 (no 0A response) `FE00+crc`
945 ### USCUID configuration guide
952 85000000000000000000000000000008
953 ^^^^^^ ^^ ^^ >> ??? Mystery ???
954 ^^^^ >> Gen1a mode (works with bitflip)
955 ^^ >> Magic wakeup command (00 for 40-43; 85 for 20-23)
956 ^^ >> Block use of Key B if readable by ACL
958 ^^ >> MFC EV1 CL2 Perso config*
960 ^^ >> Magic Auth command
961 ^^ >> Static encrypted nonce mode
962 ^^ >> Signature sector
965 To enable an option, set it to 5A.
966 * 5A - unfused F0. C3 - F0: CL2 UID; A5 - F1: CL2 UID with anticollision shortcut; 87 - F2: CL1 Random UID; 69 - F3: CL1 non-UID. Anything else is going to be ignored, and set as 4 bytes.
967 ** Do not change the real ACL! Backdoor commands only acknowledge FF0780. To recover, disable this byte and issue regular write to sector trailer.
968 *** If perso byte is enabled, this SAK is ignored, and hidden SAK is used instead.
971 * Gen1a mode: Allow using custom wakeup commands, like real gen1a chip, to run backdoor commands, as well as some extras.
972 * Magic wakeup command: Use different wakeup commands for entering Gen1a mode. A) 00 - 40(7), 43; B) 85 - 20(7), 23.
973 * Block use of Key B if readable by ACL: Per the MF1ICS50 datasheet, if Key B is readable by the ACL, using it shall give a Cmd Error 04. This option controls whether it happens or not.
974 * CUID mode: Allow direct write to block 0, instead of giving Cmd Error 04.
975 * MFC EV1 CL2 Perso config: When configured, the tag behaves like a real Mifare Classic EV1 7B UID tag, and reads UID from backdoor blocks. Otherwise, the tag acts like a 4 byte tag.
976 * Shadow mode: Writes to memory persisting in tag RAM. As soon as no power is left, the contents are restored to saved data.
977 * Magic Auth Command: Acknowledge command `8000` after selection, and call for Crypto1 auth with key `000000000000`.
978 * Static encrypted nonce mode: Use static encrypted nonces for authentication, making key recovery impossible.
979 * Signature sector: Acknowledge auth commands to sector 17, which is stored in backdoor sector 1.
980 * SAK: If perso byte is not set, after UID select, send this value.
987 88 04 BD E5 D4 04 6A BB 5B 80 0A 08 44 00 00 00 - Block 0: Perso F0, F1 data
990 ^^ - SAK0 (0x04 to call for CL2)
995 04 BD E5 6A 36 08 00 00 00 00 00 00 00 00 00 00 - Block 1: Perso F3 data
999 ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ - Unused
1001 Block 3: ignored (custom keys, acl; broken acl ignored - anticollision will still work)
1003 [Signature sector (#17) - needs config byte 13 (from 0) enabled to allow auth]
1008 ### Proxmark3 commands
1013 # Read config block from card
1016 # Write config block to card
1019 # Parse config block to card
1022 # Write block to card
1029 No implemented commands today
1034 | Factory configuration | Name |
1036 | 850000000000000000005A5A00000008 | GDM |
1037 | 850000000000005A00FF005A00000008 | GDCUID |
1038 | 850000000000005A0000005A5A5A0008 | UCUID |
1039 | 8500000000005A00005A005A005A0008 | "7 byte hard" |
1040 | 7AFF850102015A00005A005A005A0008 | M1-7B |
1041 | 7AFF85000000000000FF000000000008 | FUID |
1042 | 7AFF000000000000BAFA358500000008 | PFUID |
1043 | 7AFF000000000000BAFA000000000008 | UFUID |
1044 | 7AFF0000000000000000000000000008 | ZUID |
1046 *Not all tags are the same!* UFUID, ZUID and PFUID* are not full implementations of Magic85 - they only acknowledge the first 8 (except wakeup command) and last config byte(s).
1048 *Read and write config commands are flipped
1050 Well-known variations are described below.
1056 Known as "write only once", which is only partially true.
1058 Allows direct write to block 0 only when UID is default `AA55C396`. But always could be rewritten multiple times with backdoors commands.
1060 Backdoor commands are available even after the personalization and makes that tag detectable.
1062 That's a key difference from [OTP](#mifare-classic-direct-write-otp)/[OTP 2.0](#mifare-classic-otp-20) tags.
1068 * Configuration block value: `7AFF85000000000000FF000000000008`
1069 * Initial UID: `AA55C396`
1070 * Allows direct write to the block 0 (before the personalisation), so is Android compatible
1071 * Responds to magic wakeup `20(7)`, `23` commands
1080 [+] Magic capabilities... Gen 4 GDM / USCUID ( Alt Magic Wakeup )
1081 [+] Magic capabilities... Write Once / FUID
1085 ### Parsed configuration
1090 [usb] pm3 --> hf mf gdmcfg --gdm
1091 [+] Config... 7A FF 85 00 00 00 00 00 00 FF 00 00 00 00 00 08
1092 [+] 7A FF .......................................... Magic wakeup enabled with GDM config block access
1093 [+] 85 ....................................... Magic wakeup style GDM 20(7)/23
1094 [+] 00 00 00 .............................. Unknown
1095 [+] 00 ........................... Key B use allowed when readable by ACL
1096 [+] 00 ........................ Block 0 Direct Write Disabled (CUID)
1097 [+] 00 ..................... Unknown
1098 [+] FF .................. MFC EV1 personalization: 4B UID from Block 0
1099 [+] 00 ............... Shadow mode disabled
1100 [+] 00 ............. Magic auth disabled
1101 [+] 00 ........... Static encrypted nonce disabled
1102 [+] 00 ......... MFC EV1 signature disabled
1103 [+] 00 ...... Unknown
1111 * Magic wakeup: `20(7)`, `23`
1112 * Backdoor read main block: `30xx+crc`
1113 * Backdoor write main block: `A0xx+crc`, `[16 bytes data]+crc`
1114 * Read hidden block: `38xx+crc`
1115 * Write hidden block: `A8xx+crc`, `[16 bytes data]+crc`
1116 * Read configuration: `E000+crc`
1117 * Write configuration: `E100+crc`
1118 * Example of changing block 0 after the personalization:
1121 [usb] pm3 --> hf 14a raw -k -a -b 7 20
1123 [usb] pm3 --> hf 14a raw -k -a 23
1125 [usb] pm3 --> hf 14a raw -c -k -a A000
1127 [usb] pm3 --> hf 14a raw -c -k -a B502454EBC0804000168AA8947CE4D1D <- Writing 0 block with the backdoor command
1129 [usb] pm3 --> hf 14a raw -c -a 5000
1130 [usb] pm3 --> hf mf rdbl --blk 0
1132 [=] # | sector 00 / 0x00 | ascii
1133 [=] ----+-------------------------------------------------+-----------------
1134 [=] 0 | B5 02 45 4E BC 08 04 00 01 68 AA 89 47 CE 4D 1D | ..EN.....h..G.M.
1137 ### Proxmark3 commands
1141 * `hf mf gdmcfg --gdm`
1142 * `hf mf gdmsetcfg --gdm`
1143 * `hf mf gdmsetblk --gdm`
1149 The tag is positioned as "sealable UID", so that means you could use the same commands, as you could use for UID chip in a default state. But after the sealing (changing the configuration) tag will not answer to the backdoor commands and will behave as a normal Mifare Classic tag.
1151 *But at the same time there is some unidentified behavior, which doesn't fully corresponds the protocol and original Mifare Classic tags. So the tag could be filtered out with a protocol-based filters (i.e. Iron Logic OTP2 filter).*
1157 * Configuration block value: `7AFF000000000000BAFA000000000008`
1158 * No direct write to block 0
1159 * Responds to magic wakeup `40(7)`, `43` commands before the sealing
1160 * Acknowledge only the first (except wakeup command) and last config byte(s), so doesn't have the hidden block
1169 [+] Magic capabilities... Gen 1a
1170 [+] Magic capabilities... Gen 4 GDM / USCUID ( Gen1 Magic Wakeup )
1174 Currently Proxmark3 doesn't identify it as a separate tag.
1175 Before the sealing could be detected from the config block value.
1177 ### Parsed configuration
1182 [usb] pm3 --> hf mf gdmcfg --gen1a
1183 [+] Config... 7A FF 00 00 00 00 00 00 BA FA 00 00 00 00 00 08
1184 [+] 7A FF .......................................... Magic wakeup enabled with GDM config block access
1185 [+] 00 ....................................... Magic wakeup style Gen1a 40(7)/43
1186 [+] 00 00 00 .............................. Unknown
1187 [+] 00 ........................... Key B use allowed when readable by ACL
1188 [+] 00 ........................ Block 0 Direct Write Disabled (CUID)
1189 [+] BA ..................... Unknown
1190 [+] FA .................. MFC EV1 personalization: 4B UID from Block 0
1191 [+] 00 ............... Shadow mode disabled
1192 [+] 00 ............. Magic auth disabled
1193 [+] 00 ........... Static encrypted nonce disabled
1194 [+] 00 ......... MFC EV1 signature disabled
1195 [+] 00 ...... Unknown
1203 All commands are available before sealing. After the sealing acts as a Mifare Classic 1K tag.
1205 * Magic wakeup: `40(7)`, `43`
1206 * Backdoor read main block: `30xx+crc`
1207 * Backdoor write main block: `A0xx+crc`, `[16 bytes data]+crc`
1208 * Read configuration: `E000+crc`
1209 * Write configuration: `E100+crc`
1210 * Example of the sealing, performed by Chinese copiers in raw commands:
1213 hf 14a raw -a -k -b 7 40
1215 hf 14a raw -k -c e100
1216 hf 14a raw -c 85000000000000000000000000000008
1219 ### Proxmark3 commands
1223 All commands are available before sealing.
1225 * `hf mf gdmcfg --gen1a`
1226 * `hf mf gdmsetcfg --gen1a`
1227 * `hf mf gdmsetblk --gen1a`
1241 That tag is a UID tag, built on USCUID chip. It doesn't sold separately, but could be found on marketplaces under the guise of a UID tag.
1247 * Configuration block value: `7AFF0000000000000000000000000008`
1248 * No direct write to block 0
1249 * Responds to magic wakeup `40(7)`, `43` commands
1250 * Acknowledge only the first (except wakeup command) and last config byte(s), so doesn't have the hidden block
1259 [+] Magic capabilities... Gen 1a
1260 [+] Magic capabilities... Gen 4 GDM / USCUID ( Gen1 Magic Wakeup )
1264 Currently Proxmark3 doesn't identify it as a separate tag.
1265 Could be detected from the config block value.
1267 ### Parsed configuration
1272 [usb] pm3 --> hf mf gdmcfg --gen1a
1273 [+] Config... 7A FF 00 00 00 00 00 00 00 00 00 00 00 00 00 08
1274 [+] 7A FF .......................................... Magic wakeup enabled with GDM config block access
1275 [+] 00 ....................................... Magic wakeup style Gen1a 40(7)/43
1276 [+] 00 00 00 .............................. Unknown
1277 [+] 00 ........................... Key B use allowed when readable by ACL
1278 [+] 00 ........................ Block 0 Direct Write Disabled (CUID)
1279 [+] 00 ..................... Unknown
1280 [+] 00 .................. MFC EV1 personalization: 4B UID from Block 0
1281 [+] 00 ............... Shadow mode disabled
1282 [+] 00 ............. Magic auth disabled
1283 [+] 00 ........... Static encrypted nonce disabled
1284 [+] 00 ......... MFC EV1 signature disabled
1285 [+] 00 ...... Unknown
1293 * Magic wakeup: `40(7)`, `43`
1294 * Backdoor read main block: `30xx+crc`
1295 * Backdoor write main block: `A0xx+crc`, `[16 bytes data]+crc`
1296 * Read hidden block: `38xx+crc`
1297 * Write hidden block: `A8xx+crc`, `[16 bytes data]+crc`
1298 * Read configuration: `E000+crc`
1299 * Write configuration: `E100+crc`
1301 ### Proxmark3 commands
1305 * `hf mf gdmcfg --gen1a`
1306 * `hf mf gdmsetcfg --gen1a`
1307 * `hf mf gdmsetblk --gen1a`
1321 The tag has a shadow mode, which means that every change to normal MFC memory would be restored back from the persistent memory after being off RFID field.
1330 * Configuration block value: `850000000000000000005A5A00000008`
1331 * No direct write to block 0
1332 * Responds to magic authentication: select, `8000+crc`, `[Crypto1 Auth: 000000000000]`
1341 [+] Magic capabilities... Gen 4 GDM / USCUID ( Magic Auth )
1345 Could be manually validated with the configuration block value.
1347 ### Parsed configuration
1352 [usb] pm3 --> hf mf gdmcfg
1353 [+] Config... 85 00 00 00 00 00 00 00 00 00 5A 5A 00 00 00 08
1354 [+] 85 00 .......................................... Magic wakeup disabled
1355 [+] 00 ....................................... Magic wakeup style Gen1a 40(7)/43
1356 [+] 00 00 00 .............................. Unknown
1357 [+] 00 ........................... Key B use allowed when readable by ACL
1358 [+] 00 ........................ Block 0 Direct Write Disabled (CUID)
1359 [+] 00 ..................... Unknown
1360 [+] 00 .................. MFC EV1 personalization: 4B UID from Block 0
1361 [+] 5A ............... Shadow mode enabled
1362 [+] 5A ............. Magic auth enabled
1363 [+] 00 ........... Static encrypted nonce disabled
1364 [+] 00 ......... MFC EV1 signature disabled
1365 [+] 00 ...... Unknown
1373 * Magic authentication: select, `8000+crc`, `[Crypto1 Auth: 000000000000]`
1374 * Backdoor read: `38xx+crc`
1375 * Backdoor write: `A8xx+crc`, `[16 bytes data]+crc`
1376 * Read configuration: `E000+crc`
1377 * Write configuration: `E100+crc`; `[16 bytes data]+crc`
1379 ### Proxmark3 commands
1383 * Backdoor write: `gdmsetcfg`
1384 * Read configuration: `gdmcfg`
1385 * Write configuration: `gdmsetcfg`
1391 That tag is a CUID tag, built on USCUID chip. It doesn't sold separately, but could be found on marketplaces under the guise of a CUID tag.
1397 * Configuration block value: `850000000000005A00FF005A00000008`
1398 * Allows direct write to the block 0, so is Android compatible
1399 * Responds to magic authentication: select, `8000+crc`, `[Crypto1 Auth: 000000000000]`
1408 [+] Magic capabilities... Gen 2 / CUID
1409 [+] Magic capabilities... Gen 4 GDM / USCUID ( Magic Auth )
1413 Currently Proxmark3 doesn't identify it as a separate tag.
1414 Could be manually validated with the configuration block value.
1416 ### Parsed configuration
1421 [usb] pm3 --> hf mf gdmcfg
1422 [+] Config... 85 00 00 00 00 00 00 5A 00 FF 00 5A 00 00 00 08
1423 [+] 85 00 .......................................... Magic wakeup disabled
1424 [+] 00 ....................................... Magic wakeup style Gen1a 40(7)/43
1425 [+] 00 00 00 .............................. Unknown
1426 [+] 00 ........................... Key B use allowed when readable by ACL
1427 [+] 5A ........................ Block 0 Direct Write Enabled (CUID)
1428 [+] 00 ..................... Unknown
1429 [+] FF .................. MFC EV1 personalization: 4B UID from Block 0
1430 [+] 00 ............... Shadow mode disabled
1431 [+] 5A ............. Magic auth enabled
1432 [+] 00 ........... Static encrypted nonce disabled
1433 [+] 00 ......... MFC EV1 signature disabled
1434 [+] 00 ...... Unknown
1442 * Magic authentication: select, `8000+crc`, `[Crypto1 Auth: 000000000000]`
1443 * Backdoor read: `38xx+crc`
1444 * Backdoor write: `A8xx+crc`, `[16 bytes data]+crc`
1445 * Read configuration: `E000+crc`
1446 * Write configuration: `E100+crc`; `[16 bytes data]+crc`
1448 ### Proxmark3 commands
1452 * Backdoor write: `gdmsetcfg`
1453 * Read configuration: `gdmcfg`
1454 * Write configuration: `gdmsetcfg`
1456 ## MIFARE Classic, other versions
1462 * ZXUID, EUID, ICUID, KUID?
1464 ## MIFARE Classic Super
1468 It behaves like regular Mifare Classic but records reader auth attempts.
1470 ### MIFARE Classic Super Gen1
1474 Old type of cards, hard to obtain. They are DirectWrite, UID can be changed via 0 block or backdoor commands.
1479 * ATS: fixed, 0978009102DABC1910F005
1481 ATQA/SAK matches 1k card, but works as 4k card.
1483 Backdoor commands provided over APDU. Format:
1486 00 A6 A0 00 05 FF FF FF FF 00
1487 ^^ ^^ Backdoor command header
1488 ^^ Backdoor command (A0 - set UID/B0 - get trace/C0 - reset card)
1489 ^^ Type of answer (used in key recovery to select trace number)
1490 ^^ Length of user provided data
1491 ^^ ^^ ^^ ^^ ^^ User data
1494 👉 You can't change UID with backdoor command if incorrect data is written to the 0 sector trailer!
1496 ### MIFARE Classic Super Gen1B
1498 DirectWrite card, ATS unknown. Probably same as Gen1, except backdoor commands.
1499 Implementation: https://github.com/netscylla/super-card/blob/master/libnfc-1.7.1/utils/nfc-super.c
1501 ### MIFARE Classic Super Gen2
1505 New generation of cards, based on limited Gen4 chip. Emulates Gen1 backdoor protocol, but can store up to 7 different traces.
1507 Card always answers `ff ff ff ff` as `at`, so reading/writing it via Mifare protocol is impossible.
1509 UID is changeable via UMC backdoor write to 0 block.
1511 * UID: 4b and 7b versions
1514 * ATS: changeable, default as Gen1
1516 Gen4 commands available:
1519 CF <passwd> 34 <1b length><0-16b ATS> // Configure ATS
1520 CF <passwd> CC // Version information, returns 00 00 00 02 AA
1521 CF <passwd> CD <1b block number><16b block data> // Backdoor write 16b block
1522 CF <passwd> CE <1b block number> // Backdoor read 16b block
1523 CF <passwd> FE <4b new_password> // Change password
1526 ### MIFARE Classic Super Furui
1530 #### Characteristics
1534 * SAK/ATQA: play blindly the block0 bytes, beware!
1535 * BCC: play blindly the block0 BCC bytes, beware!
1538 **!!!WARNING!!!** This tag can die for no reason (no reply to WUPA/REQA). We don't know why this happens.
1545 [usb] pm3 --> hf 14a raw -sct 250 AAA500000000000000000000000000000000
1553 * Configure: `AAA5[16 byte config]`+crc
1554 * Write block 0: `AAA4[4b UID][1b BCC][1b SAK][2b ATQA reversed]0000000000000000`+crc
1555 * Recover trace: `AAA8[00/01][00-08]`+crc
1557 Caution: tag does not append CRC to magic responses!
1559 Please use config as 00 bytes.
1564 44 33 22 11 03 61 08 68 7A C7 4B 62 43 A6 11 6F 64 F3
1566 ^^ ^^ -- auth command, reversed
1567 ^^ ^^ ^^ ^^ -- Auth (nt)
1568 ^^ ^^ ^^ ^^ -- Auth (nr)
1569 ^^ ^^ ^^ ^^ -- Auth (ar)
1576 Only Gen1/Gen2 at this moment (Gen1B is unsupported):
1581 [+] Magic capabilities... Super card ( Gen ? )
1584 ### Proxmark3 commands
1587 [usb] pm3 --> hf mf supercard
1590 [usb] pm3 --> hf mf supercard --furui
1598 ## MIFARE Ultralight blocks 0..2
1608 UID is made of SN0..SN6 bytes
1610 Computing BCC0 on UID 04112233445566: `analyse lcr -d 88041122` = `bf`
1612 Computing BCC1 on UID 04112233445566: `analyse lcr -d 33445566` = `44`
1614 Int is internal, typically 0x48
1616 Anticol shortcut (CL1/3000) is supported for UL, ULC, NTAG except NTAG I2C
1618 Some cards have a password: `B6AA558D`. Usually "copykey" chips.
1620 ## MIFARE Ultralight Gen1A
1638 #### SAK, ATQA, BCC, ATS
1640 **TODO** need more tests
1642 ### Proxmark3 commands
1647 script run hf_mfu_setuid -h
1650 When "soft-bricked" (by writing invalid data in block0), these ones may help:
1654 script run hf_mf_magicrevive -u
1657 ## MIFARE Ultralight DirectWrite
1668 [+] Magic capabilities : Gen 2 / CUID
1671 It seems so far that all MFUL DW have an ATS response in factory configuration.
1677 Issue three regular MFU write commands in a row to write first three blocks.
1683 * UID: Only 7b versions
1685 * all cards play fix ATQA
1687 * all cards play fix SAK
1689 * some cards play blindly the block0 BCC0 and block2 BCC1 bytes, beware!
1690 * some cards compute proper BCC0 and BCC1 in anticollision
1692 * all cards reply with an ATS
1694 #### MIFARE Ultralight DirectWrite flavour 1
1699 * ATS: 0A78008102DBA0C119402AB5
1700 * Anticol shortcut (CL1/3000): fails
1702 ### Proxmark3 commands
1710 Equivalent: don't use `hf mfu wrbl` as you need to write three blocks in a row, but do, with proper BCCx:
1713 hf 14a raw -s -c -k a2 00 041122bf
1714 hf 14a raw -c -k a2 01 33445566
1715 hf 14a raw -c a2 02 44480000
1718 When "soft-bricked" (by writing invalid data in block0), these ones may help:
1727 hf 14a config --atqa force --bcc ignore --cl2 force --cl3 skip --rats skip
1728 hf mfu setuid --uid 04112233445566
1741 See `--uid` and `--full`
1747 * MIFARE++ Ultralight
1749 ## MIFARE Ultralight EV1 DirectWrite
1753 Similar to MFUL DirectWrite
1762 [+] Magic capabilities : Gen 2 / CUID
1769 * UID: Only 7b versions
1771 * all cards play fix ATQA
1773 * all cards play fix SAK
1775 * cards play blindly the block0 BCC0 and block2 BCC1 bytes, beware!
1777 * all cards reply with an ATS
1779 #### MIFARE Ultralight EV1 DirectWrite flavour 1
1783 * BCC: play blindly the block0 BCC0 and block2 BCC1 bytes, beware!
1784 * ATS: 850000A000000AC30004030101000B0341DF
1786 #### MIFARE Ultralight EV1 DirectWrite flavour 2
1790 * BCC: play blindly the block0 BCC0 and block2 BCC1 bytes, beware!
1791 * ATS: 850000A00A000AC30004030101000B0316D7
1793 #### MIFARE Ultralight EV1 DirectWrite flavour 3
1797 * BCC: play blindly the block0 BCC0 and block2 BCC1 bytes, beware!
1798 * ATS: 850000A000000A3C0004030101000E03
1800 ## MIFARE Ultralight C Gen1A
1804 Similar to MFUL Gen1A
1806 ## MIFARE Ultralight C DirectWrite
1810 Similar to MFUL DirectWrite
1819 [+] Magic capabilities : Gen 2 / CUID
1826 * UID: Only 7b versions
1828 * all cards play fix ATQA
1830 * all cards play fix SAK
1832 * cards compute proper BCC0 and BCC1 in anticollision
1834 * all cards reply with an ATS
1836 #### MIFARE Ultralight C DirectWrite flavour 1
1841 * ATS: 0A78008102DBA0C119402AB5
1842 * Anticol shortcut (CL1/3000): fails
1848 ## NTAG213 DirectWrite
1852 Similar to MFUL DirectWrite
1861 [+] Magic capabilities : Gen 2 / CUID
1868 * UID: Only 7b versions
1870 * all cards play fix ATQA
1872 * all cards play fix SAK
1874 * cards play blindly the block0 BCC0 and block2 BCC1 bytes, beware!
1876 * all cards reply with an ATS
1878 #### NTAG213 DirectWrite flavour 1
1882 * BCC: play blindly the block0 BCC0 and block2 BCC1 bytes, beware!
1883 * ATS: 0A78008102DBA0C119402AB5
1884 * Anticol shortcut (CL1/3000): succeeds
1897 [+] Magic capabilities : NTAG21x
1904 Emulates fully NTAG213, 213F, 215, 216, 216F
1906 Emulates partially UL EV1 48k/128k, NTAG210, NTAG212, NTAGI2C 1K/2K, NTAGI2C 1K/2K PLUS
1908 Anticol shortcut (CL1/3000): fails
1910 ### Proxmark3 commands
1915 script run hf_mfu_magicwrite -h
1922 Custom chips, manufactured by iKey LLC for cloning Ultralight tags used in Visit intercoms. That leads to the non-standard for Ultralight chips tag version.
1928 Ultralight magic, 16 pages. Recommended for Vizit RF3.1 with markings "3.1" or "4.1".
1929 Behavior: allows writes to page 0-2.
1936 hf mfu rdbl --force -b 16
1937 hf 14a raw -sct 250 60
1942 `00 00 00 00 00 00 00 00`
1949 Ultralight EV1 magic; 41 page. Recommended for Vizit RF3.1 with 41 page.
1950 Behavior: allows writes to page 0-2.
1959 [=] TAG IC Signature: 0000000000000000000000000000000000000000000000000000000000000000
1961 [=] Raw bytes: 00 34 21 01 01 00 0E 03
1962 [=] Vendor ID: 34, Mikron JSC Russia
1963 [=] Product type: 21, unknown
1966 #### ULtra flavour 1
1970 Could be identified by indirect evidence before writing
1972 * Initial UID: `34 D7 08 11 AD D7 D0`
1973 * `hf mfu dump --ns`
1976 [=] 3/0x03 | CF 39 A1 C8 | 1 | .9..
1977 [=] 4/0x04 | B6 69 26 0D | 1 | .i&.
1978 [=] 5/0x05 | EC A1 73 C4 | 1 | ..s.
1979 [=] 6/0x06 | 81 3D 29 B8 | 1 | .=).
1980 [=] 16/0x10 | 6A F0 2D FF | 0 | j.-.
1981 [=] 20/0x14 | 6A F0 2D FF | 0 | j.-.
1982 [=] 24/0x18 | 6A F0 2D FF | 0 | j.-.
1983 [=] 38/0x26 | 00 E2 00 00 | 0 | .... <- E2, Virtual Card Type Identifier is not default
1987 #### ULtra flavour 2
1991 Could be identified by indirect evidence before writing
1993 * Initial UID: `04 15 4A 23 36 2F 81`
1994 * Values in pages `3, 4, 5, 6, 16, 20, 24, 38` are default for that tag flavour
2000 Ultralight EV1 magic; 41 page. Recommended for Vizit RF3.1 with 41 page.
2001 Created as a response to filters that try to overwrite page 0 (as a detection for [ULtra](#mifare-ultra) tags).
2003 Behavior: similar to Ultra, but after editing page 0 become locked and tag becomes the original Mifare Ultralight EV1 (except the tag version, which remains specific).
2005 **WARNING!** When using UL-5 to clone, write UID pages in inverse (from 2 to 0) and do NOT make mistakes! This tag does not allow reversing one-way actions (OTP page, lock bits).
2014 TAG IC Signature: 0000000000000000000000000000000000000000000000000000000000000000
2016 [=] Raw bytes: 00 34 21 01 01 00 0E 03
2017 [=] Vendor ID: 34, Mikron JSC Russia
2020 After personalization it is not possible to identify UL-5.
2022 The manufacturer confirmed unpersonalized tags could be identified by first 3 bytes of UID:
2033 ## MIFARE Ultralight USCUID-UL
2037 TLDR: These magic cards, like the MFC USCUIDs have a 16 byte long configuration page, comprised of 4 blocks of 4 bytes each. This usually starts with 0x85. All of the known tags use the same format config page.
2039 The cards will respond to a RATS with the config page in the factory configuration.
2041 As with the MFC USCUIDs, one cannot turn a Classic tag into an Ultralight and vice-versa!
2048 * ATQA: always read from hidden block `F6`
2049 * SAK: always read from hidden block `F6`
2050 * BCC: read from blocks 0-1 per Ultralight specification
2051 * ATS: These respond to an ATS request with the config page in factory mode.
2057 In factory config state:
2062 [=] -------------------------- ATS --------------------------
2063 [!] ATS may be corrupted. Length of ATS (18 bytes incl. 2 Bytes CRC) doesn't match TL
2064 [+] ATS: 85 00 85 A0 00 00 0A A5 00 04 04 02 01 00 0F 03 [ 07 00 ]
2067 If config has been modified to not display config block as ATS response:
2070 hf 14a raw -akb 7 40; hf 14a raw -k 43
2072 OR (depending on the magic wakeup method set)
2074 hf 14a raw -akb 7 20; hf 14a raw -k 23
2079 [+] 85 00 85 A0 00 00 0A A5 00 04 04 02 01 00 0F 03 [ 07 00 ]
2082 Possible tag wakeup mechanisms are:
2091 * Magic wakeup (A: 00): `40(7)`, `43`
2092 * Magic wakeup (B: 85): `20(7)`, `23`
2093 * Backdoor read main and hidden block: `30xx+crc`
2094 * Backdoor write main and hidden block: `A2xx[4 bytes data]+crc`
2095 * Read configuration: `E050+crc`
2096 * Write configuration: `E2[offset*4, 1b][data, 4b]+crc`
2099 * Set memory and config to 00 `F000+crc`
2100 * Set memory and config to FF `F100+crc`
2101 * Set memory and config to 55 (no 0A response) `F600+crc`
2103 ### USCUID-UL configuration guide
2111 850000A0 00000AC3 00040301 01000B03
2112 ^^ >> ??? Mystery ???
2113 ^^^^ >> Gen1a mode (works with bitflip)
2114 ^^ >> Magic wakeup command (00 for 40-43; 85 for 20-23)
2115 ^^ >> Config available using regular mode (ON: A0)
2116 ^^ >> Do not reply to 1B, making auth impossible
2117 ^^ >> Do not enforce OTP properties (ON: A0)
2118 ^^ >> Maximum memory configuration*
2119 ^^^^^^^^ ^^^^^^^^ >> Version info
2121 * This isn't a customizable value - it's a preset. So far:
2128 55 = Unknown IC w/ 238 pgs.
2131 * Gen1a mode: Allow using custom wakeup commands, like real gen1a chip, to run backdoor commands, as well as some extras.
2132 * Magic wakeup command: Use different wakeup commands for entering Gen1a mode. A) 00 - 40(7), 43; B) 85 - 20(7), 23.
2133 * Config available using regular mode: If this option is turned on via A0, the tag will reply to RATS with the config block and the config block can be modified without doing a magic wakeup.
2137 You must send config info in E2 packets of 4 bytes each (format: `E2[offset*4, 1b][data, 4b]`), eg for a UL-11 tag:
2140 hf 14a raw -sck E200850000A0; hf 14a raw -ck E20100000AC3; hf 14a raw -ck E20200040301; hf 14a raw -c E20301000B03
2147 ^^^^^^^^ >> Unknown, usually always 00
2150 ^^^^^^^^ >> Unknown, usually always 00
2153 ^^^^^^ >> Unknown, usually always 00
2154 ^^ >> Unknown, usually always BD, possible tearing counter value?
2157 ^^^^^^ >> Unknown, usually always 00
2158 ^^ >> Unknown, usually always BD, possible tearing counter value?
2161 ^^^^^^ >> Unknown, usually always 00
2162 ^^ >> Unknown, usually always BD, possible tearing counter value?
2165 ^^^^^^^^ >> Unknown, usually always 00
2168 ^^^^ >> ATQA in byte reverse order. 4400 = ATQA of 0044
2169 ^^ >> Unknown, usually always set to 04. Changing this value also has something to do with the SAK value in the next byte
2170 ^^ >> SAK, if previous byte set to 04
2173 ^^ >> First byte of UID BCC calculation, for Ultralight family is always 88 per the datasheet
2174 ^^ >> Unknown, usually always AF.
2175 ^^^^ >> Unknown, usually always 00
2177 F8 - FF: xxxxxxxx >> signature
2180 To read / write hidden blocks:
2182 A config block beginning with `7AFF` must be set to enable a `40:43` / `20:23` magic wakeup. From limited testing, the `20:23` magic wakeup is not guaranteed to work, however the `40:43` wakeup works 100% of the time.
2184 You must send config info in A2 packets of 4 bytes each (format: `A2[offset*4, 1b][data, 4b]`), eg for a UL-11 tag:
2187 hf 14a raw -akb 7 40; hf 14a raw -k 43; hf 14a raw -ck A2F2000000BD; hf 14a raw -ck A2F3000000BD; hf 14a raw -ck A2F4000000BD; hf 14a raw -ck A2F644000400; hf 14a raw -c A2F888AF0000
2190 ### Proxmark3 commands
2194 No implemented commands at time of writing
2200 No implemented commands at time of writing
2204 | Factory configuration | Name |
2206 | 850000A0 00000AC3 00040301 01000B03 | UL-11 |
2207 | 850000A0 00000A3C 00040301 01000E03 | UL-21 |
2208 | 850000A0 0A000A00 00000000 00000000 | UL-C |
2209 | 850085A0 00000AA5 00040402 01000F03 | NTAG213 |
2210 | 850000A0 00000A5A 00040402 01001103 | NTAG215 |
2211 | 850000A0 00000AAA 00040402 01001303 | NTAG216 |
2217 ## "DESFire" APDU, 7b UID
2227 * issue special APDUs
2235 * ATS: 0675338102005110 or 06757781028002F0
2237 Only mimics DESFire anticollision (but wrong ATS), no further DESFire support
2239 ### Proxmark commands
2246 hf 14a raw -s -c 0200ab00000704112233445566
2252 hf 14a apdu -s 00ab00000704112233445566
2262 420200ab00000704112233445566
2265 ## "DESFire" APDU, 4b UID
2275 * issue special APDUs
2282 * This is FM1208-9, NOT DESFire!
2284 * ATS: 0675338102005110 or 06757781028002F0
2286 Only mimics DESFire anticollision (but wrong ATS), no further DESFire support
2288 ### Proxmark commands
2295 hf 14a raw -s -c 0200ab00000411223344
2301 hf 14a apdu -s 00ab00000411223344
2304 It accepts longer UID but that doesn't affect BCC/ATQA/SAK
2306 ### pn53x-tamashell commands
2312 420200ab00000411223344
2319 The same effect (with better ATQA!) can be obtained with a MFC Gen1A that uses SAK defined in block0:
2322 hf mf csetblk --blk 0 -d 1122334444204403A1A2A3A4A5A6A7A8
2324 [+] UID: 11 22 33 44
2328 [+] MIFARE DESFire MF3ICD40
2335 ## Tiananxin TCOS CPU card
2339 This is a card sold on Taobao for testing readers.
2340 ISO14443-4 compliant.
2345 hf 14a apdu -s 90B2900000 // Get Card OS version
2347 <<< 54 43 4F 53 20 56 31 2E 34 2E 30 90 00 | TCOS V1.4.0..
2352 All commands in APDU.
2356 90 F4 CC CC 01 [..1 ] // Change protocol used (1: ISO14443 [AA - type A, BB - type B])
2357 90 F6 CC CC 01 [TA1 ] // Change TA1 value (transfer speed)
2358 90 F8 CC CC 01 [..1 ] // Use random UID/PUPI value (1: FF: static, AB: random)
2359 90 F8 DD DD 01 [..1 ] // Set UID length (1: bytes in UID (04, 07, 0A for 4, 7, 10 bytes accordingly))
2360 90 F8 EE EE 0B [... ] // Set UID/PUPI value (FF+enter UID value here). To clear, use Lc=01; data=00.
2361 90 FA CC CC 01 [FSCI] // Set FSCI (1: value 0-8)
2362 90 FC CC CC 01 [SFGI] // Set SFGI (DO NOT SET TOO HIGH!) (1: value 0-E)
2363 90 FE CC CC 01 [FWI ] // Set FWI (DO NOT SET BELOW 4!!!) (value 0-E)
2366 More commands to follow. Be careful with some.
2380 ### Proxmark3 commands
2384 Always set a UID starting with `E0`.
2387 hf 15 csetuid E011223344556677
2393 script run hf_15_magic -u E004013344556677
2406 A.k.a ultimate magic card, most promenent feature is shadow mode (GTU) and optional password protected backdoor commands.
2408 Can emulate MIFARE Classic, Ultralight/NTAG families, 14b UID & App Data
2410 * [Identify](#identify-16)
2411 * [Magic commands](#magic-commands-9)
2412 * [Characteristics](#characteristics-12)
2413 * [Proxmark3 commands](#proxmark3-commands-9)
2414 * [Change ATQA / SAK](#change-atqa--sak)
2415 * [Change ATS](#change-ats)
2416 * [Set UID length (4, 7, 10)](#set-uid-length-4-7-10)
2417 * [Set 14443A UID](#set-14443a-uid)
2418 * [Set 14443B UID and ATQB](#set-14443b-uid-and-atqb)
2419 * [(De)Activate Ultralight mode](#deactivate-ultralight-mode)
2420 * [Select Ultralight mode](#select-ultralight-mode)
2421 * [Set shadow mode (GTU)](#set-shadow-mode-gtu)
2422 * [Direct block read and write](#direct-block-read-and-write)
2423 * [(De)Activate direct write to block 0](#deactivate-direct-write-to-block-0)
2424 * [Change backdoor password](#change-backdoor-password)
2425 * [Dump configuration](#dump-configuration)
2426 * [Fast configuration](#fast-configuration)
2427 * [Presets](#presets)
2428 * [Version and Signature](#version-and-signature)
2433 ^[Top](#top) ^^[Gen4](#g4top)
2435 👉 **TODO** If the password is not default, Tag doesn't get identified correctly by latest Proxmark3 client (it might get mislabeled as MFC Gen2/CUID, Gen3/APDU or NTAG21x Modifiable, depending on configured UID/ATQA/SAK/ATS)
2437 👉 **TODO** Using C6 command can change config due to a bug in some cards. CC should be used instead.
2441 [+] Magic capabilities : Gen 4 GTU
2444 The card will be identified only if the password is the default one. One can identify manually such card if the password is still the default one, with the command to get the current configuration:
2447 hf 14a raw -s -c -t 1000 CF00000000C6
2450 If the card is an Ultimate Magic Card, it returns 30 or 32 bytes.
2454 ^[Top](#top) ^^[Gen4](#g4top)
2456 There are two ways to program this card.
2458 1. Use the raw commands designated by the `hf 14a` examples.
2462 2. Use the hf_mf_ultimatecard.lua script commands designated but the `script run hf_mf_ultimatecard` examples. This script is nof fully compartible with new version UMC.
2465 script run hf_mf_ultimatecard.lua -h
2468 This script enables easy programming of an Ultimate Mifare Magic card
2470 script run hf_mf_ultimatecard -h -k <passwd> -c -w <type> -u <uid> -t <type> -p <passwd> -a <pack> -s <signature> -o <otp> -v <version> -q <atqa/sak> -g <gtu> -z <ats> -m <ul-mode> -n <ul-protocol>
2474 -c read magic configuration
2475 -u UID (8-20 hexsymbols), set UID on tag
2476 -t tag type to impersonate
2477 1 = Mifare Mini S20 4-byte
2478 2 = Mifare Mini S20 7-byte 15 = NTAG 210
2479 3 = Mifare Mini S20 10-byte 16 = NTAG 212
2480 4 = Mifare 1k S50 4-byte 17 = NTAG 213
2481 5 = Mifare 1k S50 7-byte 18 = NTAG 215
2482 6 = Mifare 1k S50 10-byte 19 = NTAG 216
2483 7 = Mifare 4k S70 4-byte 20 = NTAG I2C 1K
2484 8 = Mifare 4k S70 7-byte 21 = NTAG I2C 2K
2485 9 = Mifare 4k S70 10-byte 22 = NTAG I2C 1K PLUS
2486 *** 10 = UL - NOT WORKING FULLY 23 = NTAG I2C 2K PLUS
2487 *** 11 = UL-C - NOT WORKING FULLY 24 = NTAG 213F
2488 12 = UL EV1 48b 25 = NTAG 216F
2490 *** 14 = UL Plus - NOT WORKING YET
2492 -p NTAG password (8 hexsymbols), set NTAG password on tag.
2493 -a NTAG pack ( 4 hexsymbols), set NTAG pack on tag.
2494 -s Signature data (64 hexsymbols), set signature data on tag.
2495 -o OTP data (8 hexsymbols), set `One-Time Programmable` data on tag.
2496 -v Version data (16 hexsymbols), set version data on tag.
2497 -q ATQA/SAK (<2b ATQA><1b SAK> hexsymbols), set ATQA/SAK on tag.
2498 -g GTU Mode (1 hexsymbol), set GTU shadow mode.
2499 -z ATS (<1b length><0-16 ATS> hexsymbols), Configure ATS. Length set to 00 will disable ATS.
2500 -w Wipe tag. 0 for Mifare or 1 for UL. Fills tag with zeros and put default values for type selected.
2501 -m Ultralight mode (00 UL EV1, 01 NTAG, 02 UL-C, 03 UL) Set type of UL.
2502 -n Ultralight protocol (00 MFC, 01 UL), switches between UL and MFC mode
2503 -k Ultimate Magic Card Key (IF DIFFERENT THAN DEFAULT 00000000)
2506 -- read magic tag configuration
2507 script run hf_mf_ultimatecard -c
2509 script run hf_mf_ultimatecard -u 04112233445566
2510 -- set NTAG pwd / pack
2511 script run hf_mf_ultimatecard -p 11223344 -a 8080
2512 -- set version to NTAG213
2513 script run hf_mf_ultimatecard -v 0004040201000f03
2514 -- set ATQA/SAK to [00 44] [08]
2515 script run hf_mf_ultimatecard -q 004408
2516 -- wipe tag with a NTAG213 or Mifare 1k S50 4 byte
2517 script run hf_mf_ultimatecard -w 1
2518 -- use a non default UMC key. Only use this if the default key for the MAGIC CARD was changed.
2519 script run hf_mf_ultimatecard -k ffffffff -w 1
2520 -- Wipe tag, turn into NTAG215, set sig, version, NTAG pwd/pak, and OTP.
2521 script run hf_mf_ultimatecard -w 1 -t 18 -u 04112233445566 -s 112233445566778899001122334455667788990011223344556677 -p FFFFFFFF -a 8080 -o 11111111
2524 Special raw commands summary:
2527 CF <passwd> 32 <00-04> // Configure GTU shadow mode
2528 CF <passwd> 34 <1b length><0-16b ATS> // Configure ATS
2529 CF <passwd> 35 <2b ATQA><1b SAK> // Configure ATQA/SAK (swap ATQA bytes)
2530 CF <passwd> 68 <00-02> // Configure UID length
2531 CF <passwd> 69 <00-01> // (De)Activate Ultralight mode
2532 CF <passwd> 6A <00-03> // Select Ultralight mode
2533 CF <passwd> 6B <1b> // Set Ultralight and M1 maximum read/write sectors
2534 CF <passwd> C6 // Dump configuration
2535 CF <passwd> CC // Version info, returns `00 00 00 [03 A0 (old) / 06 A0 (new) ]`
2536 CF <passwd> CD <1b block number><16b block data> // Backdoor write 16b block
2537 CF <passwd> CE <1b block number> // Backdoor read 16b block
2538 CF <passwd> CF <1b param> // (De)Activate direct write to block 0
2539 CF <passwd> F0 <30b configuration data> // Configure all params in one cmd
2540 CF <passwd> F1 <30b configuration data> // Configure all params in one cmd and fuse the configuration permanently
2541 CF <passwd> FE <4b new_password> // change password
2544 Default `<passwd>`: `00000000`
2548 ^[Top](#top) ^^[Gen4](#g4top)
2550 * UID: 4b, 7b and 10b versions
2551 * ATQA/SAK: changeable
2553 * ATS: changeable, can be disabled
2554 * Card Type: changeable
2556 * Backdoor password mode
2558 ### Proxmark3 commands
2560 ^[Top](#top) ^^[Gen4](#g4top)
2563 # view contents of tag memory:
2565 # Read a specific block via backdoor command:
2567 # Write a specific block via backdoor command:
2571 # Save dump from tag:
2575 👉 **TODO** `hf mf gview` is currently missing Ultralight memory maps
2580 hf 14a raw -s -c -t 1000 CF00000000CE00
2581 hf 14a raw -s -c -t 1000 CF00000000CE01
2582 hf 14a raw -s -c -t 1000 CF00000000CE02
2586 👉 **TODO** In Mifare Ultralight / NTAG mode, the special writes (`hf mfu restore` option `-s`, `-e`, `-r`) do not apply. Use `script run hf_mf_ultimatecard` for UID and signature, and `hf mfu wrbl` for PWD and PACK.
2588 ### Change ATQA / SAK
2590 ^[Top](#top) ^^[Gen4](#g4top)
2593 hf 14a raw -s -c -t 1000 CF<passwd>35<2b ATQA><1b SAK>
2596 * ⚠ ATQA bytes are swapped in the command
2597 * ⚠ ATQA bytes that result in `iso14443a card select failed` (I.E. ATQA=0040 in raw form) can be corrected with `hf 14a config --atqa force`
2598 * ⚠ when SAK bit 6 is set (e.g. SAK=20 or 28), ATS must be turned on, otherwise the card may not be recognized by some readers!
2599 * ⚠ never set SAK bit 3 (e.g. SAK=04), it indicates an extra cascade level is required (see `hf 14a config --cl2 skip` or `hf 14a config --cl3 skip` to recover a misconfigured card)
2601 Example: ATQA 0044 SAK 28, default pwd
2604 hf 14a raw -s -c -t 1000 CF0000000035440028
2607 OR (Note the script will correct the ATQA correctly)
2610 script run hf_mf_ultimatecard -q 004428
2615 ^[Top](#top) ^^[Gen4](#g4top)
2618 hf 14a raw -s -c -t 1000 CF<passwd>34<1b length><0-16b ATS>
2621 * `<length>`: ATS length byte, set to `00` to disable ATS
2622 * ⚠ when SAK bit 6 is set (e.g. SAK=20 or 28), ATS must be turned on, otherwise the card may not be recognized by some readers!
2623 * ATS CRC will be added automatically, don't configure it
2624 * Max ATS length: 16 bytes (+CRC)
2626 Example: ATS to 0606757781028002F0, default pwd
2629 hf 14a raw -s -c -t 1000 CF000000003406067577810280
2635 script run hf_mf_ultimatecard -z 06067577810280`
2638 ### Set UID length (4, 7, 10)
2640 ^[Top](#top) ^^[Gen4](#g4top)
2643 hf 14a raw -s -c -t 1000 CF<passwd>68<1b param>
2651 Example: set UID length to 7 bytes, default pwd
2654 hf 14a raw -s -c -t 1000 CF000000006801
2659 ^[Top](#top) ^^[Gen4](#g4top)
2661 UID is configured according to block0 with a backdoor write. (Script commands are below the UID length examples)
2663 Example: preparing first two blocks: (Note the UMC has to be in MFC mode and the correct UID byte length set)
2666 hf 14a raw -s -c -t 1000 CF00000000CD00000102030405060708090A0B0C0D0E0F
2667 hf 14a raw -s -c -t 1000 CF00000000CD01101112131415161718191A1B1C1D1E1F
2675 `script run hf_mf_ultimatecard -t 4 -u 00010203`
2679 => UID `00010203040506`
2681 `script run hf_mf_ultimatecard -t 5 -u 00010203040506`
2685 => UID `00010203040506070809`
2687 `script run hf_mf_ultimatecard -t 6 -u 00010203040506070809`
2689 Ultralight mode, 4b UID
2693 Ultralight mode, 7b UID
2695 => UID `00010210111213`
2697 👉 the UID is composed of first two blocks as in regular Ultralights
2700 * UL-EV1 48b = `script run hf_mf_ultimatecard -t 12 -u 00010203040506`
2701 * UL EV1 128b = `script run hf_mf_ultimatecard -t 13 -u 00010203040506`
2702 * NTAG 215 = `script run hf_mf_ultimatecard -t 18 -u 00010203040506`
2704 Ultralight mode, 10b UID
2705 => UID `00010203040506070809`
2706 👉 the UID is composed only from block0
2708 ### Set 14443B UID and ATQB
2710 ^[Top](#top) ^^[Gen4](#g4top)
2712 * UID and ATQB are configured according to block0 with a (14a) backdoor write.
2713 * UID size is always 4 bytes.
2714 * 14B will show up only on new cards. (Need more tests on new card. Example not work)
2719 hf 14a raw -s -c -t 1000 CF00000000CD00000102030405060708090A0B0C0D0E0F
2724 => ATQB 0405060708090A
2726 ### (De)Activate Ultralight mode
2728 ^[Top](#top) ^^[Gen4](#g4top)
2731 hf 14a raw -s -c -t 1000 CF<passwd>69<1b param>
2735 * `00`: MIFARE Classic mode
2736 * `01`: MIFARE Ultralight/NTAG mode
2738 Example: activate Ultralight protocol, default pwd
2741 hf 14a raw -s -c -t 1000 CF000000006901
2747 script run hf_mf_ultimatecard -n 01
2750 In this mode, if SAK=`00` and ATQA=`0044`, it acts as an Ultralight card
2752 ⚠ only the first four bytes of each block will be mapped in the Ultralight memory map (so the Ultralight block numbers follow backdoor R/W block numbers).
2754 ### Select Ultralight mode
2756 ^[Top](#top) ^^[Gen4](#g4top)
2759 hf 14a raw -s -c -t 1000 CF<passwd>6A<1b param>
2768 ⚠ it supposes Ultralight mode was activated (cf command `69`)
2770 Example: set Ultralight mode to Ultralight-C, default pwd
2773 hf 14a raw -s -c -t 1000 CF000000006A02
2779 script run hf_mf_ultimatecard -m 02
2782 Now the card supports the 3DES UL-C authentication.
2784 ### Set Ultralight and M1 maximum read/write sectors
2786 ^[Top](#top) ^^[Gen4](#g4top)
2789 hf 14a raw -s -c -t 1000 CF<passwd>6B<1b blocks>
2792 Hexadecimal, maximum sector data, default 0xFF, range 0x00-0xFF
2794 Example: set maximum 63 blocks read/write for Mifare Classic 1K
2797 hf 14a raw -s -c -t 1000 CF000000006B3F
2800 ### Set shadow mode (GTU)
2802 ^[Top](#top) ^^[Gen4](#g4top)
2804 This description of shadow modes wroted by seller at marketpalces:
2806 >This mode is divided into four states: off (pre-write), on (on restore), don’t care, and high-speed read and write. If you use it, please enter the pre-write mode first. At this time, write the full card data. After writing, set it to on. At this time, after writing the data, the first time you read the data just written, the next time you read It is the pre-written data. All modes support this operation. It should be noted that using any block to read and write in this mode may give wrong results.
2808 And these conclusions were made after a number of tests with UMC (new version, configured as MFC for example):
2810 | Mode | Buffer | Standart command (rdbl, wrbl e.t.c) | Backdoor command (gsetblk, ggetblk, gload e.t.c.) |
2811 |------|--------|-----------------------------------------|---------------------------------------------------|
2812 | 2,3 | buf23 | read/write from/to buf23 | read/write from/to buf23 |
2813 | 0 | buf0 | read from buf0, write to buf0 and buf23 | read/write from/to buf23 |
2814 | 4 | - | read from buf0, write to buf23 | read/write from/to buf23 |
2816 Mode 1: For new card this mode looks like a bug. Reading/writing first two block use *buf23*. Reading other blocks use invalid region of memory and all returned data looks like pseudo-random. All acl looks like invalid. All data is readable by the keys and acl wich was written in *buf0*. Any writing operations in this mode use copy of *buf0* and only it. It`s not affected any other buffers. So if you change keys or/and acl you will must use new keys to read data.
2818 Example (not work with new UMC):
2819 `script run hf_mf_ultimatecard -w 1 -g 00 -t 18 -u 04112233445566 -s 112233445566778899001122334455667788990011223344556677 -p FFFFFFFF -a 8080 -o 11111111 -g 01`
2821 * -w 1 = wipe the card in Ultralight Mode
2822 * -g 00 = turn on pre-write mode
2823 * -t 18 = change the type of card to NTAG 215
2825 * -s = set the signature
2826 * -p = set the NTAG password
2829 * -g 01 = turn on restore mode
2831 At this point the card is set to a unwritten NTAG 215. Now any data written to the card will only last for 1 read. Write a popular game toy to it, read it, now it is back to the unwritten NTAG 215.
2833 👉 Remember to disable GTU mode to get the card back to a normal state.
2835 `script run hf_mf_ultimatecard -g 03`
2838 hf 14a raw -s -c -t 1000 CF<passwd>32<1b param>
2842 * `00`: pre-write, shadow data can be written
2843 * `01`: restore mode
2844 * WARNING: new UMC (06a0) cards return garbage data when using 01
2846 * `03`: disabled, high speed R/W mode for Ultralight?
2847 * `04`: split mode, work with new UMC. With old UMC is untested.
2849 ### Direct block read and write
2851 ^[Top](#top) ^^[Gen4](#g4top)
2853 Using the backdoor command, one can read and write any area without MFC password, similarly to MFC Gen1 card. It should be noted that this command must be used to modify UID.
2855 Backdoor read 16b block:
2858 hf 14a raw -s -c -t 1000 CF<passwd>CE<1b block number>
2861 Backdoor write 16b block:
2864 hf 14a raw -s -c -t 1000 CF<passwd>CD<1b block number><16b block data>
2867 Read/Write operations work on 16 bytes, no matter the Ultralight mode.
2869 Note that only the first four bytes of each block will be mapped in the Ultralight memory map.
2871 Example: read block0, default pwd
2874 hf 14a raw -s -c -t 1000 CF00000000CE00
2877 Example: write block0 with factory data, default pwd
2880 hf 14a raw -s -c -t 1000 CF00000000CD00112233441C000011778185BA18000000
2883 ### (De)Activate direct write to block 0
2885 ^[Top](#top) ^^[Gen4](#g4top)
2887 This command enables/disables direct writes to block 0.
2890 hf 14a raw -s -c -t 1000 CF<passwd>CF<1b param>
2894 * `00`: Activate direct write to block 0 (Same behaviour of Gen2 cards. Some readers may identify the card as magic)
2895 * `01`: Deactivate direct write to block 0 (Same behaviour of vanilla cards)
2896 * `02`: Default value. (Same behaviour as `00` (?))
2898 Example: enable direct writes to block 0, default pwd
2901 hf 14a raw -s -c -t 1000 CF00000000CF00
2904 Example: disable direct writes to block 0, default pwd
2907 hf 14a raw -s -c -t 1000 CF00000000CF01
2910 ### Change backdoor password
2912 ^[Top](#top) ^^[Gen4](#g4top)
2914 All backdoor operations are protected by a password. If password is forgotten, it can't be recovered. Default password is `00000000`.
2916 WARNING: new UMC (06A0) returns 6300 when issuing password change command. Please write the password using F0 and entering the full configuration, but with the new password.
2921 hf 14a raw -s -c -t 1000 CF <passwd> FE <4b new_password>
2924 Example: change password from 00000000 to AABBCCDD
2927 hf 14a raw -s -c -t 1000 CF00000000FEAABBCCDD
2930 Example: change password from AABBCCDD back to 00000000
2933 hf 14a raw -s -c -t 1000 CFAABBCCDDFE00000000
2936 ### Dump configuration
2938 ^[Top](#top) ^^[Gen4](#g4top)
2941 hf 14a raw -s -c -t 1000 CF<passwd>C6
2944 Default configuration:
2947 00000000000002000978009102DABC191010111213141516040008006B024F6B
2948 ^^^^ CRC, type unknown
2949 ^^ cf cmd cf: block0 direct write setting, factory value 0x02
2950 ^^ cf cmd 6b: maximum read/write sectors, factory value 0x6b
2951 ^^ cf cmd 6a: UL mode
2952 ^^^^^^ cf cmd 35: ATQA/SAK
2953 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cf cmd 34: ATS length & content
2954 ^^ cf cmd 32: GTU mode
2955 ^^^^^^^^ cf cmd fe: password
2956 ^^ cf cmd 68: UID length
2957 ^^ cf cmd 69: Ultralight protocol
2960 ### Fast configuration
2962 ^[Top](#top) ^^[Gen4](#g4top)
2965 hf 14a raw -s -c -t 1000 CF<passwd>F0<30b configuration data>
2968 cf **Dump configuration** for configuration data description.
2970 Example: Write factory configuration, using default password
2973 hf 14a raw -s -c -t 1000 CF00000000F000000000000002000978009102DABC191010111213141516040008004F6B
2976 ⚠ Variant with command `F1` instead of `F0` will set and fuse permanently the configuration. Backdoor R/W will still work.
2980 ^[Top](#top) ^^[Gen4](#g4top)
2982 Here are some presets available in the FuseTool (but with all ATS disabled)
2984 **MIFARE Mini S20 4-byte UID**
2987 hf 14a raw -s -c -t 1000 CF00000000F000000000000002000978009102DABC19101011121314151604000900
2990 **MIFARE Mini S20 7-byte UID**
2993 hf 14a raw -s -c -t 1000 CF00000000F000010000000002000978009102DABC19101011121314151644000900
2996 **MIFARE 1k S50 4-byte UID** (this is the factory setting)
2999 hf 14a raw -s -c -t 1000 CF00000000F000000000000002000978009102DABC19101011121314151604000800
3002 **MIFARE 1k S50 7-byte UID**
3005 hf 14a raw -s -c -t 1000 CF00000000F000010000000002000978009102DABC19101011121314151644000800
3008 **MIFARE 4k S70 4-byte UID**
3011 hf 14a raw -s -c -t 1000 CF00000000F000000000000002000978009102DABC19101011121314151602001800
3014 **MIFARE 4k S70 7 byte UID**
3017 hf 14a raw -s -c -t 1000 CF00000000F000010000000002000978009102DABC19101011121314151642001800
3023 hf 14a raw -s -c -t 1000 CF00000000F001010000000003000978009102DABC19101011121314151644000003FB
3029 hf 14a raw -s -c -t 1000 CF00000000F001010000000003000978009102DABC19101011121314151644000002FB
3035 hf 14a raw -s -c -t 1000 CF00000000F001010000000003000978009102DABC19101011121314151644000000FB
3041 hf 14a raw -s -c -t 1000 CF00000000F001010000000003000978009102DABC19101011121314151644000001FB
3044 ### Version and Signature
3046 ^[Top](#top) ^^[Gen4](#g4top)
3048 Don't forget configure maximum read/write blocks. It's can be adjusted directly in config (see *Dump configuration*) or by command 6B:
3051 hf 14a raw -s -c -t 1000 CF000000006BFB
3056 Ultralight EV1 and NTAG Version info and Signature are stored respectively in blocks 250-251 and 242-249.
3058 Example for an Ultralight EV1 128b with the signature sample from tools/recover_pk.py
3061 hf 14a raw -s -c -t 1000 CF00000000F001010000000003000978009102DABC19101011121314151644000000FB
3062 hf mfu wrbl -b 0 -d 04C12865
3063 hf mfu wrbl -b 1 -d 5A373080
3064 hf mfu wrbl -b 242 -d CEA2EB0B --force
3065 hf mfu wrbl -b 243 -d 3C95D084 --force
3066 hf mfu wrbl -b 244 -d 4A95B824 --force
3067 hf mfu wrbl -b 245 -d A7553703 --force
3068 hf mfu wrbl -b 246 -d B3702378 --force
3069 hf mfu wrbl -b 247 -d 033BF098 --force
3070 hf mfu wrbl -b 248 -d 7899DB70 --force
3071 hf mfu wrbl -b 249 -d 151A19E7 --force
3072 hf mfu wrbl -b 250 -d 00040301 --force
3073 hf mfu wrbl -b 251 -d 01000E03 --force
3077 Example for an NTAG216 with the signature sample from tools/recover_pk.py
3080 hf 14a raw -s -c -t 1000 CF00000000F001010000000003000978009102DABC19101011121314151644000001FB
3081 hf mfu wrbl -b 0 -d 04E10C61
3082 hf mfu wrbl -b 1 -d DA993C80
3083 hf mfu wrbl -b 242 -d 8B76052E --force
3084 hf mfu wrbl -b 243 -d E42F5567 --force
3085 hf mfu wrbl -b 244 -d BEB53238 --force
3086 hf mfu wrbl -b 245 -d B3E3F995 --force
3087 hf mfu wrbl -b 246 -d 0707C0DC --force
3088 hf mfu wrbl -b 247 -d C956B5C5 --force
3089 hf mfu wrbl -b 248 -d EFCFDB70 --force
3090 hf mfu wrbl -b 249 -d 9B2D82B3 --force
3091 hf mfu wrbl -b 250 -d 00040402 --force
3092 hf mfu wrbl -b 251 -d 01001303 --force
3100 These are chips to clone other ICs. Usually the originals are only sold in China.
3106 * Magic tag for Fudan FM1208-9 chips
3113 * ATQA-SAK: `0008`-`20`
3114 * ATS: `10 78 80 A0 02 00 9D 46 16 40 00 A3 [UID]`
3115 * Compared to real FM1208 chip:
3116 * CLA byte is ignored
3117 * Command parsing is irregular (some replies are wrong)
3123 **WARNING!!!** Risk of bricking tag - cause is unknown
3125 * Below you can find a list of all INS bytes not present on real FM1208 chip, and what their output is when executed (P1, P2, Lc = 00)
3126 * Results may vary between chips:
3130 0A | 44454641554C540000002018112840000000000000000000000000000000000000000000000000000000400000000000
3131 3B | 00000000001C0EF90000000000000000000000000000000000000000000000002000000000C09040009002840000000000000000000000000000000000006C0FC08700EB1A9F1BA01801010019000000000000000000000000000090000000000000094B066600000000007D000000000000000000000000000000003B000000107880A002009D46164000A3CA81E15000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
3134 7D | Tag does not reply (if 0<Lc<=15, RES=6700)
3144 * - DO NOT EXECUTE THIS INSTRUCTION!!! After 2nd execution tag will brick (No reply to REQA/WUPA). Very likely you need to add extra data which we do not know
3151 * Magic tag for "NSC/BS-CPU"
3157 * Programming is done via ISO14443-A (but not sure how to modulate). Original tag is working somewhere hidden from proxmark.
3158 * ATQA-SAK: `0044`-`20`
3159 * ATS: `05 72 F7 60 02`
3160 * Communications encrypted(?)
3161 * When writing with copykey, after RATS, this communication takes place (NSC ID programmed: `5800000000`, tag UID: `1D94CE25840000`):
3164 >>> 54 03 8A BC DF C1 [CRC]
3166 >>> 54 04 57 AA 84 DD [CRC]
3174 * Write NSC UID: `54 [part 1b] [data 4b enc] [CRC]`
3175 * Tag replies: `A2 [CRC]`