Hf mf trying to write wrong

this is before chip was


[usb] pm3 → hf mf info

[=] — ISO14443-a Information ---------------------

[+] UID: 4DA73503

[+] ATQA: 00 04

[+] SAK: 08 [2]

[=] — Keys Information

[+] loaded 2 user keys

[+] loaded 61 hardcoded keys

[+] Sector 0 key A… FFFFFFFFFFFF

[+] Sector 0 key B… FFFFFFFFFFFF

[+] Sector 1 key A… FFFFFFFFFFFF

[+] Block 0… 4DA73503DC0804006263646566676869 | bcdefghi

[=] — Fingerprint

[+] Fudan based card

[=] — Magic Tag Information

[+] Magic capabilities… Gen 1a

[=] — PRNG Information

[#] Static nonce… 009080a2

[+] Static nonce… yes

this is i just did this


[usb] pm3 → hf mf csetuid -u 04348252477780 -a 0044 -s 08

[#] wupC1 error

[=] couldn’t get old data. Will write over the last bytes of block 0

[+] new block 0… 04348252477780500844000000000000

[#] wupC1 error

[!!] :rotating_light: Can’t set UID. error -1

[usb] pm3 → hf mf info

[#] BCC0 incorrect, got 0x47, expected 0xe0

[#] Aborting

now this chip is freeze no writing just like non writable chip

when i read with flipper zero it’s show me 04348252 UID 0004 08

can we recover this?

You’re trying to set a 14 byte UID?

Try hf 14a config --bcc ignore and then retry hf mf info, see if that lets it read the card again

Then run hf 14a config --bcc std

1 Like

Pretty sure that’s hex which would be 7 bytes… still not something you can write to a gen 1 magic mifare

2 Likes

Wow, brain-fart, thanks!

2 Likes

yeah i just tested with my small brain :stuck_out_tongue:

[usb] pm3 → hf 14a config --bcc ignore

[usb] pm3 → hf mf info

[#] BCC0 incorrect, got 0x47, expected 0xe0

[#] Using BCC0 =0x47

[=] — ISO14443-a Information ---------------------

[+] UID: 04 34 82 52

[+] ATQA: 00 04

[+] SAK: 08 [2]

[#] BCC0 incorrect, got 0x47, expected 0xe0

[#] Using BCC0 =0x47

[#] BCC0 incorrect, got 0x47, expected 0xe0

[#] Using BCC0 =0x47

[=] — Keys Information

[+] loaded 2 user keys

[+] loaded 61 hardcoded keys

[#] BCC0 incorrect, got 0x47, expected 0xe0

[#] Using BCC0 =0x47

[#] chkKey: Failed at fast selecting the card!

[#] chkKey: Failed at fast selecting the card!

[#] chkKey: Failed at fast selecting the card!

[#] chkKey: Failed at fast selecting the card!

[#] chkKey: Failed at fast selecting the card!

[#] chkKey: Failed at fast selecting the card!

[#] chkKey: Failed at fast selecting the card!

[#] chkKey: Failed at fast selecting the card!

[#] chkKey: Failed at fast selecting the card!

[#] chkKey: Failed at fast selecting the card!

[#] chkKey: Failed at fast selecting the card!

[#] chkKey: Failed at fast selecting the card!

[#] chkKey: Failed at fast selecting the card!

[#] chkKey: Failed at fast selecting the card!

[#] chkKey: Failed at fast selecting the card!

[#] chkKey: Failed at fast selecting the card!

[#] chkKey: Failed at fast selecting the card!

[#] chkKey: Failed at fast selecting the card!

[#] chkKey: Failed at fast selecting the card!

[#] chkKey: Failed at fast selecting the card!

[#] chkKey: Failed at fast selecting the card!

[#] chkKey: Failed at fast selecting the card!

[#] chkKey: Failed at fast selecting the card!

[#] chkKey: Failed at fast selecting the card!

[#] chkKey: Failed at fast selecting the card!

[#] chkKey: Failed at fast selecting the card!

[#] chkKey: Failed at fast selecting the card!

[#] chkKey: Failed at fast selecting the card!

[#] chkKey: Failed at fast selecting the card!

[#] chkKey: Failed at fast selecting the card!

[#] chkKey: Failed at fast selecting the card!

[#] chkKey: Failed at fast selecting the card!

[#] chkKey: Failed at fast selecting the card!

[#] chkKey: Failed at fast selecting the card!

[#] chkKey: Failed at fast selecting the card!

[#] chkKey: Failed at fast selecting the card!

[#] chkKey: Failed at fast selecting the card!

[#] chkKey: Failed at fast selecting the card!

[#] chkKey: Failed at fast selecting the card!

[#] chkKey: Failed at fast selecting the card!

[#] chkKey: Failed at fast selecting the card!

[#] chkKey: Failed at fast selecting the card!

[#] chkKey: Failed at fast selecting the card!

[#] chkKey: Failed at fast selecting the card!

[#] chkKey: Failed at fast selecting the card!

[#] chkKey: Failed at fast selecting the card!

[#] chkKey: Failed at fast selecting the card!

[#] chkKey: Failed at fast selecting the card!

[#] chkKey: Failed at fast selecting the card!

[#] chkKey: Failed at fast selecting the card!

[#] chkKey: Failed at fast selecting the card!

[#] chkKey: Failed at fast selecting the card!

[#] chkKey: Failed at fast selecting the card!

[#] chkKey: Failed at fast selecting the card!

[#] chkKey: Failed at fast selecting the card!

[#] chkKey: Failed at fast selecting the card!

[#] chkKey: Failed at fast selecting the card!

[#] chkKey: Failed at fast selecting the card!

[#] chkKey: Failed at fast selecting the card!

[#] chkKey: Failed at fast selecting the card!

[#] chkKey: Failed at fast selecting the card!

[#] chkKey: Failed at fast selecting the card!

[#] chkKey: Failed at fast selecting the card!

[#] chkKey: Failed at fast selecting the card!

[#] chkKey: Failed at fast selecting the card!

[#] chkKey: Failed at fast selecting the card!

[#] chkKey: Failed at fast selecting the card!

[#] chkKey: Failed at fast selecting the card!

[#] chkKey: Failed at fast selecting the card!

[#] chkKey: Failed at fast selecting the card!

[#] chkKey: Failed at fast selecting the card!

[#] chkKey: Failed at fast selecting the card!

[#] chkKey: Failed at fast selecting the card!

[#] chkKey: Failed at fast selecting the card!

[#] chkKey: Failed at fast selecting the card!

[#] chkKey: Failed at fast selecting the card!

[#] chkKey: Failed at fast selecting the card!

[#] chkKey: Failed at fast selecting the card!

[#] chkKey: Failed at fast selecting the card!

[#] chkKey: Failed at fast selecting the card!

[#] chkKey: Failed at fast selecting the card!

[#] chkKey: Failed at fast selecting the card!

[#] chkKey: Failed at fast selecting the card!

[#] chkKey: Failed at fast selecting the card!

[#] chkKey: Failed at fast selecting the card!

[#] chkKey: Failed at fast selecting the card!

[#] chkKey: Failed at fast selecting the card!

[#] chkKey: Failed at fast selecting the card!

[#] chkKey: Failed at fast selecting the card!

[#] chkKey: Failed at fast selecting the card!

[#] chkKey: Failed at fast selecting the card!

[#] chkKey: Failed at fast selecting the card!

[#] chkKey: Failed at fast selecting the card!

[#] chkKey: Failed at fast selecting the card!

[#] chkKey: Failed at fast selecting the card!

[#] chkKey: Failed at fast selecting the card!

[#] chkKey: Failed at fast selecting the card!

[#] chkKey: Failed at fast selecting the card!

[#] chkKey: Failed at fast selecting the card!

[#] chkKey: Failed at fast selecting the card!

[#] chkKey: Failed at fast selecting the card!

[#] chkKey: Failed at fast selecting the card!

[#] chkKey: Failed at fast selecting the card!

[#] chkKey: Failed at fast selecting the card!

[#] chkKey: Failed at fast selecting the card!

[#] chkKey: Failed at fast selecting the card!

[#] chkKey: Failed at fast selecting the card!

[#] chkKey: Failed at fast selecting the card!

[#] chkKey: Failed at fast selecting the card!

[#] chkKey: Failed at fast selecting the card!

[#] chkKey: Failed at fast selecting the card!

[#] chkKey: Failed at fast selecting the card!

[#] chkKey: Failed at fast selecting the card!

[#] chkKey: Failed at fast selecting the card!

[#] chkKey: Failed at fast selecting the card!

[#] chkKey: Failed at fast selecting the card!

[#] chkKey: Failed at fast selecting the card!

[#] chkKey: Failed at fast selecting the card!

[#] chkKey: Failed at fast selecting the card!

[#] chkKey: Failed at fast selecting the card!

[#] chkKey: Failed at fast selecting the card!

[#] chkKey: Failed at fast selecting the card!

[#] chkKey: Failed at fast selecting the card!

[#] chkKey: Failed at fast selecting the card!

[#] chkKey: Failed at fast selecting the card!

[#] chkKey: Failed at fast selecting the card!

[#] BCC0 incorrect, got 0x47, expected 0xe0

[#] Using BCC0 =0x47

[#] BCC0 incorrect, got 0x47, expected 0xe0

[#] Using BCC0 =0x47

[#] BCC0 incorrect, got 0x47, expected 0xe0

[#] Using BCC0 =0x47

[=] — Fingerprint

[=] <n/a>

[=] — Magic Tag Information

[#] BCC0 incorrect, got 0x47, expected 0xe0

[#] Using BCC0 =0x47

[#] BCC0 incorrect, got 0x47, expected 0xe0

[#] Using BCC0 =0x47

[#] BCC0 incorrect, got 0x47, expected 0xe0

[#] Using BCC0 =0x47

[#] BCC0 incorrect, got 0x47, expected 0xe0

[#] Using BCC0 =0x47

[#] BCC0 incorrect, got 0x47, expected 0xe0

[#] Using BCC0 =0x47

[#] BCC0 incorrect, got 0x47, expected 0xe0

[#] Using BCC0 =0x47

[#] BCC0 incorrect, got 0x47, expected 0xe0

[#] Using BCC0 =0x47

[#] BCC0 incorrect, got 0x47, expected 0xe0

[#] Using BCC0 =0x47

[#] BCC0 incorrect, got 0x47, expected 0xe0

[#] Using BCC0 =0x47

[#] BCC0 incorrect, got 0x47, expected 0xe0

[#] Using BCC0 =0x47

[#] BCC0 incorrect, got 0x47, expected 0xe0

[#] Using BCC0 =0x47

[#] BCC0 incorrect, got 0x47, expected 0xe0

[#] Using BCC0 =0x47

[=] <n/a>

[=] — PRNG Information

[#] BCC0 incorrect, got 0x47, expected 0xe0

[#] Using BCC0 =0x47

[#] BCC0 incorrect, got 0x47, expected 0xe0

[#] Using BCC0 =0x47

[#] BCC0 incorrect, got 0x47, expected 0xe0

[#] Using BCC0 =0x47

[#] Static nonce… 009080a2

[+] Static nonce… yes

[usb] pm3 → hf 14a config --bcc std

[usb] pm3

[usb] pm3 → hf mf info

[#] BCC0 incorrect, got 0x47, expected 0xe0

[#] Aborting

[usb] pm3

I guess the obvious stuff needs to be asked first…

First of all do your client version and firmware version match?

Secondly, are you sure you are trying to write to a gen 1 magic mifare chip? Is it possibly a Gen 2 chip? Or are you even sure it’s a magic chip that has a writable sector 0?

1 Like

PM3 last version i updated today,

yes and yes

2 Likes

Are you sure it isn’t a coupling issue?

Have you tried moving the card all over/under/around the PM3?

You can use the hf tune and/or hf 14a reader -@ commands to help you search for a spot with a good connection

I find many of my Gen1 cards want to be sort of half-on half-off the HF antenna

3 Likes

[usb] pm3 → hf tune

[=] Measuring HF antenna

[=] Press pm3 button or to exit

[=] 13731 mV / 13 V / 16 Vmax

[=] Done!

this is our best position

[usb] pm3 → hf 14a reader -@

[=] Press to exit

[#] BCC0 incorrect, got 0x47, expected 0xe0

[#] Aborting

[#] BCC0 incorrect, got 0x47, expected 0xe0

[#] Aborting

[#] BCC0 incorrect, got 0x47, expected 0xe0

[#] Aborting

[#] BCC0 incorrect, got 0x47, expected 0xe0

[#] Aborting

[#] BCC0 incorrect, got 0x47, expected 0xe0

[#] Aborting

[#] BCC0 incorrect, got 0x47, expected 0xe0

[#] Aborting

When you run hf tune you move the card around and look for the spot where the mV number is smallest, in theory that’s where you have the best connection

But, it seems like you’re pretty consistently reading the card, it’s just erroring out.

Anyways, here’s what I think’s happening:

By trying to write a 7 byte UID to a 4 byte UID card, you overwrote some other parts of block 0, which seems to check out:

04348252  47   7780

04348252  47   7780500844000000000000
^UID         ^BCC

So now you’ve got a BCC that doesn’t match, just like the error says.
But what still doesn’t make sense to me is why hf 14a config --bcc ignore didn’t work…

Next steps I’d try would be maybe:
hf mf cwipe
or
hf mf csetblk --blk 0 -d 4DA73503DC0804006263646566676869

1 Like

[usb] pm3 → hf tune

[=] Measuring HF antenna

[=] Press pm3 button or to exit

[=] 13575 mV / 13 V / 13 Vmax

[=] Done!

[usb] pm3

13 is best connection, so i keep it on 13

[usb] pm3 → hf mf cwipe

:clock1: wipe block 0[!] :warning: retry block 0 …

:clock2: wipe block 0[!] :warning: retry block 0 …

:clock3: wipe block 0[!] :warning: retry block 0 …

[!!] :rotating_light: error setting block 0 (-1)

[!!] :rotating_light: Can’t wipe card. error -1

[usb] pm3

[usb] pm3 → hf mf csetblk --blk 0 -d 4DA73503DC0804006263646566676869

[=] Writing block number: 0 data:4DA73503DC0804006263646566676869

[!!] :rotating_light: Can’t write block. error=-1

[usb] pm3

This isn’t exactly clear. Are you certain it is a gen1a magic mifare chip?

1 Like

you can see my first post my friend

[+] Magic capabilities… Gen 1a

2 Likes

Sorry haha

tenor_gif6015718605463790604 (1)

4 Likes