Next-Flip / Momentum-Firmware

🐬 Feature-rich, stable and customizable Flipper firmware
https://momentum-fw.dev
GNU General Public License v3.0
3.05k stars 107 forks source link

MFKey Fails to Decrypt Nonces with "Error Nonces Already Cracked" After Successful Nested Attack #126

Closed oldip closed 1 month ago

oldip commented 1 month ago

Describe the bug.

I am encountering a persistent error with the MFKey application when attempting to decrypt nonces extracted from Mifare Classic 1K cards after performing a successful Nested attack via Flipper Zero's Mifare Nested feature. The MFKey application displays "Error Nonces Already Cracked". This error indicates an issue with MFKey, as the successful decryption of nonces using the FlipperNested script on a PC confirms that the Mifare Nested attack itself is functioning correctly. The problem persists across multiple cards and remains even after old nested files are deleted.

Reproduction

  1. Switch on the Flipper Zero and navigate to the NFC functionality.
  2. Select 'Mifare Classic 1K' and initiate the Nested attack.
  3. After the Nested attack completes successfully, attempt to decrypt the extracted nonces using MFKey.
  4. Encounter the error "Error Nonces Already Cracked" in the MFKey application.

Target

Perform Nested attacks fully on Flipper Zero

Logs

No response

Anything else?

I have recorded a video of my operations which I will upload directly to GitHub to aid in detailed troubleshooting.

https://github.com/Next-Flip/Momentum-Firmware/assets/50076590/2e2d1a5d-220d-4ed5-8714-9b94476c0289

Willy-JL commented 1 month ago

They're probably HardNested nonces, not Nested nonces. Not all Mifare classic cards are made equal and so there are different kinds of nested attacks, the Mifare Nested app can extract different kinds of nonces for different kinds of attacks. MFKey can crack normal nested nonces, not hard nested nonces, which instead require a PC

oldip commented 1 month ago

Thank you for your response. This clarification regarding HardNested versus Nested nonces is helpful. Based on your explanation, it seems the nonces I am extracting using the Mifare Nested feature on the Flipper Zero are likely HardNested nonces, hence the issue with decryption using MFKey, which only supports normal nested nonces.

I appreciate your assistance in clarifying this matter. I'll close this issue now. Thank you again!