The DIY portable NFC cloner
Recently, I’ve been looking at portable NFC and RFID cloners.
They cost from 50 to 350€, are small enough to fit in a pocket, versatile and I’m sure, pretty handy in many situations.
But let’s be honest, it’s not something I wouldn’t use on a daily basis or actually “really” need.
That’s how this somehow recurrent idea came to me: “let’s build my own”!
I only used things I already own for this project :
- A Raspberry Pi 2 B+ w/ Raspbian
- An ACR122U RFID adapter
- An Amazon Basics 5.6mAh power bank
- The 16x2 LCD display that came with my Arduino
- An empty Guiness Fudge box as a case
II — Assembly
The first step was to use my LCD screen on the Raspberry Pi, which to some hardware hackers might seem to be trivial.
At first, I wasn’t even 100% sure it was possible but after a little bit of research I came across this video, which allowed me to understand the screen’s pins configuration:
And after much more time that I’m willing to admit (I probably watched the video more than 50 times), I finally succeeded!
Once the screen was mounted, the rest was quite simple.
I made cutouts in my box for my Pi and its screen to fit in (using a knife and a small file, don’t do this at home), plugged the power bank and the NFC receiver in and I was done!
Now that the hardware was ready, I needed to write some software to be able to automatically clone the badges without having to manually run commands on the Pi.
I installed LibNFC on Raspbian to be able to interact with NFC devices (more information on cloning NFC tags here: https://medium.com/@lp1/how-to-hack-mifare-classic-nfc-cards-69c8edcbe1e7), and opened a Python3 editor.
Here is the workflow I had in mind :
- The cloner waits for a NFC badge
- Tap a NFC badge
- The badge’s data and UID is read and stored on the Pi
- The cloner waits for another NFC
- Tap another NFC badge
- The previous badge’s data and UID is written to this other badge
And here’s what the code looks like :
I then saved this script on the Rasbperry and added it to the /etc/rc.local file so it would run at startup!
IV — Demonstration
Finally, here’s what it looks like in action!
V — Wrap Up
In the end, we have a cool DIY portable NFC cloner!
It only supports MiFare Classic tags at the moment but the script could be very easily modified to add MiFare Ultralight support.
So, have we met our objectives?
- It is DIY? Definitely
- Is is portable? Kinda, it fits in my coat’s pocket but I could be much smaller with a Raspberry Pi Zero
- Does it clones NFC tags? Yup
VI — What’s next?
1- Build a “real” case
I don’t really have better materials to build a fancier case at the moment, but if a kind 3d printer owner would be willing to print one for me (I can pay for the material and shipment) that would be awesome!
2- Use a Raspberry Pi Zero
I’m going to try to setup the LCD screen and the scripts on the Rasbperry Pi Zero, which will make the NFC cloner much more portable!
3- Make the script better
Mifare Ultralight support would be nice and easy to implement, there are also probably many ways to make the whole cloning process much smoother! I’ll look into it.
Thanks for reading!
Please leave comment if you have something to ask/ say.