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 lrc -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 USCUID - 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. Please note that some newer FUIDs have had ton configration blocks locked down and are truly a write-once tag.
1058 Allows direct write to block 0 only when UID is default `AA55C396`. If your tag responds to a gen4 magic wakeup, the UID could always 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
1082 [+] Magic capabilities... Gen 4 GDM / USCUID ( Alt Magic Wakeup )
1083 [+] Magic capabilities... Write Once / FUID
1087 or locked down tag type:
1092 [+] Magic capabilities... Write Once / FUID
1096 ### Parsed configuration
1101 [usb] pm3 --> hf mf gdmcfg --gdm
1102 [+] Config... 7A FF 85 00 00 00 00 00 00 FF 00 00 00 00 00 08
1103 [+] 7A FF ......................................... Magic wakeup enabled with GDM config block access
1104 [+] 85 ...................................... Magic wakeup style GDM 20(7)/23
1105 [+] 00 00 00 ............................. Unknown
1106 [+] 00 .......................... Key B use allowed when readable by ACL
1107 [+] 00 ....................... Block 0 Direct Write Disabled (CUID)
1108 [+] 00 .................... Unknown
1109 [+] FF ................. MFC EV1 personalization: 4B UID from Block 0
1110 [+] 00 .............. Shadow mode disabled
1111 [+] 00 ........... Magic auth disabled
1112 [+] 00 ........ Static encrypted nonce disabled
1113 [+] 00 ..... MFC EV1 signature disabled
1117 **Note: this is only possile on the FUID style that has not been locked down.
1123 * Magic wakeup: `20(7)`, `23`
1124 * Backdoor read main block: `30xx+crc`
1125 * Backdoor write main block: `A0xx+crc`, `[16 bytes data]+crc`
1126 * Read hidden block: `38xx+crc`
1127 * Write hidden block: `A8xx+crc`, `[16 bytes data]+crc`
1128 * Read configuration: `E000+crc`
1129 * Write configuration: `E100+crc`
1130 * Example of changing block 0 after the personalization (only possible on tags that have not been locked down):
1133 [usb] pm3 --> hf 14a raw -k -a -b 7 20
1135 [usb] pm3 --> hf 14a raw -k -a 23
1137 [usb] pm3 --> hf 14a raw -c -k -a A000
1139 [usb] pm3 --> hf 14a raw -c -k -a B502454EBC0804000168AA8947CE4D1D <- Writing 0 block with the backdoor command
1141 [usb] pm3 --> hf 14a raw -c -a 5000
1142 [usb] pm3 --> hf mf rdbl --blk 0
1144 [=] # | sector 00 / 0x00 | ascii
1145 [=] ----+-------------------------------------------------+-----------------
1146 [=] 0 | B5 02 45 4E BC 08 04 00 01 68 AA 89 47 CE 4D 1D | ..EN.....h..G.M.
1149 ### Proxmark3 commands
1153 * `hf mf gdmcfg --gdm`
1154 * `hf mf gdmsetcfg --gdm`
1155 * `hf mf gdmsetblk --gdm`
1161 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.
1163 *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).*
1169 * Configuration block value: `7AFF000000000000BAFA000000000008`
1170 * No direct write to block 0
1171 * Responds to magic wakeup `40(7)`, `43` commands before the sealing
1172 * Acknowledge only the first (except wakeup command) and last config byte(s), so doesn't have the hidden block
1181 [+] Magic capabilities... Gen 1a
1182 [+] Magic capabilities... Gen 4 GDM / USCUID ( Gen1 Magic Wakeup )
1186 Currently Proxmark3 doesn't identify it as a separate tag.
1187 Before the sealing could be detected from the config block value.
1189 ### Parsed configuration
1194 [usb] pm3 --> hf mf gdmcfg --gen1a
1195 [+] Config... 7A FF 00 00 00 00 00 00 BA FA 00 00 00 00 00 08
1196 [+] 7A FF ......................................... Magic wakeup enabled with GDM config block access
1197 [+] 00 ...................................... Magic wakeup style Gen1a 40(7)/43
1198 [+] 00 00 00 ............................. Unknown
1199 [+] 00 .......................... Key B use allowed when readable by ACL
1200 [+] 00 ....................... Block 0 Direct Write Disabled (CUID)
1201 [+] BA .................... Unknown
1202 [+] FA ................. MFC EV1 personalization: 4B UID from Block 0
1203 [+] 00 .............. Shadow mode disabled
1204 [+] 00 ........... Magic auth disabled
1205 [+] 00 ........ Static encrypted nonce disabled
1206 [+] 00 ..... MFC EV1 signature disabled
1215 All commands are available before sealing. After the sealing acts as a Mifare Classic 1K tag.
1217 * Magic wakeup: `40(7)`, `43`
1218 * Backdoor read main block: `30xx+crc`
1219 * Backdoor write main block: `A0xx+crc`, `[16 bytes data]+crc`
1220 * Read configuration: `E000+crc`
1221 * Write configuration: `E100+crc`
1222 * Example of the sealing, performed by Chinese copiers in raw commands:
1225 hf 14a raw -a -k -b 7 40
1227 hf 14a raw -k -c e100
1228 hf 14a raw -c 85000000000000000000000000000008
1231 ### Proxmark3 commands
1235 All commands are available before sealing.
1237 * `hf mf gdmcfg --gen1a`
1238 * `hf mf gdmsetcfg --gen1a`
1239 * `hf mf gdmsetblk --gen1a`
1253 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.
1259 * Configuration block value: `7AFF0000000000000000000000000008`
1260 * No direct write to block 0
1261 * Responds to magic wakeup `40(7)`, `43` commands
1262 * Acknowledge only the first (except wakeup command) and last config byte(s), so doesn't have the hidden block
1271 [+] Magic capabilities... Gen 1a
1272 [+] Magic capabilities... Gen 4 GDM / USCUID ( Gen1 Magic Wakeup )
1276 Currently Proxmark3 doesn't identify it as a separate tag.
1277 Could be detected from the config block value.
1279 ### Parsed configuration
1284 [usb] pm3 --> hf mf gdmcfg --gen1a
1285 [+] Config... 7A FF 00 00 00 00 00 00 00 00 00 00 00 00 00 08
1286 [+] 7A FF ......................................... Magic wakeup enabled with GDM config block access
1287 [+] 00 ...................................... Magic wakeup style Gen1a 40(7)/43
1288 [+] 00 00 00 ............................. Unknown
1289 [+] 00 .......................... Key B use allowed when readable by ACL
1290 [+] 00 ....................... Block 0 Direct Write Disabled (CUID)
1291 [+] 00 .................... Unknown
1292 [+] 00 ................. MFC EV1 personalization: 4B UID from Block 0
1293 [+] 00 .............. Shadow mode disabled
1294 [+] 00 ........... Magic auth disabled
1295 [+] 00 ........ Static encrypted nonce disabled
1296 [+] 00 ..... MFC EV1 signature disabled
1305 * Magic wakeup: `40(7)`, `43`
1306 * Backdoor read main block: `30xx+crc`
1307 * Backdoor write main block: `A0xx+crc`, `[16 bytes data]+crc`
1308 * Read hidden block: `38xx+crc`
1309 * Write hidden block: `A8xx+crc`, `[16 bytes data]+crc`
1310 * Read configuration: `E000+crc`
1311 * Write configuration: `E100+crc`
1313 ### Proxmark3 commands
1317 * `hf mf gdmcfg --gen1a`
1318 * `hf mf gdmsetcfg --gen1a`
1319 * `hf mf gdmsetblk --gen1a`
1333 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.
1342 * Configuration block value: `850000000000000000005A5A00000008`
1343 * No direct write to block 0
1344 * Responds to magic authentication: select, `8000+crc`, `[Crypto1 Auth: 000000000000]`
1353 [+] Magic capabilities... Gen 4 GDM / USCUID ( Magic Auth )
1357 Could be manually validated with the configuration block value.
1359 ### Parsed configuration
1364 [usb] pm3 --> hf mf gdmcfg
1365 [+] Config... 85 00 00 00 00 00 00 00 00 00 5A 5A 00 00 00 08
1366 [+] 85 00 ......................................... Magic wakeup disabled
1367 [+] 00 ...................................... Magic wakeup style Gen1a 40(7)/43
1368 [+] 00 00 00 ............................. Unknown
1369 [+] 00 .......................... Key B use allowed when readable by ACL
1370 [+] 00 ....................... Block 0 Direct Write Disabled (CUID)
1371 [+] 00 .................... Unknown
1372 [+] 00 ................. MFC EV1 personalization: 4B UID from Block 0
1373 [+] 5A .............. Shadow mode enabled
1374 [+] 5A ........... Magic auth enabled
1375 [+] 00 ........ Static encrypted nonce disabled
1376 [+] 00 ..... MFC EV1 signature disabled
1385 * Magic authentication: select, `8000+crc`, `[Crypto1 Auth: 000000000000]`
1386 * Backdoor read: `38xx+crc`
1387 * Backdoor write: `A8xx+crc`, `[16 bytes data]+crc`
1388 * Read configuration: `E000+crc`
1389 * Write configuration: `E100+crc`; `[16 bytes data]+crc`
1391 ### Proxmark3 commands
1395 * Backdoor write: `gdmsetcfg`
1396 * Read configuration: `gdmcfg`
1397 * Write configuration: `gdmsetcfg`
1403 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.
1409 * Configuration block value: `850000000000005A00FF005A00000008`
1410 * Allows direct write to the block 0, so is Android compatible
1411 * Responds to magic authentication: select, `8000+crc`, `[Crypto1 Auth: 000000000000]`
1420 [+] Magic capabilities... Gen 2 / CUID
1421 [+] Magic capabilities... Gen 4 GDM / USCUID ( Magic Auth )
1425 Currently Proxmark3 doesn't identify it as a separate tag.
1426 Could be manually validated with the configuration block value.
1428 ### Parsed configuration
1433 [usb] pm3 --> hf mf gdmcfg
1434 [+] Config... 85 00 00 00 00 00 00 5A 00 FF 00 5A 00 00 00 08
1435 [+] 85 00 ......................................... Magic wakeup disabled
1436 [+] 00 ...................................... Magic wakeup style Gen1a 40(7)/43
1437 [+] 00 00 00 ............................. Unknown
1438 [+] 00 .......................... Key B use allowed when readable by ACL
1439 [+] 5A ....................... Block 0 Direct Write Enabled (CUID)
1440 [+] 00 .................... Unknown
1441 [+] FF ................. MFC EV1 personalization: 4B UID from Block 0
1442 [+] 00 .............. Shadow mode disabled
1443 [+] 5A ........... Magic auth enabled
1444 [+] 00 ........ Static encrypted nonce disabled
1445 [+] 00 ..... MFC EV1 signature disabled
1454 * Magic authentication: select, `8000+crc`, `[Crypto1 Auth: 000000000000]`
1455 * Backdoor read: `38xx+crc`
1456 * Backdoor write: `A8xx+crc`, `[16 bytes data]+crc`
1457 * Read configuration: `E000+crc`
1458 * Write configuration: `E100+crc`; `[16 bytes data]+crc`
1460 ### Proxmark3 commands
1464 * Backdoor write: `gdmsetcfg`
1465 * Read configuration: `gdmcfg`
1466 * Write configuration: `gdmsetcfg`
1468 ## MIFARE Classic, other versions
1474 * ZXUID, EUID, ICUID, KUID?
1476 ## MIFARE Classic Super
1480 It behaves like regular Mifare Classic but records reader auth attempts.
1482 ### MIFARE Classic Super Gen1
1486 Old type of cards, hard to obtain. They are DirectWrite, UID can be changed via 0 block or backdoor commands.
1491 * ATS: fixed, 0978009102DABC1910F005
1493 ATQA/SAK matches 1k card, but works as 4k card.
1495 Backdoor commands provided over APDU. Format:
1498 00 A6 A0 00 05 FF FF FF FF 00
1499 ^^ ^^ Backdoor command header
1500 ^^ Backdoor command (A0 - set UID/B0 - get trace/C0 - reset card)
1501 ^^ Type of answer (used in key recovery to select trace number)
1502 ^^ Length of user provided data
1503 ^^ ^^ ^^ ^^ ^^ User data
1506 👉 You can't change UID with backdoor command if incorrect data is written to the 0 sector trailer!
1508 ### MIFARE Classic Super Gen1B
1510 DirectWrite card, ATS unknown. Probably same as Gen1, except backdoor commands.
1511 Implementation: https://github.com/netscylla/super-card/blob/master/libnfc-1.7.1/utils/nfc-super.c
1513 ### MIFARE Classic Super Gen2
1517 New generation of cards, based on limited Gen4 chip. Emulates Gen1 backdoor protocol, but can store up to 7 different traces.
1519 Card always answers `ff ff ff ff` as `at`, so reading/writing it via Mifare protocol is impossible.
1521 UID is changeable via UMC backdoor write to 0 block.
1523 * UID: 4b and 7b versions
1526 * ATS: changeable, default as Gen1
1528 Gen4 commands available:
1531 CF <passwd> 34 <1b length><0-16b ATS> // Configure ATS
1532 CF <passwd> CC // Version information, returns 00 00 00 02 AA
1533 CF <passwd> CD <1b block number><16b block data> // Backdoor write 16b block
1534 CF <passwd> CE <1b block number> // Backdoor read 16b block
1535 CF <passwd> FE <4b new_password> // Change password
1538 ### MIFARE Classic Super Furui
1542 #### Characteristics
1546 * SAK/ATQA: play blindly the block0 bytes, beware!
1547 * BCC: play blindly the block0 BCC bytes, beware!
1550 **!!!WARNING!!!** This tag can die for no reason (no reply to WUPA/REQA). We don't know why this happens.
1557 [usb] pm3 --> hf 14a raw -sct 250 AAA500000000000000000000000000000000
1565 * Configure: `AAA5[16 byte config]`+crc
1566 * Write block 0: `AAA4[4b UID][1b BCC][1b SAK][2b ATQA reversed]0000000000000000`+crc
1567 * Recover trace: `AAA8[00/01][00-08]`+crc
1569 Caution: tag does not append CRC to magic responses!
1571 Please use config as 00 bytes.
1576 44 33 22 11 03 61 08 68 7A C7 4B 62 43 A6 11 6F 64 F3
1578 ^^ ^^ -- auth command, reversed
1579 ^^ ^^ ^^ ^^ -- Auth (nt)
1580 ^^ ^^ ^^ ^^ -- Auth (nr)
1581 ^^ ^^ ^^ ^^ -- Auth (ar)
1588 Only Gen1/Gen2 at this moment (Gen1B is unsupported):
1593 [+] Magic capabilities... Super card ( Gen ? )
1596 ### Proxmark3 commands
1599 [usb] pm3 --> hf mf supercard
1602 [usb] pm3 --> hf mf supercard --furui
1610 ## MIFARE Ultralight blocks 0..2
1620 UID is made of SN0..SN6 bytes
1622 Computing BCC0 on UID 04112233445566: `analyse lrc -d 88041122` = `bf`
1624 Computing BCC1 on UID 04112233445566: `analyse lrc -d 33445566` = `44`
1626 Int is internal, typically 0x48
1628 Anticol shortcut (CL1/3000) is supported for UL, ULC, NTAG except NTAG I2C
1630 Some cards have a password: `B6AA558D`. Usually "copykey" chips.
1632 ## MIFARE Ultralight Gen1A
1650 #### SAK, ATQA, BCC, ATS
1652 **TODO** need more tests
1654 ### Proxmark3 commands
1659 script run hf_mfu_setuid -h
1662 When "soft-bricked" (by writing invalid data in block0), these ones may help:
1666 script run hf_mf_magicrevive -u
1669 ## MIFARE Ultralight DirectWrite
1680 [+] Magic capabilities : Gen 2 / CUID
1683 It seems so far that all MFUL DW have an ATS response in factory configuration.
1689 Issue three regular MFU write commands in a row to write first three blocks.
1695 * UID: Only 7b versions
1697 * all cards play fix ATQA
1699 * all cards play fix SAK
1701 * some cards play blindly the block0 BCC0 and block2 BCC1 bytes, beware!
1702 * some cards compute proper BCC0 and BCC1 in anticollision
1704 * all cards reply with an ATS
1706 #### MIFARE Ultralight DirectWrite flavour 1
1711 * ATS: 0A78008102DBA0C119402AB5
1712 * Anticol shortcut (CL1/3000): fails
1714 ### Proxmark3 commands
1722 Equivalent: don't use `hf mfu wrbl` as you need to write three blocks in a row, but do, with proper BCCx:
1725 hf 14a raw -s -c -k a2 00 041122bf
1726 hf 14a raw -c -k a2 01 33445566
1727 hf 14a raw -c a2 02 44480000
1730 When "soft-bricked" (by writing invalid data in block0), these ones may help:
1739 hf 14a config --atqa force --bcc ignore --cl2 force --cl3 skip --rats skip
1740 hf mfu setuid --uid 04112233445566
1753 See `--uid` and `--full`
1759 * MIFARE++ Ultralight
1761 ## MIFARE Ultralight EV1 DirectWrite
1765 Similar to MFUL DirectWrite
1774 [+] Magic capabilities : Gen 2 / CUID
1781 * UID: Only 7b versions
1783 * all cards play fix ATQA
1785 * all cards play fix SAK
1787 * cards play blindly the block0 BCC0 and block2 BCC1 bytes, beware!
1789 * all cards reply with an ATS
1791 #### MIFARE Ultralight EV1 DirectWrite flavour 1
1795 * BCC: play blindly the block0 BCC0 and block2 BCC1 bytes, beware!
1796 * ATS: 850000A000000AC30004030101000B0341DF
1798 #### MIFARE Ultralight EV1 DirectWrite flavour 2
1802 * BCC: play blindly the block0 BCC0 and block2 BCC1 bytes, beware!
1803 * ATS: 850000A00A000AC30004030101000B0316D7
1805 #### MIFARE Ultralight EV1 DirectWrite flavour 3
1809 * BCC: play blindly the block0 BCC0 and block2 BCC1 bytes, beware!
1810 * ATS: 850000A000000A3C0004030101000E03
1812 ## MIFARE Ultralight C Gen1A
1816 Similar to MFUL Gen1A
1818 ## MIFARE Ultralight C DirectWrite
1822 Similar to MFUL DirectWrite
1831 [+] Magic capabilities : Gen 2 / CUID
1838 * UID: Only 7b versions
1840 * all cards play fix ATQA
1842 * all cards play fix SAK
1844 * cards compute proper BCC0 and BCC1 in anticollision
1846 * all cards reply with an ATS
1848 #### MIFARE Ultralight C DirectWrite flavour 1
1853 * ATS: 0A78008102DBA0C119402AB5
1854 * Anticol shortcut (CL1/3000): fails
1860 ## NTAG213 DirectWrite
1864 Similar to MFUL DirectWrite
1873 [+] Magic capabilities : Gen 2 / CUID
1880 * UID: Only 7b versions
1882 * all cards play fix ATQA
1884 * all cards play fix SAK
1886 * cards play blindly the block0 BCC0 and block2 BCC1 bytes, beware!
1888 * all cards reply with an ATS
1890 #### NTAG213 DirectWrite flavour 1
1894 * BCC: play blindly the block0 BCC0 and block2 BCC1 bytes, beware!
1895 * ATS: 0A78008102DBA0C119402AB5
1896 * Anticol shortcut (CL1/3000): succeeds
1909 [+] Magic capabilities : NTAG21x
1916 Emulates fully NTAG213, 213F, 215, 216, 216F
1918 Emulates partially UL EV1 48k/128k, NTAG210, NTAG212, NTAGI2C 1K/2K, NTAGI2C 1K/2K PLUS
1920 Anticol shortcut (CL1/3000): fails
1922 ### Proxmark3 commands
1927 script run hf_mfu_magicwrite -h
1934 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.
1940 Ultralight magic, 16 pages. Recommended for Vizit RF3.1 with markings "3.1" or "4.1".
1941 Behavior: allows writes to page 0-2.
1948 hf mfu rdbl --force -b 16
1949 hf 14a raw -sct 250 60
1954 `00 00 00 00 00 00 00 00`
1961 Ultralight EV1 magic; 41 page. Recommended for Vizit RF3.1 with 41 page.
1962 Behavior: allows writes to page 0-2.
1971 [=] TAG IC Signature: 0000000000000000000000000000000000000000000000000000000000000000
1973 [=] Raw bytes: 00 34 21 01 01 00 0E 03
1974 [=] Vendor ID: 34, Mikron JSC Russia
1975 [=] Product type: 21, unknown
1978 #### ULtra flavour 1
1982 Could be identified by indirect evidence before writing
1984 * Initial UID: `34 D7 08 11 AD D7 D0`
1985 * `hf mfu dump --ns`
1988 [=] 3/0x03 | CF 39 A1 C8 | 1 | .9..
1989 [=] 4/0x04 | B6 69 26 0D | 1 | .i&.
1990 [=] 5/0x05 | EC A1 73 C4 | 1 | ..s.
1991 [=] 6/0x06 | 81 3D 29 B8 | 1 | .=).
1992 [=] 16/0x10 | 6A F0 2D FF | 0 | j.-.
1993 [=] 20/0x14 | 6A F0 2D FF | 0 | j.-.
1994 [=] 24/0x18 | 6A F0 2D FF | 0 | j.-.
1995 [=] 38/0x26 | 00 E2 00 00 | 0 | .... <- E2, Virtual Card Type Identifier is not default
1999 #### ULtra flavour 2
2003 Could be identified by indirect evidence before writing
2005 * Initial UID: `04 15 4A 23 36 2F 81`
2006 * Values in pages `3, 4, 5, 6, 16, 20, 24, 38` are default for that tag flavour
2012 Ultralight EV1 magic; 41 page. Recommended for Vizit RF3.1 with 41 page.
2013 Created as a response to filters that try to overwrite page 0 (as a detection for [ULtra](#mifare-ultra) tags).
2015 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).
2017 **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).
2026 TAG IC Signature: 0000000000000000000000000000000000000000000000000000000000000000
2028 [=] Raw bytes: 00 34 21 01 01 00 0E 03
2029 [=] Vendor ID: 34, Mikron JSC Russia
2032 After personalization it is not possible to identify UL-5.
2034 The manufacturer confirmed unpersonalized tags could be identified by first 3 bytes of UID:
2045 ## MIFARE Ultralight USCUID-UL
2049 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.
2051 The cards will respond to a RATS with the config page in the factory configuration.
2053 As with the MFC USCUIDs, one cannot turn a Classic tag into an Ultralight and vice-versa!
2060 * ATQA: always read from hidden block `F6`
2061 * SAK: always read from hidden block `F6`
2062 * BCC: read from blocks 0-1 per Ultralight specification
2063 * ATS: These respond to an ATS request with the config page in factory mode.
2069 In factory config state:
2074 [=] -------------------------- ATS --------------------------
2075 [!] ATS may be corrupted. Length of ATS (18 bytes incl. 2 Bytes CRC) doesn't match TL
2076 [+] ATS: 85 00 85 A0 00 00 0A A5 00 04 04 02 01 00 0F 03 [ 07 00 ]
2079 If config has been modified to not display config block as ATS response:
2082 hf 14a raw -akb 7 40; hf 14a raw -k 43
2084 OR (depending on the magic wakeup method set)
2086 hf 14a raw -akb 7 20; hf 14a raw -k 23
2091 [+] 85 00 85 A0 00 00 0A A5 00 04 04 02 01 00 0F 03 [ 07 00 ]
2094 Possible tag wakeup mechanisms are:
2103 * Magic wakeup (A: 00): `40(7)`, `43`
2104 * Magic wakeup (B: 85): `20(7)`, `23`
2105 * Backdoor read main and hidden block: `30xx+crc`
2106 * Backdoor write main and hidden block: `A2xx[4 bytes data]+crc`
2107 * Read configuration: `E050+crc`
2108 * Write configuration: `E2[offset*4, 1b][data, 4b]+crc`
2111 * Set memory and config to 00 `F000+crc`
2112 * Set memory and config to FF `F100+crc`
2113 * Set memory and config to 55 (no 0A response) `F600+crc`
2115 ### USCUID-UL configuration guide
2123 850000A0 00000AC3 00040301 01000B03
2124 ^^ >> ??? Mystery ???
2125 ^^^^ >> Gen1a mode (works with bitflip)
2126 ^^ >> Magic wakeup command (00 for 40-43; 85 for 20-23)
2127 ^^ >> Config available using regular mode (ON: A0)
2128 ^^ >> Auth type (00 = PWD mode, 0A = 2TDEA mode for UL-C)
2129 ^^ >> CUID mode, allows writing to blocks 0-3 (ON: 0A)
2130 ^^ >> Maximum memory configuration, please see below *
2131 ^^^^^^^^ ^^^^^^^^ >> Version info
2133 * This isn't a customizable value - it's a preset. So far:
2140 55 = Unknown IC w/ 238 pgs.
2143 * Gen1a mode: Allow using custom wakeup commands, like real gen1a chip, to run backdoor commands, as well as some extras.
2144 * Magic wakeup command: Use different wakeup commands for entering Gen1a mode. A) 00 - 40(7), 43; B) 85 - 20(7), 23.
2145 * 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.
2149 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:
2152 hf 14a raw -sck E200850000A0; hf 14a raw -ck E20100000AC3; hf 14a raw -ck E20200040301; hf 14a raw -c E20301000B03
2159 ^^^^^^^^ >> Unknown, usually always 00
2162 ^^^^^^^^ >> Unknown, usually always 00
2177 ^^^^^^^^ >> Unknown, usually always 00
2180 ^^^^ >> ATQA in byte reverse order. 4400 = ATQA of 0044
2181 ^^ >> SAK1, usually set to 04 to call for CL2
2182 ^^ >> SAK2, card uses this as SAK
2185 ^^ >> First byte of UID BCC calculation, for Ultralight family is always 88 per the datasheet
2186 ^^ >> Unknown, usually always AF.
2187 ^^^^ >> Unknown, usually always 00
2189 F8 - FF: xxxxxxxx >> signature
2192 To read / write hidden blocks:
2194 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.
2196 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:
2199 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
2202 ### Proxmark3 commands
2206 No implemented commands at time of writing
2212 No implemented commands at time of writing
2216 | Factory configuration | Name |
2218 | 850000A0 00000AC3 00040301 01000B03 | UL-11 |
2219 | 850000A0 00000A3C 00040301 01000E03 | UL-21 |
2220 | 850000A0 0A000A00 00000000 00000000 | UL-C |
2221 | 850085A0 00000AA5 00040402 01000F03 | NTAG213 |
2222 | 850000A0 00000A5A 00040402 01001103 | NTAG215 |
2223 | 850000A0 00000AAA 00040402 01001303 | NTAG216 |
2229 ## "DESFire" APDU, 7b UID
2239 * issue special APDUs
2247 * ATS: 0675338102005110 or 06757781028002F0
2249 Only mimics DESFire anticollision (but wrong ATS), no further DESFire support
2251 ### Proxmark commands
2258 hf 14a raw -s -c 0200ab00000704112233445566
2264 hf 14a apdu -s 00ab00000704112233445566
2274 420200ab00000704112233445566
2277 ## "DESFire" APDU, 4b UID
2287 * issue special APDUs
2294 * This is FM1208-9, NOT DESFire!
2296 * ATS: 0675338102005110 or 06757781028002F0
2298 Only mimics DESFire anticollision (but wrong ATS), no further DESFire support
2300 ### Proxmark commands
2307 hf 14a raw -s -c 0200ab00000411223344
2313 hf 14a apdu -s 00ab00000411223344
2316 It accepts longer UID but that doesn't affect BCC/ATQA/SAK
2318 ### pn53x-tamashell commands
2324 420200ab00000411223344
2331 The same effect (with better ATQA!) can be obtained with a MFC Gen1A that uses SAK defined in block0:
2334 hf mf csetblk --blk 0 -d 1122334444204403A1A2A3A4A5A6A7A8
2336 [+] UID: 11 22 33 44
2340 [+] MIFARE DESFire MF3ICD40
2347 ## Tiananxin TCOS CPU card
2351 This is a card sold on Taobao for testing readers.
2352 ISO14443-4 compliant.
2357 hf 14a apdu -s 90B2900000 // Get Card OS version
2359 <<< 54 43 4F 53 20 56 31 2E 34 2E 30 90 00 | TCOS V1.4.0..
2364 All commands in APDU.
2368 90 F4 CC CC 01 [..1 ] // Change protocol used (1: ISO14443 [AA - type A, BB - type B])
2369 90 F6 CC CC 01 [TA1 ] // Change TA1 value (transfer speed)
2370 90 F8 CC CC 01 [..1 ] // Use random UID/PUPI value (1: FF: static, AB: random)
2371 90 F8 DD DD 01 [..1 ] // Set UID length (1: bytes in UID (04, 07, 0A for 4, 7, 10 bytes accordingly))
2372 90 F8 EE EE 0B [... ] // Set UID/PUPI value (FF+enter UID value here). To clear, use Lc=01; data=00.
2373 90 FA CC CC 01 [FSCI] // Set FSCI (1: value 0-8)
2374 90 FC CC CC 01 [SFGI] // Set SFGI (DO NOT SET TOO HIGH!) (1: value 0-E)
2375 90 FE CC CC 01 [FWI ] // Set FWI (DO NOT SET BELOW 4!!!) (value 0-E)
2378 More commands to follow. Be careful with some.
2392 ### Proxmark3 commands
2396 Always set a UID starting with `E0`.
2399 hf 15 csetuid E011223344556677
2405 script run hf_15_magic -u E004013344556677
2418 A.k.a ultimate magic card, most promenent feature is shadow mode (GTU) and optional password protected backdoor commands.
2420 Can emulate MIFARE Classic, Ultralight/NTAG families, 14b UID & App Data
2422 * [Identify](#identify-16)
2423 * [Magic commands](#magic-commands-9)
2424 * [Characteristics](#characteristics-12)
2425 * [Proxmark3 commands](#proxmark3-commands-9)
2426 * [Change ATQA / SAK](#change-atqa--sak)
2427 * [Change ATS](#change-ats)
2428 * [Set UID length (4, 7, 10)](#set-uid-length-4-7-10)
2429 * [Set 14443A UID](#set-14443a-uid)
2430 * [Set 14443B UID and ATQB](#set-14443b-uid-and-atqb)
2431 * [(De)Activate Ultralight mode](#deactivate-ultralight-mode)
2432 * [Select Ultralight mode](#select-ultralight-mode)
2433 * [Set shadow mode (GTU)](#set-shadow-mode-gtu)
2434 * [Direct block read and write](#direct-block-read-and-write)
2435 * [(De)Activate direct write to block 0](#deactivate-direct-write-to-block-0)
2436 * [Change backdoor password](#change-backdoor-password)
2437 * [Dump configuration](#dump-configuration)
2438 * [Fast configuration](#fast-configuration)
2439 * [Presets](#presets)
2440 * [Version and Signature](#version-and-signature)
2445 ^[Top](#top) ^^[Gen4](#g4top)
2447 👉 **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)
2449 👉 **TODO** Using C6 command can change config due to a bug in some cards. CC should be used instead.
2453 [+] Magic capabilities : Gen 4 GTU
2456 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:
2459 hf 14a raw -s -c -t 1000 CF00000000C6
2462 If the card is an Ultimate Magic Card, it returns 30 or 32 bytes.
2466 ^[Top](#top) ^^[Gen4](#g4top)
2468 There are two ways to program this card.
2470 1. Use the raw commands designated by the `hf 14a` examples.
2474 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.
2477 script run hf_mf_ultimatecard.lua -h
2480 This script enables easy programming of an Ultimate Mifare Magic card
2482 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>
2486 -c read magic configuration
2487 -u UID (8-20 hexsymbols), set UID on tag
2488 -t tag type to impersonate
2489 1 = Mifare Mini S20 4-byte
2490 2 = Mifare Mini S20 7-byte 15 = NTAG 210
2491 3 = Mifare Mini S20 10-byte 16 = NTAG 212
2492 4 = Mifare 1k S50 4-byte 17 = NTAG 213
2493 5 = Mifare 1k S50 7-byte 18 = NTAG 215
2494 6 = Mifare 1k S50 10-byte 19 = NTAG 216
2495 7 = Mifare 4k S70 4-byte 20 = NTAG I2C 1K
2496 8 = Mifare 4k S70 7-byte 21 = NTAG I2C 2K
2497 9 = Mifare 4k S70 10-byte 22 = NTAG I2C 1K PLUS
2498 *** 10 = UL - NOT WORKING FULLY 23 = NTAG I2C 2K PLUS
2499 *** 11 = UL-C - NOT WORKING FULLY 24 = NTAG 213F
2500 12 = UL EV1 48b 25 = NTAG 216F
2502 *** 14 = UL Plus - NOT WORKING YET
2504 -p NTAG password (8 hexsymbols), set NTAG password on tag.
2505 -a NTAG pack ( 4 hexsymbols), set NTAG pack on tag.
2506 -s Signature data (64 hexsymbols), set signature data on tag.
2507 -o OTP data (8 hexsymbols), set `One-Time Programmable` data on tag.
2508 -v Version data (16 hexsymbols), set version data on tag.
2509 -q ATQA/SAK (<2b ATQA><1b SAK> hexsymbols), set ATQA/SAK on tag.
2510 -g GTU Mode (1 hexsymbol), set GTU shadow mode.
2511 -z ATS (<1b length><0-16 ATS> hexsymbols), Configure ATS. Length set to 00 will disable ATS.
2512 -w Wipe tag. 0 for Mifare or 1 for UL. Fills tag with zeros and put default values for type selected.
2513 -m Ultralight mode (00 UL EV1, 01 NTAG, 02 UL-C, 03 UL) Set type of UL.
2514 -n Ultralight protocol (00 MFC, 01 UL), switches between UL and MFC mode
2515 -k Ultimate Magic Card Key (IF DIFFERENT THAN DEFAULT 00000000)
2518 -- read magic tag configuration
2519 script run hf_mf_ultimatecard -c
2521 script run hf_mf_ultimatecard -u 04112233445566
2522 -- set NTAG pwd / pack
2523 script run hf_mf_ultimatecard -p 11223344 -a 8080
2524 -- set version to NTAG213
2525 script run hf_mf_ultimatecard -v 0004040201000f03
2526 -- set ATQA/SAK to [00 44] [08]
2527 script run hf_mf_ultimatecard -q 004408
2528 -- wipe tag with a NTAG213 or Mifare 1k S50 4 byte
2529 script run hf_mf_ultimatecard -w 1
2530 -- use a non default UMC key. Only use this if the default key for the MAGIC CARD was changed.
2531 script run hf_mf_ultimatecard -k ffffffff -w 1
2532 -- Wipe tag, turn into NTAG215, set sig, version, NTAG pwd/pak, and OTP.
2533 script run hf_mf_ultimatecard -w 1 -t 18 -u 04112233445566 -s 112233445566778899001122334455667788990011223344556677 -p FFFFFFFF -a 8080 -o 11111111
2536 Special raw commands summary:
2539 CF <passwd> 32 <00-04> // Configure GTU shadow mode
2540 CF <passwd> 34 <1b length><0-16b ATS> // Configure ATS
2541 CF <passwd> 35 <2b ATQA><1b SAK> // Configure ATQA/SAK (swap ATQA bytes)
2542 CF <passwd> 68 <00-02> // Configure UID length
2543 CF <passwd> 69 <00-01> // (De)Activate Ultralight mode
2544 CF <passwd> 6A <00-03> // Select Ultralight mode
2545 CF <passwd> 6B <1b> // Set Ultralight and M1 maximum read/write sectors
2546 CF <passwd> C6 // Dump configuration
2547 CF <passwd> CC // Version info, returns `00 00 00 [03 A0 (old) / 06 A0 (new) ]`
2548 CF <passwd> CD <1b block number><16b block data> // Backdoor write 16b block
2549 CF <passwd> CE <1b block number> // Backdoor read 16b block
2550 CF <passwd> CF <1b param> // (De)Activate direct write to block 0
2551 CF <passwd> F0 <30b configuration data> // Configure all params in one cmd
2552 CF <passwd> F1 <30b configuration data> // Configure all params in one cmd and fuse the configuration permanently
2553 CF <passwd> FE <4b new_password> // change password
2556 Default `<passwd>`: `00000000`
2560 ^[Top](#top) ^^[Gen4](#g4top)
2562 * UID: 4b, 7b and 10b versions
2563 * ATQA/SAK: changeable
2565 * ATS: changeable, can be disabled
2566 * Card Type: changeable
2568 * Backdoor password mode
2570 ### Proxmark3 commands
2572 ^[Top](#top) ^^[Gen4](#g4top)
2575 # view contents of tag memory:
2577 # Read a specific block via backdoor command:
2579 # Write a specific block via backdoor command:
2583 # Save dump from tag:
2587 👉 **TODO** `hf mf gview` is currently missing Ultralight memory maps
2592 hf 14a raw -s -c -t 1000 CF00000000CE00
2593 hf 14a raw -s -c -t 1000 CF00000000CE01
2594 hf 14a raw -s -c -t 1000 CF00000000CE02
2598 👉 **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.
2600 ### Change ATQA / SAK
2602 ^[Top](#top) ^^[Gen4](#g4top)
2605 hf 14a raw -s -c -t 1000 CF<passwd>35<2b ATQA><1b SAK>
2608 * ⚠ ATQA bytes are swapped in the command
2609 * ⚠ 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`
2610 * ⚠ 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!
2611 * ⚠ 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)
2613 Example: ATQA 0044 SAK 28, default pwd
2616 hf 14a raw -s -c -t 1000 CF0000000035440028
2619 OR (Note the script will correct the ATQA correctly)
2622 script run hf_mf_ultimatecard -q 004428
2627 ^[Top](#top) ^^[Gen4](#g4top)
2630 hf 14a raw -s -c -t 1000 CF<passwd>34<1b length><0-16b ATS>
2633 * `<length>`: ATS length byte, set to `00` to disable ATS
2634 * ⚠ 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!
2635 * ATS CRC will be added automatically, don't configure it
2636 * Max ATS length: 16 bytes (+CRC)
2638 Example: ATS to 0606757781028002F0, default pwd
2641 hf 14a raw -s -c -t 1000 CF000000003406067577810280
2647 script run hf_mf_ultimatecard -z 06067577810280`
2650 ### Set UID length (4, 7, 10)
2652 ^[Top](#top) ^^[Gen4](#g4top)
2655 hf 14a raw -s -c -t 1000 CF<passwd>68<1b param>
2663 Example: set UID length to 7 bytes, default pwd
2666 hf 14a raw -s -c -t 1000 CF000000006801
2671 ^[Top](#top) ^^[Gen4](#g4top)
2673 UID is configured according to block0 with a backdoor write. (Script commands are below the UID length examples)
2675 Example: preparing first two blocks: (Note the UMC has to be in MFC mode and the correct UID byte length set)
2678 hf 14a raw -s -c -t 1000 CF00000000CD00000102030405060708090A0B0C0D0E0F
2679 hf 14a raw -s -c -t 1000 CF00000000CD01101112131415161718191A1B1C1D1E1F
2687 `script run hf_mf_ultimatecard -t 4 -u 00010203`
2691 => UID `00010203040506`
2693 `script run hf_mf_ultimatecard -t 5 -u 00010203040506`
2697 => UID `00010203040506070809`
2699 `script run hf_mf_ultimatecard -t 6 -u 00010203040506070809`
2701 Ultralight mode, 4b UID
2705 Ultralight mode, 7b UID
2707 => UID `00010210111213`
2709 👉 the UID is composed of first two blocks as in regular Ultralights
2712 * UL-EV1 48b = `script run hf_mf_ultimatecard -t 12 -u 00010203040506`
2713 * UL EV1 128b = `script run hf_mf_ultimatecard -t 13 -u 00010203040506`
2714 * NTAG 215 = `script run hf_mf_ultimatecard -t 18 -u 00010203040506`
2716 Ultralight mode, 10b UID
2717 => UID `00010203040506070809`
2718 👉 the UID is composed only from block0
2720 ### Set 14443B UID and ATQB
2722 ^[Top](#top) ^^[Gen4](#g4top)
2724 * UID and ATQB are configured according to block0 with a (14a) backdoor write.
2725 * UID size is always 4 bytes.
2726 * 14B will show up only on new cards. (Need more tests on new card. Example not work)
2731 hf 14a raw -s -c -t 1000 CF00000000CD00000102030405060708090A0B0C0D0E0F
2736 => ATQB 0405060708090A
2738 ### (De)Activate Ultralight mode
2740 ^[Top](#top) ^^[Gen4](#g4top)
2743 hf 14a raw -s -c -t 1000 CF<passwd>69<1b param>
2747 * `00`: MIFARE Classic mode
2748 * `01`: MIFARE Ultralight/NTAG mode
2750 Example: activate Ultralight protocol, default pwd
2753 hf 14a raw -s -c -t 1000 CF000000006901
2759 script run hf_mf_ultimatecard -n 01
2762 In this mode, if SAK=`00` and ATQA=`0044`, it acts as an Ultralight card
2764 ⚠ 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).
2766 ### Select Ultralight mode
2768 ^[Top](#top) ^^[Gen4](#g4top)
2771 hf 14a raw -s -c -t 1000 CF<passwd>6A<1b param>
2780 ⚠ it supposes Ultralight mode was activated (cf command `69`)
2782 Example: set Ultralight mode to Ultralight-C, default pwd
2785 hf 14a raw -s -c -t 1000 CF000000006A02
2791 script run hf_mf_ultimatecard -m 02
2794 Now the card supports the 3DES UL-C authentication.
2796 ### Set Ultralight and M1 maximum read/write sectors
2798 ^[Top](#top) ^^[Gen4](#g4top)
2801 hf 14a raw -s -c -t 1000 CF<passwd>6B<1b blocks>
2804 Hexadecimal, maximum sector data, default 0xFF, range 0x00-0xFF
2806 Example: set maximum 63 blocks read/write for Mifare Classic 1K
2809 hf 14a raw -s -c -t 1000 CF000000006B3F
2812 ### Set shadow mode (GTU)
2814 ^[Top](#top) ^^[Gen4](#g4top)
2816 This description of shadow modes wroted by seller at marketpalces:
2818 >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.
2820 And these conclusions were made after a number of tests with UMC (new version, configured as MFC for example):
2822 | Mode | Buffer | Standart command (rdbl, wrbl e.t.c) | Backdoor command (gsetblk, ggetblk, gload e.t.c.) |
2823 |------|--------|-----------------------------------------|---------------------------------------------------|
2824 | 2,3 | buf23 | read/write from/to buf23 | read/write from/to buf23 |
2825 | 0 | buf0 | read from buf0, write to buf0 and buf23 | read/write from/to buf23 |
2826 | 4 | - | read from buf0, write to buf23 | read/write from/to buf23 |
2828 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.
2830 Example (not work with new UMC):
2831 `script run hf_mf_ultimatecard -w 1 -g 00 -t 18 -u 04112233445566 -s 112233445566778899001122334455667788990011223344556677 -p FFFFFFFF -a 8080 -o 11111111 -g 01`
2833 * -w 1 = wipe the card in Ultralight Mode
2834 * -g 00 = turn on pre-write mode
2835 * -t 18 = change the type of card to NTAG 215
2837 * -s = set the signature
2838 * -p = set the NTAG password
2841 * -g 01 = turn on restore mode
2843 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.
2845 👉 Remember to disable GTU mode to get the card back to a normal state.
2847 `script run hf_mf_ultimatecard -g 03`
2850 hf 14a raw -s -c -t 1000 CF<passwd>32<1b param>
2854 * `00`: pre-write, shadow data can be written
2855 * `01`: restore mode
2856 * WARNING: new UMC (06a0) cards return garbage data when using 01
2858 * `03`: disabled, high speed R/W mode for Ultralight?
2859 * `04`: split mode, work with new UMC. With old UMC is untested.
2861 ### Direct block read and write
2863 ^[Top](#top) ^^[Gen4](#g4top)
2865 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.
2867 Backdoor read 16b block:
2870 hf 14a raw -s -c -t 1000 CF<passwd>CE<1b block number>
2873 Backdoor write 16b block:
2876 hf 14a raw -s -c -t 1000 CF<passwd>CD<1b block number><16b block data>
2879 Read/Write operations work on 16 bytes, no matter the Ultralight mode.
2881 Note that only the first four bytes of each block will be mapped in the Ultralight memory map.
2883 Example: read block0, default pwd
2886 hf 14a raw -s -c -t 1000 CF00000000CE00
2889 Example: write block0 with factory data, default pwd
2892 hf 14a raw -s -c -t 1000 CF00000000CD00112233441C000011778185BA18000000
2895 ### (De)Activate direct write to block 0
2897 ^[Top](#top) ^^[Gen4](#g4top)
2899 This command enables/disables direct writes to block 0.
2902 hf 14a raw -s -c -t 1000 CF<passwd>CF<1b param>
2906 * `00`: Activate direct write to block 0 (Same behaviour of Gen2 cards. Some readers may identify the card as magic)
2907 * `01`: Deactivate direct write to block 0 (Same behaviour of vanilla cards)
2908 * `02`: Default value. (Same behaviour as `00` (?))
2910 Example: enable direct writes to block 0, default pwd
2913 hf 14a raw -s -c -t 1000 CF00000000CF00
2916 Example: disable direct writes to block 0, default pwd
2919 hf 14a raw -s -c -t 1000 CF00000000CF01
2922 ### Change backdoor password
2924 ^[Top](#top) ^^[Gen4](#g4top)
2926 All backdoor operations are protected by a password. If password is forgotten, it can't be recovered. Default password is `00000000`.
2928 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.
2933 hf 14a raw -s -c -t 1000 CF <passwd> FE <4b new_password>
2936 Example: change password from 00000000 to AABBCCDD
2939 hf 14a raw -s -c -t 1000 CF00000000FEAABBCCDD
2942 Example: change password from AABBCCDD back to 00000000
2945 hf 14a raw -s -c -t 1000 CFAABBCCDDFE00000000
2948 ### Dump configuration
2950 ^[Top](#top) ^^[Gen4](#g4top)
2953 hf 14a raw -s -c -t 1000 CF<passwd>C6
2956 Default configuration:
2959 00000000000002000978009102DABC191010111213141516040008006B024F6B
2960 ^^^^ CRC, type unknown
2961 ^^ cf cmd cf: block0 direct write setting, factory value 0x02
2962 ^^ cf cmd 6b: maximum read/write sectors, factory value 0x6b
2963 ^^ cf cmd 6a: UL mode
2964 ^^^^^^ cf cmd 35: ATQA/SAK
2965 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cf cmd 34: ATS length & content
2966 ^^ cf cmd 32: GTU mode
2967 ^^^^^^^^ cf cmd fe: password
2968 ^^ cf cmd 68: UID length
2969 ^^ cf cmd 69: Ultralight protocol
2972 ### Fast configuration
2974 ^[Top](#top) ^^[Gen4](#g4top)
2977 hf 14a raw -s -c -t 1000 CF<passwd>F0<30b configuration data>
2980 cf **Dump configuration** for configuration data description.
2982 Example: Write factory configuration, using default password
2985 hf 14a raw -s -c -t 1000 CF00000000F000000000000002000978009102DABC191010111213141516040008004F6B
2988 ⚠ Variant with command `F1` instead of `F0` will set and fuse permanently the configuration. Backdoor R/W will still work.
2992 ^[Top](#top) ^^[Gen4](#g4top)
2994 Here are some presets available in the FuseTool (but with all ATS disabled)
2996 **MIFARE Mini S20 4-byte UID**
2999 hf 14a raw -s -c -t 1000 CF00000000F000000000000002000978009102DABC19101011121314151604000900
3002 **MIFARE Mini S20 7-byte UID**
3005 hf 14a raw -s -c -t 1000 CF00000000F000010000000002000978009102DABC19101011121314151644000900
3008 **MIFARE 1k S50 4-byte UID** (this is the factory setting)
3011 hf 14a raw -s -c -t 1000 CF00000000F000000000000002000978009102DABC19101011121314151604000800
3014 **MIFARE 1k S50 7-byte UID**
3017 hf 14a raw -s -c -t 1000 CF00000000F000010000000002000978009102DABC19101011121314151644000800
3020 **MIFARE 4k S70 4-byte UID**
3023 hf 14a raw -s -c -t 1000 CF00000000F000000000000002000978009102DABC19101011121314151602001800
3026 **MIFARE 4k S70 7 byte UID**
3029 hf 14a raw -s -c -t 1000 CF00000000F000010000000002000978009102DABC19101011121314151642001800
3035 hf 14a raw -s -c -t 1000 CF00000000F001010000000003000978009102DABC19101011121314151644000003FB
3041 hf 14a raw -s -c -t 1000 CF00000000F001010000000003000978009102DABC19101011121314151644000002FB
3047 hf 14a raw -s -c -t 1000 CF00000000F001010000000003000978009102DABC19101011121314151644000000FB
3053 hf 14a raw -s -c -t 1000 CF00000000F001010000000003000978009102DABC19101011121314151644000001FB
3056 ### Version and Signature
3058 ^[Top](#top) ^^[Gen4](#g4top)
3060 Don't forget configure maximum read/write blocks. It's can be adjusted directly in config (see *Dump configuration*) or by command 6B:
3063 hf 14a raw -s -c -t 1000 CF000000006BFB
3068 Ultralight EV1 and NTAG Version info and Signature are stored respectively in blocks 250-251 and 242-249.
3070 Example for an Ultralight EV1 128b with the signature sample from tools/recover_pk.py
3073 hf 14a raw -s -c -t 1000 CF00000000F001010000000003000978009102DABC19101011121314151644000000FB
3074 hf mfu wrbl -b 0 -d 04C12865
3075 hf mfu wrbl -b 1 -d 5A373080
3076 hf mfu wrbl -b 242 -d CEA2EB0B --force
3077 hf mfu wrbl -b 243 -d 3C95D084 --force
3078 hf mfu wrbl -b 244 -d 4A95B824 --force
3079 hf mfu wrbl -b 245 -d A7553703 --force
3080 hf mfu wrbl -b 246 -d B3702378 --force
3081 hf mfu wrbl -b 247 -d 033BF098 --force
3082 hf mfu wrbl -b 248 -d 7899DB70 --force
3083 hf mfu wrbl -b 249 -d 151A19E7 --force
3084 hf mfu wrbl -b 250 -d 00040301 --force
3085 hf mfu wrbl -b 251 -d 01000E03 --force
3089 Example for an NTAG216 with the signature sample from tools/recover_pk.py
3092 hf 14a raw -s -c -t 1000 CF00000000F001010000000003000978009102DABC19101011121314151644000001FB
3093 hf mfu wrbl -b 0 -d 04E10C61
3094 hf mfu wrbl -b 1 -d DA993C80
3095 hf mfu wrbl -b 242 -d 8B76052E --force
3096 hf mfu wrbl -b 243 -d E42F5567 --force
3097 hf mfu wrbl -b 244 -d BEB53238 --force
3098 hf mfu wrbl -b 245 -d B3E3F995 --force
3099 hf mfu wrbl -b 246 -d 0707C0DC --force
3100 hf mfu wrbl -b 247 -d C956B5C5 --force
3101 hf mfu wrbl -b 248 -d EFCFDB70 --force
3102 hf mfu wrbl -b 249 -d 9B2D82B3 --force
3103 hf mfu wrbl -b 250 -d 00040402 --force
3104 hf mfu wrbl -b 251 -d 01001303 --force
3112 These are chips to clone other ICs. Usually the originals are only sold in China.
3118 * Magic tag for Fudan FM1208-9 chips
3125 * ATQA-SAK: `0008`-`20`
3126 * ATS: `10 78 80 A0 02 00 9D 46 16 40 00 A3 [UID]`
3127 * Compared to real FM1208 chip:
3128 * CLA byte is ignored
3129 * Command parsing is irregular (some replies are wrong)
3135 **WARNING!!!** Risk of bricking tag - cause is unknown
3137 * 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)
3138 * Results may vary between chips:
3142 0A | 44454641554C540000002018112840000000000000000000000000000000000000000000000000000000400000000000
3143 3B | 00000000001C0EF90000000000000000000000000000000000000000000000002000000000C09040009002840000000000000000000000000000000000006C0FC08700EB1A9F1BA01801010019000000000000000000000000000090000000000000094B066600000000007D000000000000000000000000000000003B000000107880A002009D46164000A3CA81E15000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
3146 7D | Tag does not reply (if 0<Lc<=15, RES=6700)
3156 * - 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
3163 * Magic tag for "NSC/BS-CPU"
3169 * Programming is done via ISO14443-A (but not sure how to modulate). Original tag is working somewhere hidden from proxmark.
3170 * ATQA-SAK: `0044`-`20`
3171 * ATS: `05 72 F7 60 02`
3172 * Communications encrypted(?)
3173 * When writing with copykey, after RATS, this communication takes place (NSC ID programmed: `5800000000`, tag UID: `1D94CE25840000`):
3176 >>> 54 03 8A BC DF C1 [CRC]
3178 >>> 54 04 57 AA 84 DD [CRC]
3186 * Write NSC UID: `54 [part 1b] [data 4b enc] [CRC]`
3187 * Tag replies: `A2 [CRC]`