Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is nfc-mfclassic the right app to write a dump gained with mfoc-hardnested back to a card? #676

Open
ld21 opened this issue Jul 27, 2022 · 0 comments

Comments

@ld21
Copy link

ld21 commented Jul 27, 2022

Hi everyone

I successfully extracted the contents of a MIFARE classic card using mfoc-hardnested using
mfoc-hardnested -f keys.txt -O extractedcard.mfd over an USB Adafruit PN532 Breakout Board:

# ./mfoc-hardnested -f keys.txt -O extractedcard.mfd 
ATS len = -20
Found Mifare Classic 1k tag
ISO/IEC 14443A (106 kbps) target:
    ATQA (SENS_RES): 00  04  
* UID size: single
* bit frame anticollision supported
       UID (NFCID1): 6d  02  b6  62  
      SAK (SEL_RES): 08  
* Not compliant with ISO/IEC 14443-4
* Not compliant with ISO/IEC 18092

Fingerprinting based on MIFARE type Identification Procedure:
* MIFARE Classic 1K
* MIFARE Plus (4 Byte UID or 4 Byte RID) 2K, Security level 1
* SmartMX with MIFARE 1K emulation
Other possible matches based on ATQA & SAK values:

Try to authenticate to all sectors with default keys...
...
...

However, when trying to write the dump back to the card using
nfc-mfclassic w a extractedcard.mfd extractedcard.mfd, the process fails with

root@nfc:/home/to# LIBNFC_LOG_LEVEL=3 nfc-mfclassic w a extractedcard.mfd extractedcard.mfd
NFC reader: Adafruit PN532 Breakout opened
Found MIFARE Classic card:
ISO/IEC 14443A (106 kbps) target:
    ATQA (SENS_RES): 00  04  
       UID (NFCID1): 6d  02  b6  62  
      SAK (SEL_RES): 08  
RATS support: no
Guessing size: seems to be a 1024-byte card
Writing 63 blocks |Failure to write to data block 1
xroot@nfc:/home/to# 

and the card remains unaltered. I'm using a fresh Kali linux and an uptodate libnfc (1.8.0).

Am I correct using nfc-mfclassic to write the dump back or should I use another program (since it identifies as a MIFARE Plus)?

Does anyone have an idea what the problem might be?
Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant