Closed Aptimex closed 4 months ago
Thanks,
the reason for the final candidate is mentioned right above it.
When bruteforcing the 16 bits left we try to find a valid combo of 4 byte MFC command.
In this case the decrypted response is 61 0B ,, meaning auth - key b, to block 0x0b. and it has a valid CRC 14a of 0xFEDC Meaning all four bytes was decrypted into something meaningful and valid in MFC protocol.
The question is of course if it printed the wrong key...
Looking for the upper 16 bits of the key
enc: AAD4126B
dec: 610BFEDC
Valid Key found [ 7c2337afcc2b ]
and you should update your sim module firmware...
[#] Smart card module (ISO 7816)
[#] version................. v3.11 ( Outdated )
and flip your Q switch to 7 on the pcb antenna backside.
Can you give me a output of all keys from in the memory dump of that card?
Pull latest and see the updated output.
Its an odd case indeed.
Thanks for looking into this, new output does a good job clarifying what's going on in this situation.
I see you closed this, but if you still want the full key dump from the card let me know.
Nay I am fine, your sample to run the command was enough for me to figure out what was going on and why.
Describe the bug I found an input for the
mf_nonce_brute
program that causes it to display the incorrect key even though it finds the correct key. Guessing it's a weird edge case in the code since I've only encountered this issue for this particular input. This input came from analyzing a trace of Mifare Classic 1k tag interacting with its reader.To Reproduce
tools/mf_nonce_brute/mf_nonce_brute fcf77b54 1b456bdd 1110 f215b6 f9eb95e9 0011 bf55d0b1 0000 AAD4126B
Key candidate [ a70d37afcc2b ]
Valid Key found [ 7c2337afcc2b ]
I verified that
a70d37afcc2b
is the correct key in this case (it correctly decrypts the associated block). The final line is just displaying an incorrect value for some reason.Expected behavior The final line of the output should say
Valid Key found [ a70d37afcc2b ]
(same as theKey candidate
found previously in the output)Screenshots Full command and output I get:
Desktop (please complete the following information):
hw version
hw tune
sincedata tune
is not a valid command)[=] -------- Reminder ---------------------------- [=]
hw tune
doesn't actively tune your antennas. [=] It's only informative. [=] Measuring antenna characteristics... 🕗 13[=] -------- LF Antenna ---------- [+] 125.00 kHz ........... 71.36 V [+] 134.83 kHz ........... 40.11 V [+] 126.32 kHz optimal.... 75.91 V [+] [+] Approx. Q factor measurement [+] Frequency bandwidth... 12.7 [+] Peak voltage.......... 13.2 [+] LF antenna............ ok
[=] -------- HF Antenna ---------- [+] 13.56 MHz............. 48.65 V [+] [+] Approx. Q factor measurement [+] Peak voltage.......... 8.5 [+] HF antenna ( ok )
[=] -------- LF tuning graph ------------ [+] Orange line - divisor 95 / 125.00 kHz [+] Blue line - divisor 88 / 134.83 kHz
[=] Q factor must be measured without tag on the antenna