3 Simple Ways to
Share What You Make

With Instructables you can share what you make with the world — and tap into an ever-growing community of creative experts.

PhotosPhotos

Share one or more photos of a project, recipe, or whatever you've made, quickly and easily.

Step by StepStep-By-Step

Share your step-by-step photos with text instructions of what you made so others can do it too!

VideoVideo

Share your how-to video. You'll need your embed code from a video site such as YouTube.

A Universal RFID Key

A Universal RFID Key
RFID projects have been pretty prominent recently, ranging from projects here in Instructables, to our local Silicon Chip magazine in Australia publishing a RFID door lock project in their November issue.  Even I recently purchased a RFID door lock on eBay for $15 to lock my garage (so my front neighbor could get tools if he wanted to).

We have known that the cheaper RFID technologies were pretty insecure for a number of years.  Researchers have demonstrated cloners of all varieties, but simple RFID tags are still being used for access control.  Even my current employer uses them.

A while ago, I was looking at Hack A Day, and I saw an amazing project that somebody had made.  It was an RFID card with a keypad on it.  For the next couple of days, I couldn't get the image of the card out of my mind;  the project reminded me of how much I wanted to build a RFID spoofer myself.  The original author didn't release source code for their project, but they left enough clues that I could follow. 

So, in typical fashion,  I built my own reader hardware so I could have a look at the data from a card, and created my own version of the Universal RFID key.

The key I made works beautifully both on my garage door, as well as a number of other RFID readers I have tried!

I have decided to publish this, as more people should be aware of the design flaws that are inherent in older RFID implementations, and to allow others to make their own universal key.

Will this key let you into anybodies RFID protected office?  Yes it will, assuming a couple of things are true

  1)  The have to be using 125kHz RFID tags that use the same encoding standard as I have designed this project for, and,
  2)  You have to have access to the number printed on the back of the tag - with that number, you can simply key it into the Universal RFID key, and it will emulate that tag.

So there you go - I hope you enjoy making this project.  - And remember, with great power comes great responsibility!
 
Remove these adsRemove these ads by Signing Up
 

Step 1How does RFID work?

How does RFID work?
RFID, or Radio Frequency IDentification is the term used to describe a wide variety of  standards that allow data stored within electronic 'tags' to be read by a reader without using wires.  There are a number of standards, encoding formats, and frequencies in common use.   I will describe the 125 kHz standard that is common for access control mechanisms.

125 kHz RFID tags are commonly encased in a business card sized piece of plastic, or a round disk.  The tag consists of a coil of wire, connected to a microchip.  When the tag is brought into close proximity to a reader, energy is coupled inductively from the reader to the microchip within the tag. 

The energy from the reader has dual use; firstly, it provides power to run the card, and secondly, it provides a communication medium for data to be transmitted.  Once powered up, the tag modulates the bit pattern that is programmed into the tag using a signal that the reader can detect.  The reader then reads this bit pattern, and passes it onto the door controller.  If the bit pattern matches one that is authorised, the door will be unlocked.  If the bit pattern does not match an authorised one, then the door won't unlock.

In the RFID system I was playing with, the bit pattern looked like this;

1111111110010111000000000000001111100010111110111101001111010000

I will describe what this pattern actually means in the next page.

One interesting feature of the data transfer between the card and the reader, is that data is encoded using Manchester Encoding, which is a way of encoding data so that it can be transmitted over a single wire ensuring that the clock information is able to be recovered easily.  With Manchester encoding, there is always a transition in the middle of a bit.  If you want to transmit a 1, the transition would be from low to high, and if you want to transmit a 0, the transition would from from high to low.  Because the transitions are in the middle of each bit, you can ensure that you have locked onto valid data.  For a detailed description, have a look a this page.

The actual data is transmitted by the card effectively shorting the coil out - this applies an additional load to the transmitter in the reader, which can be detected.
« Previous StepDownload PDFView All StepsNext Step »
100 comments
1-40 of 100next »
May 8, 2012. 10:19 PMljfa321 says:
Still acting weird :/
Sorry about so many question.
1) The two small circle labeled as vcc connect directly to the positive of the battery which is also the connection 1 on P1.

2) I got caps that have polarity or C3 and C5, C3's positive toward the vcc circle, and C5's positive toward connection 1 on P2.

Are both of them sound right?

Thanks!
May 9, 2012. 6:46 PMljfa321 says:
Oh and can you also tell me in each mode, which LED should be on to indicate the mode? Thanks
May 9, 2012. 7:13 PMljfa321 says:
so far my sequence look like this:

Power ON
Pin3 LED ON
Push Mode
>>Pin3 LED ON
Push Mode
Pin2 and Pin3 LED ON
Push Mode
Pin3 and Pin4 LED ON
Push Mode
Pin2, Pin3, and Pin4 LED ON
Push Mode
Pin2 and Pin3 LED ON
Push Mode
Back to >>



