Mifare Classic 1K > xM1 Clone help

Hey All,

I’m back! This time, as no doubt spoiled by the title, I’m looking for some help cloning an old hotel key, what I assume to be a MF Classic 1K to my xM1.

Here is the hf search of the hotel key

And here is the hf search of my xM1

Firstly, possibly incorrectly, I assumed this hotel key is compatible with the xM1 based on the obvious similarities of the search results. So I ran,

hf mf csetuid -u bdc7c7aa --atqa 0004 --sak 08

Based on the UID I’m trying to copy and the csetuid help examples and, no doubt spoiled by the title, this did not work.

Returning this result,

And many questions.

So I’m here to ask,

  1. Am I correct in assuming these are compatible for cloning and am I on the right track?
  2. Did the csetuid fail because I did not -w first (this was my first thought but I wanted to seek help before I commanded my pm3 to “wipe” anything)?
  3. Is the information listed under Tag Signature relevant to this undertaking and did I fail because neglected it?
  4. Is there a convenient place where I can further read up on the results of these searches and what the results (Ex. ATQA, SAK, RATS, wupC1) all mean?

I did poke around in the search results for xM1 and MF Classic 1k but didn’t seem to find what I was after. Sorry if I missed something and this kind of stuff has been covered elsewhere, please point me to it if I have.

Any and all help and replies are appreciated. I look forward to 'em.

-3RFIDdy

UPDATE

I followed this video (by the way, great video @amal :+1:),

Which yielded some interesting results,

hf mf autopwn

And then,

hf mf cload -f filename.eml

Resulted in a write block send command error, I should note at this point I’m cloning to a Proxgrind Gen1A S50 and whilst the UID, ATQA and SAK have all been cloned all of the ‘Tag Signature’ data was not.

Doesn’t take much of a leap to infer that the partial dump file is the reason that this information is missing but is that inference correct? Is it perhaps an incompatibility between the hotel key and the S50 card?

And how do you think I would go about making that partial dump file just a regular old complete dump file?

1 Like

