RfidResearchGroup / ChameleonMini

The ChameleonMini is a versatile contactless smartcard emulator compliant to NFC. The ChameleonMini was first developed by KAOS. This is NOT the official repo for KAOS's ChameleonMini. For further information see the Getting Started Page
http://chameleontiny.com/help/
Other
402 stars 76 forks source link

MF1K dump emulation keep auth error on new firmware #71

Open jackman815 opened 2 years ago

jackman815 commented 2 years ago

Keep Auth Error while emulating Mifare1K on new version firmware.

Device: ChameleonTiny Professional Reader: Proxmark 3 RDV4 v4.13441 (Also tested on other card reader)

build 152dc71 (old): image

build 90f04ac (new) : image

NathanielJS1541 commented 2 years ago

I was having the same problem with the latest commits to master. I tried recompiling 6a2a976fd956a57f125192f5ece9792e992d0502 and that seemed to work for me, which is I think the last commit that doesn't have the problem. I think it's commit 1235ee1198d2d73400b12ce1df40e5f69d04ff6f that's causing the problems.

NathanielJS1541 commented 2 years ago

Ok so basically what's happened is without editing the Makefile and removing support some of the tags, the compiled application is too large for the available memory on the Chameleon Tiny. This is after adding support for NTAG215 (commit 1235ee1198d2d73400b12ce1df40e5f69d04ff6f onwards I think). The command that I presume we both neglected to run was make check_size which returns something like the following:

make: *** Chameleon-RevG.elf Application Section size 66442 excedes maximum allowed 65536. Please disable some features in Makefile
make: *** [Makefile:192: check_size] Error 1

This would then cause the programmer to overwrite some other stuff and break support for Mifare classic I guess. The solution is to comment out support for some tags you don't use (I did it one at a time until make check_size returned no errors) in the makefile at the top (Currently this is lines 9 - 25):

#Supported configurations
SETTINGS    += -DCONFIG_MF_DETECTION_SUPPORT
SETTINGS    += -DCONFIG_MF_DETECTION_4K_SUPPORT
SETTINGS    += -DCONFIG_MF_CLASSIC_MINI_4B_SUPPORT
SETTINGS    += -DCONFIG_MF_CLASSIC_1K_SUPPORT
SETTINGS    += -DCONFIG_MF_CLASSIC_1K_7B_SUPPORT
SETTINGS    += -DCONFIG_MF_CLASSIC_4K_SUPPORT
SETTINGS    += -DCONFIG_MF_CLASSIC_4K_7B_SUPPORT
SETTINGS    += -DCONFIG_MF_ULTRALIGHT_SUPPORT
SETTINGS    += -DCONFIG_ISO14443A_SNIFF_SUPPORT
SETTINGS    += -DCONFIG_ISO14443A_READER_SUPPORT
SETTINGS    += -DCONFIG_NTAG215_SUPPORT
SETTINGS    += -DCONFIG_VICINITY_SUPPORT
SETTINGS    += -DCONFIG_SL2S2002_SUPPORT
SETTINGS    += -DCONFIG_TITAGITSTANDARD_SUPPORT
# SETTINGS  += -DCONFIG_ISO15693_SNIFF_SUPPORT
SETTINGS    += -DCONFIG_EM4233_SUPPORT

And yes everything else I was looking at was a wild goose chase...

jackman815 commented 2 years ago

Thank you very much, we both forgot to check the memory size haha

Ok so basically what's happened is without editing the Makefile and removing support some of the tags, the compiled application is too large for the available memory on the Chameleon Tiny. This is after adding support for NTAG215 (commit 1235ee1 onwards I think). The command that I presume we both neglected to run was make check_size which returns something like the following:

make: *** Chameleon-RevG.elf Application Section size 66442 excedes maximum allowed 65536. Please disable some features in Makefile
make: *** [Makefile:192: check_size] Error 1

This would then cause the programmer to overwrite some other stuff and break support for Mifare classic I guess. The solution is to comment out support for some tags you don't use (I did it one at a time until make check_size returned no errors) in the makefile at the top (Currently this is lines 9 - 25):

#Supported configurations
SETTINGS    += -DCONFIG_MF_DETECTION_SUPPORT
SETTINGS    += -DCONFIG_MF_DETECTION_4K_SUPPORT
SETTINGS    += -DCONFIG_MF_CLASSIC_MINI_4B_SUPPORT
SETTINGS    += -DCONFIG_MF_CLASSIC_1K_SUPPORT
SETTINGS    += -DCONFIG_MF_CLASSIC_1K_7B_SUPPORT
SETTINGS    += -DCONFIG_MF_CLASSIC_4K_SUPPORT
SETTINGS    += -DCONFIG_MF_CLASSIC_4K_7B_SUPPORT
SETTINGS    += -DCONFIG_MF_ULTRALIGHT_SUPPORT
SETTINGS  += -DCONFIG_ISO14443A_SNIFF_SUPPORT
SETTINGS  += -DCONFIG_ISO14443A_READER_SUPPORT
SETTINGS  += -DCONFIG_NTAG215_SUPPORT
SETTINGS  += -DCONFIG_VICINITY_SUPPORT
SETTINGS  += -DCONFIG_SL2S2002_SUPPORT
SETTINGS  += -DCONFIG_TITAGITSTANDARD_SUPPORT
# SETTINGS    += -DCONFIG_ISO15693_SNIFF_SUPPORT
SETTINGS  += -DCONFIG_EM4233_SUPPORT

And yes everything else I was looking at was a wild goose chase...

Thank you very much, we both forgot to check the memory size :)