mfcuk icon indicating copy to clipboard operation
mfcuk copied to clipboard

SIGSEGV in recovery

Open 0x5ECF4ULT opened this issue 4 years ago • 10 comments

So I got that SmartMX card with 4k emulation and tried to run the release version 0.3.8 Standard command ./mfcuk -C -R -1 throws a segfault. Time to start gdb... This is the output:

mfcuk - 0.3.8
Mifare Classic DarkSide Key Recovery Tool - 0.3
by Andrei Costin, [email protected], http://andreicostin.com


INFO: Connected to NFC reader: pn532_uart:/dev/ttyUSB0


VERIFY: 
	Key A sectors: 0
Program received signal SIGSEGV, Segmentation fault.
0x0000555555557295 in main (argc=<optimized out>, argv=<optimized out>) at mfcuk.c:1521
1521	      for (j = 0; (j < crntNumVerifKeys) && (ptr_trailer->abtAccessBits[action_byte] & ACTIONS_VERIFY) && !(ptr_trailer->abtAccessBits[result_byte] & ACTIONS_VERIFY); j++) {
(gdb) 

It seems like the program crashes at the verification of the keys. The funny thing is that if the type parameter is given. It tries to authenticate but constantly throws error 0x08 The card OS is "atrust-acos"

0x5ECF4ULT avatar Feb 22 '20 15:02 0x5ECF4ULT

did you try to compile and run this forked version: https://github.com/DrSchottky/mfcuk? maybe it would work better ..

xavave avatar Feb 22 '20 15:02 xavave

Just tried out. Crashes at exact same position

0x5ECF4ULT avatar Feb 22 '20 16:02 0x5ECF4ULT

@tacticalDevC what about the windows version ? Could you try it ? I have compiled a bunch of tools, available here: http://legacy.averbouch.biz/libnfc-and-nfc-utils-binaries-on-windows-10/#alltools

xavave avatar Feb 22 '20 16:02 xavave

I'm sorry I don't have any Windows machine anymore. Let's focus on the code. What do you need to find the error?

0x5ECF4ULT avatar Feb 22 '20 16:02 0x5ECF4ULT

@tacticalDevC you don’t have a dump of this tag so I could test it on my side ?

xavave avatar Feb 22 '20 16:02 xavave

Nope because I wanted to crack the tag. But I have this. Maybe it helps you. Thanks in advance

0x5ECF4ULT avatar Feb 22 '20 17:02 0x5ECF4ULT

@tacticalDevC unfortunately I need a tag dump to try to reproduce this error. did you try mfoc with extended keys dictionary: https://github.com/ikarus23/MifareClassicTool/blob/master/Mifare%20Classic%20Tool/app/src/main/assets/key-files/extended-std.keys

xavave avatar Feb 22 '20 17:02 xavave

mfoc doesn't work either. Pls see this issue (spoiler: no one has answered yet).

0x5ECF4ULT avatar Feb 22 '20 17:02 0x5ECF4ULT

@tacticalDevC i replied here: https://github.com/nfc-tools/mfoc/issues/77

xavave avatar Feb 23 '20 21:02 xavave

This is caused by the fact that your card is not a compatible Mifare card (only Classic 1K & 4K are supported AFAIK). I tried the tool with a DESFire v3 and got the same issue. Using it with a real Classic card on the other hand worked for me.

31KM avatar Jun 30 '21 16:06 31KM