As you can see, Pin3 is always on, I'm guessing that is some to do with the fact that its TX pin.
Also for some reason, Pin2 LED only light up faintly, probably because I'm using a really bright LED so the Atmega don't have enough juice to power that?
(I'm using the same LED through out the board)
Last, Pin5 LED never light up :/
May 9, 2012. 12:59 AMljfa321 says:
Oops, I mean the positive after the Voltage regulator
May 8, 2012. 10:51 PMljfa321 says:
BTW, I'm using Atmega328 with UNO boot loader. Will that make a difference?
(I actually just upload the sketch to my UNO, unplug the atmega and use it directly)
May 7, 2012. 8:33 PMljfa321 says:
Question, shouldn't R6 be a 10k resistor instead of 100k one @@?
May 8, 2012. 9:01 AMljfa321 says:
(removed by author or community request)
May 7, 2012. 11:21 PMljfa321 says:
OK thanks, still trying to find out which part I did wrong since mine don't even blink a LED when powered, and only the receiving led stay on when attach to FDTI. So far all the wiring seem to be fine, so probably the bootloader is not in burned correctly...
Jan 30, 2012. 3:10 PMlis.tesla says:
what kind of arduino do you need
Jan 28, 2011. 7:22 PMdiwib says:
Do you know how would I turn this into a 13.56 Mhz card emulator?
Jan 8, 2012. 7:35 PMkwadwo00 says:
Have you heard anything on how to turn this into a 13.56 Mhz card emulator? i.e. Could you swap out the coil for a 13.56 Mhz antenna?
Jan 29, 2011. 3:03 AMdiwib says:
I've been using this one together with my arduino: http://www.seeedstudio.com/depot/1356mhz-rfid-module-iosiec-14443-type-a-p-196.html?cPath=144_153&zenid=a6f99b81ba387c32ea4416bf123ff325
It works like a charm. Of course it's not using an Atmega, but maybe the datasheets help you.
I'd love to help but I'm afraid I'm way too new to electronics.
Dec 31, 2011. 4:06 AMM0HIZ says:
Great reader, it's a really interesting idea. I like electronics myself, so I might try to build one of these.
Dec 21, 2011. 9:48 PMtechxpert says:
epic thing best rfid card ever!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Dec 21, 2011. 9:47 PMtechxpert says:
make it into a calculator with a case
Jul 18, 2011. 3:22 AMfjohn says:
did u make that rfid reader by urself?????without any rfid reciever or anything like other people use??? if so could u give me a schematic??? and insted of the pic can u tell me how to make it with an arduino??????
Dec 7, 2011. 2:23 AMfjohn says:
doesnt matter pls tell me how to build it
my email id : francisroan@gmail.com
Oct 8, 2011. 11:02 AMpaasselin says:
I'm having a lot of trouble with the antenna. How did you make it, from what, etc...
I've read the post 50 times and I can seam to grasp it. HOw did you connect the antenna to the board? Do you think it's possible to buy an antenna online ?
Thanks
Dec 5, 2011. 9:10 AMfrollard says:
The antenna is 100 winds of .25mm enameled copper wire. It will have 2 wires coming out when you're done, in and out...attach those to the 2 points on the circuit board.
Sep 12, 2011. 10:12 AMwouternet says:
Cool project.
We want to play a prank on our school next year after our finals.

Our teachers use a RFIDtag to gain access to the parking lot. Once you checked in at the gate, you NEED to check out again before you can get in again.

We want to make a brute force RFID spoofer, to check all the possible cards OUT, so they can't get in.
They'll all need to get out of their cars and check out first.

But to try all the codes,
You need 2^(44) = 1.73*10^13 combinations
Or am I wrong on this? Because that's a damn lot of numbers.....

It's more fun and cheaper than smashing the reader to pieces. :)
Oct 4, 2011. 4:23 AMmjordan1 says:
All you need is a "blocker tag". Simply, a RFID blocker tag simulates the full spectrum of possible tags (2^n possible serial numbers) simultaneously therefor concealing the presence of any legitimate tags near the field.
Oct 9, 2011. 2:34 AMwouternet says:
thanks!
Dec 5, 2011. 9:08 AMfrollard says:
while brutally illegal, if you made something like this, it would be trivial to make a card reader that read your teacher's card -- odds are they only have the id numbers about 1000+- the current card number.
Nov 21, 2011. 7:17 AMfjohn says:
that reader u buid it right so does it have any arduino chips?could u give every details and schematics and all the stuff iv been searching everywhere for it !!! here is my email id :francisroan@gmail.com
and is that a microcontroller there??? can a arduino be used instead if u got frm a website pls tell that too!!
thanks
Dec 5, 2011. 9:04 AMfrollard says:
that IS an arduino - they made a custom board for it.
Nov 21, 2011. 7:29 AMfjohn says:
so were is the code?
Oct 31, 2011. 7:06 PMkylerwinters says:
Could you please make a shopping list?
Thanks
Oct 9, 2011. 1:14 PMLaserman595 says:
:D
Oct 9, 2011. 2:12 AMamordashov says:
Hi! How much would be this card in case you want to sell one? Thank you!
sincerely, Artem
mordashov_artem@mail.ru
Oct 4, 2011. 7:24 AMmjordan1 says:
The crystal used is a 16 MHz or a 125 KHz crystal???

Thanks in advance,
Sep 2, 2011. 12:48 PMpaasselin says:
Great Project.
I'm starting to draw the diagram in EAGLE with mostly through hole components.
On your schematic, on the top left corner, there's a CONN_2 (P1). What is it ? What does it do? And is it necessary? Will share once done. Thank you.
Aug 14, 2011. 4:17 PMjobard says:
Can it be used as a writer too?
Jun 23, 2011. 10:23 AMMavamaarten says:
Awesome :D
You should make a reader built in the spoofer, so you just scan an RFID tag which it would then spoof. For example, you scan the tag which unlocks your garage door, then the microcontroller will remember that tag and spoof it.
May 20, 2011. 4:20 AMadam159 says:
The code at this link is very good fore reading your tag as HEX
http://www.arduino.cc/playground/Code/ID12
1-40 of 100next »

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!
362
Followers
11
Author:drj113
I have a background in digital electronics, and am very interested in computers. I love things that blink, and am in awe of the physics associated with making blue LEDs.