timmerk / nfc-tools

Automatically exported from code.google.com/p/nfc-tools
0 stars 0 forks source link

"nfc_initiator_init: Input/output error in " when exploiting sector #70

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. run mfoc on ACR122U reader
Connected to NFC device: ACS ACR122U 00 00 / ACR122U207 - PN532 v1.6 (0x07)

2. Try to exploit mifare classic
$ mfoc -O keys.mfd >mfc_output.txt 2>&1

3. End up with "nfc_initiator_init: Input/output error"

pcsc-lite is 1.7.0. libnfc is the trunk 1.5.0pre3 (r1122), mfoc version 
0.10.2.(from trunk)
libnfc was compiled with debug symbols.

OS: Ubuntu 11.04, only pcsc-lite from regular repository, also tried pcsc-lite 
1.7.4. The same result.
I think it might be related with firmware.

I'm willing to provide any additional information. Just let me know.

Original issue reported on code.google.com by mistrzipan@gmail.com on 11 Jul 2011 at 11:10

Attachments:

GoogleCodeExporter commented 9 years ago
I looked closely, what exactly happens just before the reader hangs.

winscard_svc.c: ContextThread() TRANSMIT rv=0x80100069 for client 6
according to source code:
#define SCARD_W_REMOVED_CARD0x8010006

so like writing internal register makes reader thinks that he lost card or what 
?

This is an excerpt from the last transmits and responses:

APDU: FF 00 00 00 08 D4 08 63 02 00 63 03 00 
SW: D5 09 90 00 
APDU: FF 00 00 00 06 D4 42 60 03 6E 49 
SW: D5 43 00 DF 98 35 E1 90 00 
APDU: FF 00 00 00 04 D4 06 63 0D 
SW: D5 07 00 90 00 
APDU: FF 00 00 00 05 D4 08 63 0D 10 
SW: D5 09 90 00 
APDU: FF 00 00 00 0B D4 42 F9 E5 44 99 3F BB 98 9C 6F 
SW: D5 43 00 DD B3 07 1D 02 90 00 
APDU: FF 00 00 00 04 D4 06 63 3C 
SW: D5 07 14 90 00 
APDU: FF 00 00 00 04 D4 06 63 3D 
SW: D5 07 00 90 00 
APDU: FF 00 00 00 05 D4 08 63 3D 04 
SW: D5 09 90 00 
APDU: FF 00 00 00 07 D4 42 00 7C 89 05 0F 
SW: D5 43 00 31 CA 52 7C 00 90 00 
APDU: FF 00 00 00 04 D4 06 63 3C 
SW: D5 07 14 90 00 

after that reader hangs. The last free is like write to internal register, 
sends some data to card (by PN532) and finally read some register.

Damn I think I need to understand the whole thing about cracking it. 
But anyway, any ideas?

Original comment by mistrzipan@gmail.com on 12 Sep 2011 at 1:50

GoogleCodeExporter commented 9 years ago

Original comment by romu...@libnfc.org on 12 Sep 2011 at 10:46

GoogleCodeExporter commented 9 years ago
And moreover, I'd like to point out that 
I tried this on SmartMX card with Mifare emulation. 

But later on I prepared a plain Mifare Classic 1K card
1. with first sector with default key and other random. failed the same way.
2. made the second sector with default key, but the result was the same.

Original comment by mistrzipan@gmail.com on 12 Sep 2011 at 11:23

GoogleCodeExporter commented 9 years ago
I have thesame problem with mifare plus 2k cards.

Original comment by Security...@gmail.com on 24 Dec 2011 at 12:27

GoogleCodeExporter commented 9 years ago
I have the same problem... at last did someone manage it?

Original comment by amanti...@gmail.com on 27 Jun 2012 at 1:15

GoogleCodeExporter commented 9 years ago
Works fine with new usb driver

Original comment by alx...@gmail.com on 27 Jun 2012 at 7:42

GoogleCodeExporter commented 9 years ago
Which usb driver version number??? 

Original comment by amanti...@gmail.com on 6 Jul 2012 at 11:23

GoogleCodeExporter commented 9 years ago
Same problem for me:
...
Using sector 00 as an exploit sector
nfc_initiator_init: Input / Output Error

After this error I have to replug reader..

