Closed shellster closed 2 years ago
Accidentally submitted this before I was done typing up the bug issue. So I closed the issue until I was done editing. Reopening now.
I pushed some minor changes, one is the addition of a amiboo pack when used with a dumpfile which didn't have it. Pull latest and see if it works better.
Side note: Your Proxmark3 device has 256kb internal flash memory and the full image you flashed is really pushing the limits. Try to remove some command support from the armsrc makefile, to generate a smaller fullimage.
--= Nonvolatile Program Memory Size: 256K bytes, Used: 261435 bytes (100%) Free: 709 bytes ( 0%)
I'll check it next week when I get home and have another computer. Thanks for the response. I tried building the latest from master, but I'm running into the same errors as described in https://github.com/RfidResearchGroup/proxmark3/issues/815 I'm on Devuan Linux. I probably have an Ubuntu VM somewhere, at home.
I've seen this same issue on my system (rdv4, tested on multiple OSes) - the same .eml file works on an old build, but not on new one, including master as of today (commit 551bc6c71bf41d6d8b7f3a876ded720a81cbca73). Happy to provide any info needed.
Looking at the header formats and poking around in the simulator memory between the two versions, I notice a couple things:
0004040201001103
, but the first 8 bytes of hf mf eget 0
are 0000000001001103
.pages
field is loaded as 0xF2, whereas in the old version it prints a message after eload
saying that it loaded 255 blocks.I've tried manually fixing the version using hf mf eset
, with and without also tweaking the pages
field, but that wasn't enough to actually make it work.
@cheeplusplus wrote about they got amiibo support working again here: https://blog.neocodenetworks.com/posts/2020-04-08-amiibo-emulation/
https://github.com/cheeplusplus/proxmark3/commit/52184833e5c0d6066db6e5009b48dd3c00629e01
Thanks, looks like the password part is probably the other piece I was missing. The password value doesn't end up in the simulator memory with the new legacy load operation. If my quick skim of the code is correct, it appears to be pulling it from address 1024. I need to get to bed so I didn't dig any deeper to see whether that's a valid place to load from, but I can't access that via hf mf eget
anyway.
Thanks guys for all your testing as well as the previous link.
I believe I've tracked down the cause of the 0's in the first 4 bytes loaded. They are actually the last 4 bytes - in the generated eml files from samyk's mfubin2eml tool, there are 1020 bytes including the old mfu header. when read in and converted to the new format, the resulting data is now 1028 bytes due to the larger header. The extra 4 bytes beyond 1024 overflow and end up written to bytes 0-3. Manually deleting the last block from the eml file fixes the 'version' field.
Ok, and I've now figured out a bit more about the password part. The Switch sends an auth request with some kind of a password to the card, and the firmware is pulling the expected password out of the second-to-last block of the dump. If it matches the value sent by the switch, It then sends a response from the last block in the dump. So with some adjustments to the eml files only, I'm able to get it working on the current master.
To summarize, I had to:
80808080
)It would also be good to change the header generated by mfubin2eml to the new format. All of these changes should be feasible in mfubin2eml, assuming the challenge code can be calculated.
I'm beat for the night, and I don't know when I might have time to poke at this more, but that should at least be a good amount of info if someone else wants to run with it.
@mokus0 If you're talking about calculating the PWD to check if you should send pACK
, the code for that is already in proxmark:
If I recall correctly, part of the reason I hardcoded it was because I was using unencrypted amiibo dumps with pm3_amii_bin2eml.pl
, which (if not in the dump) adds a header using a fixed UID and 00000000
for the PWD, and therefore a non-special-cased MIFARE_ULEV1_AUTH
command would fail. You would have to either use a properly encrypted dump (DIY dump or re-encrypt with amiitool
), or alternatively modify the bin2eml script to calculate the real PWD and put it in the header.
Yeah, I suspect that's exactly what I'd need - thanks! My plan if I have the time in the next day or so is to update the bin2eml script to generate the new header format, including only as much data as was in the original binary dump, and add the extra auth tokens. Your hardcoded fix of ignoring the PWD works well in the interim.
can confirm that it's working with the new mfu conversion script.
One question tho, when i try to write one of my chinese ntags with:
old version:
hf mf cload myfile
[+] loaded 1020 bytes from text file myfile.eml
[!!] 🚨 File content error.
new version:
hf mf cload myfile
[+] loaded 596 bytes from text file myfile.eml
[!!] 🚨 File content error.
any ideas? :/
@mokus0 I think we have the same script from samy, its just renamed, so it would be nice if you did the same love to it as you did the upstream one :)
https://github.com/RfidResearchGroup/proxmark3/blob/master/tools/pm3_amii_bin2eml.pl
@iceman1001 sure, I can do that - it might be a couple days before I have the spare cycles though!
can confirm that it's working with the new mfu conversion script.
One question tho, when i try to write one of my chinese ntags with:
old version:
hf mf cload myfile [+] loaded 1020 bytes from text file myfile.eml [!!] 🚨 File content error.
new version:
hf mf cload myfile [+] loaded 596 bytes from text file myfile.eml [!!] 🚨 File content error.
any ideas? :/
Same issue here
until you compare the files there is nothing to be said.
closing because of inactivity.
if someone comes along and test different old style mfu binaries and can verify it still doesn't work we can reopen this one and take it from there
Describe the bug If I use the very old (deprecated) iceman fork found here: https://github.com/iceman1001/proxmark3, I can use a tool like https://raw.githubusercontent.com/tomvanveen/samytools/master/mfubin2eml to clone an amiibo to a Proxmark3 Easy and successfully use it with a Nintendo switch. However, if I use the latest version (proxmark3-4.9237) from this repo (and same amiibo file that works with the deprecated version) I get the following warnings:
When I try to use the amiibo the Nintendo switch does not recognize it as a valid amiibo. I recognize that the tag file format has changed since the deprecated version (https://github.com/RfidResearchGroup/proxmark3/blob/8aebb8ef8ebf1f6301d8992c9054c87995cf4a01/doc/mfu_binary_format_notes.md), but I think there is some sort of bug in how the old format is being converted, since it is not resulting in a valid amiibo. I'm happy to provide logs, or specific files if that is helpful. If someone can point me to some documentation that can help me update my .eml files to work with the new version, I'd be grateful.
To Reproduce Steps to reproduce the behavior:
Expected behavior I expect that I should be able to make a successful amiibo clone using the same amiibo.eml file and commands as I can on the deprecated code base.
Screenshots N/A
Desktop (please complete the following information):
LF Tuning is because I currently have removed the LF antenna.
Additional context N/A