This post is about how to recovery keys using Raspberry Pi. Actually, it is almost as same as running mfcuk on Ubuntu.

Environment: Using Raspbian on Raspberry Pi, which can download from here.

Tools & Libraries needed: * libnfc-1.5.1, mfcuk-0.3.2 * ACR122 NFC Reader


Important:

The current version of mfcuk is 0.3.8, but there are some bugs exist so that the recovery key is wrong. Therefore, we should use mfcuk-0.3.2 instead of the current version.

  • Install libnfc Almost same as install libnfc on Ubuntu, but because we are using mfcuk-0.3.2, we should use libnfc-1.5.1 instead of v1.7.0.
1
2
3
4
5
6
7
sudo apt-get install wget libpcsclite-dev pcsc-tool pcscd
wget http://libnfc.googlecode.com/svn/files/libnfc-1.5.1.tar.gz
tar -xvzf libnfc-1.5.1.tar.gz
cd libnfc-1.5.1
./configure
make
sudo make install
  • Install mfcuk
1
2
3
4
sudo apt-get install subversion autoconf
svn checkout http://mfcuk.googlecode.com/svn/trunk mfcuk -r 52
cd mfcuk
autoreconf -is

Go to “configure.ac”, remove “AC_FUNC_MALLOC” and “AC_FUNC_REALLOC” !! Very important!!

Otherwise, you will get some errors like this : “rpl_malloc” not defined when compiling. After modify the file:

1
2
./configure
make

After all these steps, you are able to run mfcuk on RasPi successfully.

For example, you can go to mfcuk/src/bin :

1
./mfcuk-keyrecovery-darkside -C -R 0:A -s 150 -S 150 -v 3

However, the ACR122 will not be detected after excute the mfcuk program. You have to replug the ACR122 Reader and

1
sudo pcscd

to detect it again.