Original comment by trustytw...@gmail.com on 11 Oct 2012 at 8:56

GoogleCodeExporter commented 9 years ago
I get the same problem when i try to crack the key by mfoc,I get the:
"Using sector 00 as an exploit sector
nfc_initiator_init: Input / Output Error"
and the reader(arc 122u) blocked
and i get a way on
 http://wiki.radiowar.org/index.php?title=Libnfc&diff=prev&oldid=10#.E4.BD.BF.E7.94.A8mfoc.E6.97.B6.E7.BB.8F.E5.B8.B8.E5.87.BA.E7.8E.B0.E5.A6.82.E4.B8.8B.E9.94.99.E8.AF.AF.EF.BC.9Anfc_initiator_init:Input.2Foutput_error
but I have not try yet

Original comment by 594p...@gmail.com on 27 Dec 2012 at 6:45

GoogleCodeExporter commented 9 years ago
This is obsolete.

Please use MFOC 0.10.4 with libnfc 1.7.0

Original comment by romu...@libnfc.org on 20 Jan 2013 at 4:14

GoogleCodeExporter commented 9 years ago
Has anyone found a solution?
I have the same problem with this error:

Using sector 00 as an exploit sector
Sector: 8, type A, probe 0, distance 19523 .nfc_initiator_init: Input / Output 
Error

I used both fedora and ubuntu 12.04 with mfoc 0.10.5 and libnfc 1.7.0
and I tried it with several cards and all of them came with this error on 
different sectors.
And I use ACR122u as the reader.

Can someone please help to solve this?

Original comment by r3zj...@gmail.com on 3 Jun 2013 at 7:17

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
This bug is not fixed. I'm running LIBNFC-1.7.1 and MFOC-0.10.7.
Please provide a fix for this. Anyone knows how the fix on radiowar works? 
Translate is bad..

http://wiki.radiowar.org/index.php?title=Libnfc&diff=prev&oldid=10#.E4.BD.BF.E7.
94.A8mfoc.E6.97.B6.E7.BB.8F.E5.B8.B8.E5.87.BA.E7.8E.B0.E5.A6.82.E4.B8.8B.E9.94.9
9.E8.AF.AF.EF.BC.9Anfc_initiator_init:Input.2Foutput_error

Original comment by wouterva...@gmail.com on 28 Mar 2014 at 6:00

GoogleCodeExporter commented 9 years ago
me too

This bug is not fixed. I'm running LIBNFC-1.7.1 and MFOC-0.10.7 with ACR122u

and i add some debug msg,and found it stop after  nfc_initiator_init() -> 
nfc_device_set_property_bool(pnd, NP_ACTIVATE_FIELD, false)

debug   libnfc.chip.pn53x       PN53X_REG_CIU_BitFraming (Adjustments for bit or
iented frames)
debug   libnfc.chip.pn53x       WriteRegister
debug   libnfc.driver.acr122_pcsc       TX: ff 00 00 00 05 d4 08 63 3d 04
debug   libnfc.driver.acr122_pcsc       RX: d5 09 90 00
debug   libnfc.chip.pn53x       InCommunicateThru
debug   libnfc.driver.acr122_pcsc       TX: ff 00 00 00 07 d4 42 01 6f e0 db 04

debug   libnfc.driver.acr122_pcsc       RX: d5 43 00 8d e9 bf 22 04 90 00
debug   libnfc.chip.pn53x       PN53X_REG_CIU_Control (Contains miscellaneous co
ntrol bits)
debug   libnfc.chip.pn53x       ReadRegister
debug   libnfc.driver.acr122_pcsc       TX: ff 00 00 00 04 d4 06 63 3c
debug   libnfc.driver.acr122_pcsc       RX: d5 07 14 90 00
debug   nfc_initiator_init      NP_ACTIVATE_FIELD_false
debug   libnfc.chip.pn53x       ReadRegister
debug   libnfc.driver.acr122_pcsc       TX: ff 00 00 00 08 d4 06 63 02 63 03 63
0d
nfc_initiator_init: Input / Output Error

what is going on??

Original comment by gwnpe...@gmail.com on 27 Aug 2014 at 5:23

GoogleCodeExporter commented 9 years ago
any clue?

Original comment by adrien.d...@gmail.com on 7 Mar 2015 at 12:55