ikarus23 / MifareClassicTool

An Android NFC app for reading, writing, analyzing, etc. MIFARE Classic RFID tags.
http://www.icaria.de/mct/
GNU General Public License v3.0
4.68k stars 903 forks source link

Can't write tags since Pie [Samsung S8 (SM-G950N)] #243

Closed jewangyu closed 4 years ago

jewangyu commented 5 years ago

Using Android Pie, I can read and save tags fine. However, when trying to write the tags they do not work. Even formatting the tags do not work. I know it worked on Oreo but it doesn't work anymore. Any suggestions?

ikarus23 commented 5 years ago

Never heard of an issue like this. Until now it always was read and write works or read and write does not work. But only reading and not writing... strange...

Is there any error message? Does the tag use keys like 000000000000?

jewangyu commented 5 years ago

Just confirmed it using another phone of the same model. Same thing. It reads fine but doesn't write. It says it wrote it successfully but when I check it, it is still the same as before. I have tried several different tags, thinking it was the tags but they are all the same. Reads okay but doesn't write.

jewangyu commented 5 years ago

So upon further testing, I can write to an NFC Card. However, I can't write to block 0 even though I have an UID changeable block 0 rewriteable card. I have tested several with the same results.

I was able to change the block 0 before but now I can't.

Any suggestions?

ikarus23 commented 5 years ago

Stupid question: You changed it before with your Android device, right? Not with a PC/laptop and RFID/NFC reader?

ghost commented 5 years ago

Samo here, all other blocks write fine, block 0 does not, even though it says it does.. Might be due to the cards though, I will test later on a different android device lower than 9.0

Edit: I've tested it on a Galaxy S8 with all the latest updates and patches, my nephew owns an LG Q7 and LG G3, both of which below pie, might try on those later

jewangyu commented 5 years ago

Tested with a Samsung S7. Same situation, it doesn't write to block 0.

Ikarus23: I was able to write to block 0 using my Samsung S8 before one of the firmware updates but now I can't.

I have tested every version of MifareClassicTool from version 2.2.0 to 2.2.6. None of the versions can write to block 0.

I know the cards and tags are not the issue because I am able to write to block 0 using an NFC reader/writer.

Any tip would be much appreciated.

ikarus23 commented 5 years ago

@The-Clockmaker: Yes, please test it with the other devices. In most cases it is the tag.

@jewangyu: How do you write it the tag using a NFC reader? Because there are several versions of UID changeable tags, but not all of them are compatible with Android.

jewangyu commented 5 years ago

I have several different NFC cards (Mifare Ultralight, DESfire, etc). The tags and cards I am using with MifareClassicTool are Mifare Classic Block 0 writeable UID changeable.These cards are compatible with Android. As mentioned, I was able to use them with the app before to change block 0 to clone the cards but now I can't.

As for the reader/writer. It is a simple cloning device. I press a button and it read a card. I press another button and it clones the original card to the UID changeable card.

ikarus23 commented 5 years ago

Interesting, I thought the cloning devices do only work with the 1st gen UID changeable cards and not with the Android compatible 2ed gen block 0 writable cards. Would be best to find a well known and supported Android phone and try the same tag. It is strange enough that it does not work with a S8 and a S7 (although it worked in the past?!?).

ghost commented 5 years ago

Well it doesn't seem to work with any phones I've tried anymore so far, even severely outdated ones, so maybe it's the tags.. so monday I'm getting an acr122u in the mail and a few more tags from another vendor and I'll give those a go to see if it makes any difference

ikarus23 commented 5 years ago

I too think the tags are the issue here. Good luck trying the ACR122u. This reader is also able to change the UID of tags which are not Android compatible.

ghost commented 5 years ago

I too think the tags are the issue here. Good luck trying the ACR122u. This reader is also able to change the UID of tags which are not Android compatible.

It turned out the tags are fine, using the acr122u and a script in kali I was able to clone the tags and the uid,, block 0, all 64 blocks, but it doesn't work on any phone so far on MCT, I've tried a samsung s8, lg q6, lg g3, samsung a3, and samsung note 1 with the acr122u as external reader, none of them were a success.. However the tags I was trying to clone were hardened mifare classic tags, and I could only successfully clone them with a hardened nest attack to exploit sector 0, I don't know if that info makes any difference but k

ikarus23 commented 5 years ago

What script on kali? As far as I know the default is to clone using the "backdoor" 1st gen magic tag technique. In this case it can not work on Android. Only 2nd gen magic tags will work.

jewangyu commented 5 years ago

Just tested new tags, still no good.

ikarus23 commented 5 years ago

@jewangyu Tested what? Writing to block 0? Or writing in general?

jewangyu commented 5 years ago

I can't write to block 0. I can write to all other sectors.

ikarus23 commented 5 years ago

@jewangyu This must be an issue of the tag. It's either not a "magic tag 2nd gen" or the access conditions are bad. Or its is not a block 0 writable tag at all. MCT does nothing different when it comes to writing blocks. block 0 is treated the same as block 1, 2, ...

ikarus23 commented 4 years ago

I'm still convinced the tags are the issue here.

I will close this issue for now. Feel free to report back, if you learned something new about the situation.

Undervalued commented 3 years ago

Hi, i'm using a Xiaomi mi 10 lite 5g, and it doesn't work to clone UID, but in another phone (that has no nfc) with external nfc and ACR122u i can clone the UID in the same tag, so maybe it's not tag's problem

ikarus23 commented 3 years ago

This has nothing to do with this issue? Why write here?!? Please open a new issue.