PDA

View Full Version : RFID Cooking with Mifare Classic in kali



Lancha
2013-04-24, 15:44
to install the RFID Cooking with Mifare Classic using the touchtag i have to so same thing i do in backtrack 5 r3
like this apt-get install flex libpcsclite-dev libusb-dev checkinstall

root@bt:~# wget http://www.acs.com.hk/drivers/eng/ACR122U_driver_Lnx_Mac10.5_10.6_1.02_P.zip
root@bt:~# unzip -d acr122u ACR122U_driver_Lnx_Mac10.5_10.6_1.02_P.zip
root@bt:~# cd acr122u
root@bt:~# tar -jxvf acsccid-1.0.2.tar.bz2
root@bt:~# cd acsccid-1.0.2
root@bt:~# ./configure
root@bt:~# make
root@bt:~# checkinstall -D -y --install
root@bt:~# apt-get install -y debhelper libtool && wget http://libnfc.googlecode.com/files/libnfc-1.4.2.tar.gz
root@bt:~# tar xfvz libnfc-1.4.2.tar.gz &&cd libnfc-1.4.2
root@bt:~# svn checkout http://libnfc.googlecode.com/svn/tags/libnfc-1.4.2/debian
root@bt:~# dpkg-buildpackage -rfakeroot
root@bt:~# dpkg -i ../libnfc*.deb
root@bt:~# nfc-list
nfc-list use libnfc 1.4.2 (r891)
Connected to NFC device: ACS ACR122U 00 00 / ACR122U103 - PN532 v1.6 (0x07)
1 ISO14443A passive target(s) was found:
ATQA(SENS_RES):00 02
UID (NFCID1): xx xx xx xx
SAK (SEL_RES): 18
root@bt:~# nano /usr/lib/pcsc/drivers/ifd-ccid.bundle/Contents/Info.plist
ifdDriverOptions
0×0005

root@bt:~# wget http://nfc-tools.googlecode.com/files/mfoc-0.10.2.tar.gz && tar -xvzf mfoc-0.10.2.tar.gz
root@bt:~# cd mfoc-0.10.2
root@bt:~# autoreconf -vis
root@bt:~# ./configure
root@bt:~# make
root@bt:~# checkinstall -D -y --install
i using kali gnome 32 bits in virtualbox

MCSTIE
2013-04-25, 20:03
first, thanks for this tutorial.

second, it doesn't work for me, make fails


make
make all-recursive
make[1]: Entering directory `/root/acr122u/acsccid-1.0.2'
Making all in m4
make[2]: Entering directory `/root/acr122u/acsccid-1.0.2/m4'
make[2]: Für das Ziel »all« ist nichts zu tun.
make[2]: Leaving directory `/root/acr122u/acsccid-1.0.2/m4'
Making all in src
make[2]: Entering directory `/root/acr122u/acsccid-1.0.2/src'
/bin/bash ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I.. -pthread -I/usr/include/PCSC -pthread -fvisibility=hidden -DCCID_VERSION=`./convert_version.pl 1.0.2` -g -O2 -MT libacsccid_la-ifdhandler.lo -MD -MP -MF .deps/libacsccid_la-ifdhandler.Tpo -c -o libacsccid_la-ifdhandler.lo `test -f 'ifdhandler.c' || echo './'`ifdhandler.c
gcc -DHAVE_CONFIG_H -I. -I.. -pthread -I/usr/include/PCSC -pthread -fvisibility=hidden -DCCID_VERSION=0x01000002 -g -O2 -MT libacsccid_la-ifdhandler.lo -MD -MP -MF .deps/libacsccid_la-ifdhandler.Tpo -c ifdhandler.c -fPIC -DPIC -o .libs/libacsccid_la-ifdhandler.o
ifdhandler.c: In function ‘IFDHControl’:
ifdhandler.c:1416:22: error: ‘FEATURE_MCT_READERDIRECT’ undeclared (first use in this function)
ifdhandler.c:1416:22: note: each undeclared identifier is reported only once for each function it appears in
make[2]: *** [libacsccid_la-ifdhandler.lo] Fehler 1
make[2]: Leaving directory `/root/acr122u/acsccid-1.0.2/src'
make[1]: *** [all-recursive] Fehler 1
make[1]: Leaving directory `/root/acr122u/acsccid-1.0.2'
make: *** [all] Fehler 2

