Proxmark3 community

Research, development and trades concerning the powerful Proxmark3 device.

Remember; sharing is caring. Bring something back to the community.


"Learn the tools of the trade the hard way." +Fravia

You are not logged in.

Announcement

Time changes and with it the technology
Proxmark3 @ discord

Users of this forum, please be aware that information stored on this site is not private.

#1 2015-02-12 00:44:54

Yuvutuser
Member
Registered: 2015-02-12
Posts: 5

Calculate Mifare UID BCC

Hi! so i was trying to use a chinese card with my proxmark, and it won't change the uid, but then i tried with an ACR122U reader using Mifare classic recovery tools beta V0.1 and it worked! but the thing is i tried then to change the uid to a random one, and it won't work. I'm guessing i need to put the right BCC, so here is my question: how do you get it? Sorry if it is already here, i tried to find it but i couldn't. Thanks!

Offline

#2 2015-02-12 01:15:03

asper
Contributor
Registered: 2008-08-24
Posts: 1,409

Re: Calculate Mifare UID BCC

Xor of the 4 UID bytes.

Offline

#3 2015-02-12 05:08:31

Yuvutuser
Member
Registered: 2015-02-12
Posts: 5

Re: Calculate Mifare UID BCC

Thanks! That works!

Offline

#4 2015-02-12 10:02:10

iceman
Administrator
Registered: 2013-04-25
Posts: 9,497
Website

Re: Calculate Mifare UID BCC

if you are using a magic chinese tag,  and the  "hf mf csetuid"  then it should work with just giving it a UID...

Offline

#5 2015-02-25 06:05:43

Yuvutuser
Member
Registered: 2015-02-12
Posts: 5

Re: Calculate Mifare UID BCC

Hi,  iceman i tried with proxmark and it didnt work. I just made an app to calculate it quick.  Its for a 4 byte UID.  Please let me know what can i do to improve it. Thanks. https://play.google.com/store/apps/details?id=app.bcccalculator

Offline

#6 2016-05-13 19:48:54

roman921
Contributor
Registered: 2015-06-21
Posts: 48

Re: Calculate Mifare UID BCC

I get mifare classic card with direct change uid. I write uid with incorrect BCC byte. Now acr122 don't see card. Please, write, how restore this card ?

Offline

#7 2016-05-29 16:35:07

ikarus
Contributor
Registered: 2012-09-20
Posts: 249
Website

Re: Calculate Mifare UID BCC

Hi there!
So I'm working on a BCC checker and calculator for Mifare Classic Tool right now.
The calculator is pretty much strait forward: Take the 4 byte input and xor them.
However, I have come across difficulties when it comes to the BCC check routine.
This routine should prevent people from writing wrong manufacturer blocks (block 0).
As you can see by roman921's request, those things happen.

For a 4 byte UID this is simple: The 5th byte of block 0 has the be the BCC of the UID.
But what is about 7 or 10 byte UIDs? The document by NXP only describes the
calculation of the BCC during the anti collision phase. Does anyone of you guys
know if the BCC(s) of a 7 or 10 byte UID is also stored in a block 0?

This is a block 0 of a original NXP Mifare Classic 7 bytes UID tag:

04395CF2201D80184200040111001810

Can anyone spot any BCC values in there?

Any help is welcome wink
Cheers
  ikarus

Offline

#8 2020-08-19 01:44:28

iceman
Administrator
Registered: 2013-04-25
Posts: 9,497
Website

Re: Calculate Mifare UID BCC

Sniff a anti-collision phase between a genuine reader and genuine tag and compare the data?

Offline

Board footer

Powered by FluxBB