I have the same problem:[

The magic ring is a gen 2 magic chip. As such you can just write to any part of the chip without first using the backdoor commands. The backdoor commands won’t work, so the gen 1 backdoor commands will fail. Try just copying the data without using any special “magic” commands.

ETA: My mistake I assumed that we were talking about the Magic Ring, not the XM1.

Still good info…

I have Next implant

I want to write door card into my Next implant, they have the same chip, hf.
Which comand i have to use?

Unfortunately you cannot write a mifare chip onto a NeXT. The NeXT contains a T5577 which is capable of emulating a bunch of low frequency chips, and an NTAG216 which is a very capable chip, but cannot have its UID modified. You would need a Magic chip to modify the UID in it.

Most door locks act on just the UID so you will probably have two options.

  1. Buy a Magic chip based implant and clone your door card onto that (assuming that your door card uses a mifare chip)
  2. Have whoever is in charge of the door system enroll your implant in it. For my front door I have the power to add my own chips, so this is the route that I go.
1 Like

Oh noo​:frowning::frowning:

The card you have is a Mifare Classic Ev1 which contains a hardened (but exploitable) PRNG and a signature from NXP to ensure its a genuine card. From my experience with Mifare, no manufacturers are checking the signature of Ev1 cards and there arent many manufacturers that know the signatures exist on Ev1 nor where they are located. This is partly due to this ‘feature’ not being documented on NXP datasheets (from what I recall)
Given the above about the lack of use for the signature of Ev1, there are no magic Mifare cards which support signature cloning; there is no need for it given no manufacturer checks that data.

From your first screenshot, after autopwn, there are some command errors when the command tries to write the found data to simulator memory. This is also most likely the reason why it shows the dump file is partially complete.
For what device did you compile the client and what version of the proxmark are you using?

Your second screenshot, showing cload, from my experience, bad magic card block writes are usually due to bad coupling from the tag antenna and the PM3 antenna. Try putting some air distance between the card and PM3 and run the command again.

General tip: since you know the card is a Mifare which is (closely compliant) with 14a, you can use the command hf 14a info rather than hf search to get basic card info faster.

1 Like

I have the same error. Would you please let me know if I am understanding you correctly. If I can copy the other data correctly the signature should be immaterial for the time being because it is not being checked.

Also cmd error 04… Should I try to update. Last update was Dec. 29th. I set up in proxspace on a windows machine. I set up following dangerous things video and written directions. Is there a work around to dump the file?

Any help or guidance would be greatly appreciated.

Thank you!

Hello Dangerousthings Community!
I have had an xM1 gen2 Mifare Classic implant since last week. I am very satisfied so far.
Today I wanted to clone my Gym card

to the xM1 gen2 Mifare Classic (image2).
2. xM1 gen2 Mifare Classic

First I created the dump file, which is also possible (Image 3).

Then I wanted to load the dump file onto the xM1 gen2 Mifare Classic. But then the following message appears (Image 4)

If I take a Mifare Classic gen1 card (picture 5)
5. Mifare Classic gen1

I can copy the dump file to this card.

What am I doing wrong?
Or is it not possible to clone a Mifare classic gen1 to a Mifare Classic gen2?

Please help me :slight_smile:

cload is to write a dump to a backdoor (gen1a) card. You’re just using the wrong command. Because the gen2 card operates just like any normal mifare chip (but with sector 0 unlocked for writing), you just use the normal write commands used for any mifare card. In this case, I believe you want to just use the restore command instead of cload.

Be sure to check your firmware version’s help section, but this is mine;

Amal gave you the Proxmark3 answer.
That will sort you out.

I personally use and MCT app for convenience and ease of use

If nothing else, it will give you another tool in your arsenal.

Sing out if you need a hand driving it

1 Like

Amal!

Thanks a lot!! It works.
I’ll test it out in the gym this evening if I find the motivation to exercise :smiley:

@Pilgrimsmaster I will try this also today!

2 Likes

Hey Amal I have another questions.

Waht is the the keyfile exactly?

The first thing I did was create a dump file using the “hf mf autopwn” command. Three files were then stored in my directory. “dump.bin”, “key.bin” and “dump.json”.

Then I placed my implant on the PM3 and executed the following command:

“hf mf restore -f C:\Users\khageney\working\ProxSpace\pm3\hf-mf-C25CFAEB-dump.bin”

Then the following message came:

I then went to my directory and changed “hf-mf-C25CFAEB-key.bin” to “hf-mf-12345678-key.bin”. (example number) Then my gym card could be copied.

Is the process correct?

Sorry, I’m still pretty new and still learning.
Maybe you could describe the process for my application again in more detail.

Thanks in advance

Klaas

ChatGPT says…

Memory Structure

  1. Memory Size: MIFARE Classic cards come in two main variations - 1K and 4K. The 1K version has 1024 bytes of memory, while the 4K version has 4096 bytes.

  2. Sectors and Blocks:

    • 1K Version: Divided into 16 sectors, each with 4 blocks.
    • 4K Version: Divided into 40 sectors, where the first 32 sectors contain 4 blocks each, and the last 8 sectors are “extended” sectors, containing 16 blocks each.
    • Each block is 16 bytes long.
  3. Data Storage: User data is stored in the blocks, but not all blocks are available for data storage because one block in each sector is used as a “sector trailer”.

Sector Trailer

  • Location: The last block of each sector is the sector trailer.
  • Contents:
    • Key A: 6 bytes. Used for various access control purposes.
    • Access Bits: 4 bytes. Define the access conditions for each block in the sector, including the sector trailer itself.
    • Key B: 6 bytes. Optional and can also be used for access control or can be used to store other data if not used for security purposes.

Access Control in Sector Trailer

  • The access bits in the sector trailer determine how the blocks in the sector can be accessed (read, write, increment, decrement, etc.).
  • The keys (Key A and Key B) and the access bits work together to define the security for each block.
  • The configuration of the access bits is critical because if they are set incorrectly, they can render the sector permanently inaccessible.

Ok well, it got the important stuff about how the memory is structured. The dump data file contains only the memory blocks from each sector and not the keys stored in the sector trailer. Those are kept in the separate key file because reasons.

1 Like

Hello Amal,

I understand more and more how the whole NFC world goes. But I’m not a professional yet and I need your help again…
Ultimately I just want to copy my gym card to a Mifare Classic 1k Magic gen2 Card / xM1gen2. I proceeded as follows:

I read in the tag/implant to be written on:
hf mf info

Then I scanned my gym card:
hf mf info
1 Gym Card C25CFAEB

Now I have created the dump and key files for the gym card:
hf mf autopwn

Now I have created the dump and key files for the Mifare Classic 1k Magic gen2:
hf mf autopwn

Now I have with the help of the command
hf mf restore -f C:\Users\khageney\working\ProxSpace\pm3\hf-mf-C25CFAEB-dump.bin
tried to play the dump file from the gym card on the Mifare Classic 1k Magic gen2.
But that didn’t work. The UID remains the same and the dump files are also different.

What I’ve done now is definitely not the right way, but I haven’t found any other solution. I only changed the name of the key file from the gym card (UID Gym card) with the UID of the Mifare Classic 1k Magic gen2

Now I started the command again:
C:\Users\khageney\working\ProxSpace\pm3\hf-mf-C25CFAEB-dump.bin
Now the UID has also changed and the DUMP files are matching!
7 NEW Mifare Classic 1K Gen 2 EE 96 D8 ED_CORRECT

BUT my big problem is I can only do this process once. Now I can no longer describe the Mifare Classic 1k Magic gen2 in a my way.
How is it possible for me to write the chip again?
Or could you show me another (correct) way to clone Mifare Classic to Mifare Classic 1k Magic gen2 over and over again?

Here is also a one drove link with the Dump and Key Files:

Dump and Key Files

I hope you understand what I mean…

Thank you very very much

Klaas

1 Like

Hello everyone,

Does anyone here have an answer for my approach?
I suspect that I’ve done it wrong here and I can no longer describe the xM1 gen2 Mifare Classic…

Is there a way to undo what I did?

Thank you for your help…

Did you ever try MCT ?