Did you also encounter this problem?

I managed to get the touchatag recogniced by kali just by editing

/etc/libccid_Info.plist
ifdDriverOptions
0×0005
OR (one of both pls dont copy the OR to the file ;) )
0x0004 (doesn't seem to matter)

If you don't do this you will get the "bogus" firmware error.

Now trail -f /var/log/syslog tells me on plugin:

Apr 25 23:31:18 kali kernel: [ 144.400160] usb 5-1: new full-speed USB device number 2 using uhci_hcd
Apr 25 23:31:18 kali kernel: [ 144.577229] usb 5-1: New USB device found, idVendor=072f, idProduct=2200
Apr 25 23:31:18 kali kernel: [ 144.577241] usb 5-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
Apr 25 23:31:18 kali kernel: [ 144.577249] usb 5-1: Product: CCID USB Reader
Apr 25 23:31:18 kali kernel: [ 144.577256] usb 5-1: Manufacturer:
Apr 25 23:31:18 kali mtp-probe: checking bus 5, device 2: "/sys/devices/pci0000:00/0000:00:1d.0/usb5/5-1"
Apr 25 23:31:18 kali mtp-probe: bus: 5, device: 2 was not an MTP device
Apr 25 23:31:18 kali kernel: [ 144.629469] WARNING! power/level is deprecated; use power/control instead
--> success

But mfoc tells me:

mfoc -O test.mfd
error libnfc.driver.acr122_usb Too small reply
No NFC device found.

I search for this error but didn't find a proper fix yet. Does anyone have a fix for that?

I'm using kali 64bit gnome, no vb.

Greets,
MCSTIE

Lancha
2013-04-26, 11:03
to put device work you have to use this command pcscd -f when you use the mfoc -o test.mfd
and i asking if to make the RFID Cooking working i have to do the samething with the backtrack 5 R3

MCSTIE
2013-04-27, 09:56
hmm "pcscd -f" doesn't change anything for me, still the "Too small reply" error.

Ah ok I didn't get that.

I think you have to do less, since mfoc and mfcuk are already installed and except the litte change in

/etc/libccid_Info.plist
ifdDriverOptions
0×0005
the device is alreasy correctly recognized (as you see in "/var/log/syslog").

And of course except the "Too small reply" error. Does anyone have a fix for this yet?

Greets,
MCSTIE

Lancha
2013-05-01, 18:48
i install the Kali 1.03 32 bits Gnome Version in hdd and my card reader is a touchtag
can someone help -me
use the nfc-list i have this error

nfc-list uses libnfc 1.7.0-rc6
error libnfc.driver.acr122_usb Too small reply
nfc-list: ERROR: Unable to open NFC device: acr122_usb:005:004



pcscd -f
00000000 ccid_usb.c:950:WriteUSB() usb_bulk_write(005/004): Device or resource busy
00000054 ifdwrapper.c:348:IFDStatusICC() Card not transacted: 612
00000008 eventhandler.c:303:EHStatusHandlerThread() Error communicating to: ACS ACR122U 00 00
i upgrade to my new version 1.8.8 and a have this error when i execute de cammand 00000000 hotplug_libudev.c:96:HPReadBundleValues() Cannot open PC/SC drivers directory: /usr/local/lib/pcsc/drivers
00000060 hotplug_libudev.c:97:HPReadBundleValues() Disabling USB support for pcscd.



mfoc -P 500 -O ola
error libnfc.driver.acr122_usb Too small reply
No NFC device found.

nanderh
2013-05-15, 16:06
Had the same problem, but solved it.
Theres no need for the driver as it's included with libnfc.
Just download the source and do:


autoreconf -vis
./configure --with-drivers=acr122_pcsc
make clean all
make install

You still have to do the bogus firmware thing in /etc/libccid_Info.plist
Apparently it had to do with the acr122_usb driver that's a bit wonky
EDIT
Just tried with 1.7.0rc7 and mfoc refused to compile.
Although everything does work fine with rc2

oseloth
2013-11-06, 16:52
I have these problems. any solution

ERROR 1


root@kali:~# mfoc -O key1.mfd

ISO/IEC 14443A (106 kbps) target:
ATQA (SENS_RES): 00 04
* UID size: single
* bit frame anticollision supported
UID (NFCID1): 0d 54 0c 01
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...
Symbols: '.' no key found, '/' A key found, '\' B key found, 'x' both keys found
[Key: ffffffffffff] -> [//./////////////]
[Key: a0a1a2a3a4a5] -> [//./////////////]
[Key: d3f7d3f7d3f7] -> [//./////////////]
[Key: 000000000000] -> [xx\xxxxxxxxxxxxx]
[Key: b0b1b2b3b4b5] -> [xx\xxxxxxxxxxxxx]
[Key: 4d3a99c351dd] -> [xx\xxxxxxxxxxxxx]
[Key: 1a982c7e459a] -> [xx\xxxxxxxxxxxxx]
[Key: aabbccddeeff] -> [xx\xxxxxxxxxxxxx]
[Key: 714c5c886e97] -> [xx\xxxxxxxxxxxxx]
[Key: 587ee5f9350f] -> [xx\xxxxxxxxxxxxx]
[Key: a0478cc39091] -> [xx\xxxxxxxxxxxxx]
[Key: 533cb6c723f6] -> [xx\xxxxxxxxxxxxx]
[Key: 8fd0a4f256e9] -> [xx\xxxxxxxxxxxxx]

Sector 00 - FOUND_KEY [A] Sector 00 - FOUND_KEY [b]
Sector 01 - FOUND_KEY [A] Sector 01 - FOUND_KEY [b]
Sector 02 - UNKNOWN_KEY [A] Sector 02 - FOUND_KEY [b]
Sector 03 - FOUND_KEY [A] Sector 03 - FOUND_KEY [b]
Sector 04 - FOUND_KEY [A] Sector 04 - FOUND_KEY [b]
Sector 05 - FOUND_KEY [A] Sector 05 - FOUND_KEY [b]
Sector 06 - FOUND_KEY [A] Sector 06 - FOUND_KEY [b]
Sector 07 - FOUND_KEY [A] Sector 07 - FOUND_KEY [b]
Sector 08 - FOUND_KEY [A] Sector 08 - FOUND_KEY [b]
Sector 09 - FOUND_KEY [A] Sector 09 - FOUND_KEY [b]
Sector 10 - FOUND_KEY [A] Sector 10 - FOUND_KEY [b]
Sector 11 - FOUND_KEY [A] Sector 11 - FOUND_KEY [b]
Sector 12 - FOUND_KEY [A] Sector 12 - FOUND_KEY [b]
Sector 13 - FOUND_KEY [A] Sector 13 - FOUND_KEY [b]
Sector 14 - FOUND_KEY [A] Sector 14 - FOUND_KEY [b]
Sector 15 - FOUND_KEY [A] Sector 15 - FOUND_KEY [b]


Using sector 00 as an exploit sector
Sector: 2, type A, probe 0, distance 23874 .error libnfc.driver.pn53x_usbUnable to write to USB (Connection timed out)
nfc_initiator_init: Unknown error


So what is the solution.


nfc-list state

nfc-list uses libnfc 1.7.0-rc7
NFC device: SCM Micro / SCL3711-NFC&RW opened


Running kali linux with all preinstalled exploit tools installed on vmware

ERROR 2


root@kali:~# nfc-mfclassic r a key.mfd
error libnfc.chip.pn53x Unexpected PN53x reply!
NFC reader: SCM Micro / SCL3711-NFC&RW opened
Found MIFARE Classic card:
ISO/IEC 14443A (106 kbps) target:
ATQA (SENS_RES): 00 04
UID (NFCID1): 0d 54 0c 01
SAK (SEL_RES): 08
Guessing size: seems to be a 1024-byte card
Reading out 64 blocks |................................................. ...nfc_initiator_transceive_bytes: Mifare Authentication Failed
nfc_initiator_transceive_bytes: Mifare Authentication Failed
nfc_initiator_transceive_bytes: Mifare Authentication Failed
nfc_initiator_transceive_bytes: Mifare Authentication Failed
nfc_initiator_transceive_bytes: Mifare Authentication Failed
nfc_initiator_transceive_bytes: Mifare Authentication Failed
nfc_initiator_transceive_bytes: Mifare Authentication Failed
nfc_initiator_transceive_bytes: Mifare Authentication Failed
nfc_initiator_transceive_bytes: Mifare Authentication Failed
!
Error: authentication failed for block 0x0b

forumkali@yopmail.com
2014-08-09, 15:57
I running 32bit Kali in 32bit vmware on 32bit host and I get:

Error1

05342529 ccid_usb.c:875:WriteUSB() usb_bulk_write(002/009): Resource temporarily unavailable
05659096 ccid_usb.c:875:WriteUSB() usb_bulk_write(002/009): Resource temporarily unavailable
05342649 ccid_usb.c:875:WriteUSB() usb_bulk_write(002/009): Resource temporarily unavailable
05659358 ccid_usb.c:875:WriteUSB() usb_bulk_write(002/009): Resource temporarily unavailable
05342652 ccid_usb.c:875:WriteUSB() usb_bulk_write(002/009): Resource temporarily unavailable
05659251 ccid_usb.c:875:WriteUSB() usb_bulk_write(002/009): Resource temporarily unavailable
05343246 ccid_usb.c:875:WriteUSB() usb_bulk_write(002/009): Resource temporarily unavailable
05658721 ccid_usb.c:875:WriteUSB() usb_bulk_write(002/009): Resource temporarily unavailable
05343943 ccid_usb.c:875:WriteUSB() usb_bulk_write(002/009): Resource temporarily unavailable
05659055 ccid_usb.c:875:WriteUSB() usb_bulk_write(002/009): Resource temporarily unavailable
05347616 ccid_usb.c:875:WriteUSB() usb_bulk_write(002/009): Resource temporarily unavailable

Error2

00000080 readerfactory.c:972:RFInitializeReader() Open Port 0x200000 Failed (usb:072f/2200:libudev:0:/dev/bus/usb/002/009)
00000022 readerfactory.c:279:RFAddReader() ACS ACR122U init failed.
00002467 hotplug_libudev.c:379:HPAddDevice() Failed adding USB device: ACS ACR122U
00012937 ccid_usb.c:514:OpenUSBByName() Can't claim interface 2/9: -6
00000845 ifdhandler.c:117:CreateChannelByNameOrChannel() failed
00000634 readerfactory.c:972:RFInitializeReader() Open Port 0x200000 Failed (usb:072f/2200:libudev:0:/dev/bus/usb/002/009)
00000478 readerfactory.c:279:RFAddReader() ACS ACR122U init failed.
00000644 hotplug_libudev.c:389:HPAddDevice() Failed adding USB device: ACS ACR122U


Error3
nfc-list uses libnfc 1.7.0
error libnfc.driver.acr122_usb Unable to write to USB (Connection timed out)
nfc-list: ERROR: Unable to open NFC device: acr122_usb:002:009

Error4
[Sat Aug 9 17:36:14 2014] pcscd[3624]: segfault at b75d5292 ip b75d5292 sp b75c5360 error 14


Hope somebody can help. I tried to dl the driver separate, the thing is that pcscd always crashes.

jatgm1
2015-02-02, 00:16
i need help, i dont understand how these things work. i have purchased a acr122 and have installed rfid-tools with deb files, i am running ubuntu 14.04. i want to run mfcuk, the mfcuk command exists in terminal and nfc-list tells me it recognises my device, i installed the driver with a deb file. i have a 64 bit system. can someone PLEASE for the love of god, direct me to somewhere that can explain how to use the mfcuk and mfoc tools. i get an error when trying to use mfcuk.