iceman1001 / ChameleonMini-rebooted

Chameleon Mini revE rebooted - Iceman Fork, the ChameleonMini is a versatile contactless smartcard emulator (NFC/RFID)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Android MCT won't read emulated cards

nicoschtein opened this issue · comments

MCT reads UID fine, but fails with either "card disconnected" error along the way while building key map, or "key not found" error, which is not correct since the key is present in the selected keyfile.

Tested with multiple dumps and phones, and latest FW and GUI versions.

Is anyone able to read any card from the chameleon with MCT android app?

I find it difficult to read the card with MCT. It seems very timing sensitive. I keep hitting the "Start Mapping and Read Tag" button and once in a while, I get lucky. Also, if the Chameleon moves even the slightest bit, the reading fails. Could be an antenna issue.

With the ACR122U, I never seem to have a problem reading.

There is a trace log between Chameleon mini RevE (tag) on @iceman1001 firmware and Android smartphone (reader) :

log.txt

As you might seen, Chameleon replies "AT" of succeeded authentication, but Android not accepts this "AT" and sends not encrypted HALT command (50 00 57 cd) in encrypted mode.

Interesting fact, the Chinese firmware for Chameleon mini RevE (that based on @iceman1001 firmware) does not have this effect, look at trace log:

log_china.txt

I think, there is a slow calculation of AT-response. This @iceman1001 firmware performs about 15000 ticks to decrypt ar-nr request and calculate at-response. Stock Chinese firmware performs about 10000 ticks (up to 30% better). I solve this issue by implementing into @iceman1001 firmware 'Crypto1.c' from official repository (see attach):

crypto1.zip

After that Android smartphone does work corrected. Firmware performs AT-response about 9000 ticks, look at log:

android_log.txt

Very good @McEloff! I want to try this! Can you do a PR with the changed file?

Wow, nice work!!! I'm going to try the patch.

@bogiton You can extract files from attached crypto1.zip and exclude original Crypto1_asm.* from compilation to check locally. I'm not commit my changes to remote repository yet. For full Android corrected works firmware must contains other method to nested authentication. Now I fixing this

Very nice 👍

@McEloff I tried your patch but it didn't change much in my case. I have UID working well but not key mapping with MCT.

@slurdge Under firmware build from my repo MCT succeed maps keys and read tag

I build from your repository. I succeeded to map keys and read tag but it was still quite difficult. Anyway that's good progress! Congratulations!

I had some respone to the PR, I should have writting it here instead.
three kinds of crypto1 implementations.
RevG . latest
RevE rebooted old
RevE rebooted new (iskuri)

RevG implementation relies on the large mcu. Not suitable from reve rebooted.
Old revE rebooted version, was apparently too slow for simulations.
New revE rebooted version, should have been faster...

Now I feel we need to test all of them and really document speed, memory usage, which version is the most suitable for this project.

@slurdge May try now that fix for full byte anticollision is merged?

I tried both master and the @McEloff branch. On master, situation is more or less the same, I can't reliably read a tag with my phone. On McEloff branch (with crypto1 changes), I can now read tag (at least 3 times in a row if correctly placed).

Same as @slurdge regarding MCT. I even tested the stock firmware. None of them was accepted by the real reader though. But since we are moving forward I would go with @McEloff implementation for the time being.

So, tests, tests, please.
Does it work on Android reading the RevE rebooted with latest code as of today?
report back so I can close this one.

@McEloff Would you mind testing latest source and see if there is any more Mifare Classic issues with crypto, readers, 1k , 4k , 4b , 7B ?

Did a test again yesterday with latest firmware and 2 Android phones, and worked well. It may be a pain, as NFC readers on Android phones are sometimes really capricious things (depending on phone, I sometimes have to find "the" good position to put the tag on the phone), and some emulation might still not be perfect.

I tried today the latest firmware. Classic 1K 4uid, 1K 7uid, 4K 7uid emulation. With Android, with ACR122U, with third-party readers. No problem. Chameleon emits low signal on air that need to be find on best location under smartphone and transmission has been succeed.

antennas, rf coupling, is dark woodoo of rfid. We can't do anything about those factors on other devices, like readers, smart phones etc.

Good thing that most of this seems to work again. With @ShinHub and @McEloff help this have become a massive enhancements last months. When last PR from @ShinHub is merged we will have even more / better functions for the device.

Need to adapt the GUI for it.

@iceman1001 great, exciting. Should we close this MCT issue then?