From Security Weekly Wiki
Revision as of 19:26, 12 July 2007 by Larry (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

RFIDIOt, Ubuntu Feisty Fawn and Cloning EN 4X05 RFID tags


First off we will need to install python, and some additional modules. We need Python 2.5, python-serial, python-psyco, python-imaging, python-pycrypt, and python-imaging-tk. If we want to be able to read passports at some point, we will also need to install OpenSSL. My install contained OpenSSL already, so this os more of a note for those looking to use this with a different distro.

Using Aptitude under Ubuntu, we need to perform the following:

sudo aptitude install python2.5 python2.5-dev python-serial python-psyco python-imaging python-pycrypt and python-imaging-tk

Once those are installed, we can successfully use RFIDIOt after configuring it.

Attaching the reader:

In this example I'm using the ACG RFID reader. As this reader implements the FTDI serial converter, Feisty Fawn already will recognize the device (with issues, so keep reading). On other distros, you may need to load the kernel module manually with:

modprobe ftdi_sio vendor=0x0403 product0xdd20

Under Feisty Fawn, I encountered some issues with utilizing the USB ACG reader. After careful inspection of dmesg output, I was able to determine that the UB reader was connected properly, and disconnected by another module. The module was brltty, which is used by Feisty Fawn to support braille terminals. In my case, a braille terminal isn't going to do me a lot of good. The best way I have found to resolve this issue, is to remove the braille terminal module support (and X11 braille terminal support) altogether. We can do this with the following command:

sudo aptitude remove brltty brltty-X11

It is important at this step to answer NO to the first question asked by aptitude about package dependency removal! You will note that by trying to remobe brltty-X11, aptitude attempts to remove ubuntu-desktop , which contains the X server! If we still want a GUI, this is a bad idea. If we answer yes to the SECOND question posed by aptitude we will be all set. We'll note that this question omits the removal of ubuntu-desktop.

Configuring RFIDIOt

In this example I'm using version 0.1p, although the configuration has been the same for as may revisions back as I have tried it. Forst off, we need to define a reader type, port and speed. We can do this by editing the RFIDIOtconfig.py file (with vi), located in our RFIDIOt directory. In this file, we need to make sure that these settings are true:

1.) In the serial port section, line="/dev/ttyUSB0" is uncommented, and all other directives are commented out. 2.) In the reader type section, readertype= RFIDIOt.refidiot.READER_ACG is uncommented, and all other directives are commented out. 3.) In the speed section, speed= 9600 is uncommented, and all other directives are commented out.

Once these configurations are complete, RFIDIOt is ready for use with our reader.

Cloning an EN 4X05 tag:

Adam has made this real easy to do! With our reader attached, in our RFIDIOt directory we will execute:

./unique.py CLONE

Unique will then wait for the source tag to be presented. When the source tag has been successfully read, it will wait for a writable tag to be presented. Don't worry if your source is read multiple times - the reader can tell that it is the same tag, and not writable. When presented with a writable tag that can emulate a unique tag (Q5 or HITAG), it will automaticaly write the source information!

Testing the clone:

Adam has also included another great python program for reading multiple successive tags called multiselect. we can execute it from the RFIDIOt directory with:


The software will then wait for tags to be presented and will keep reading until removed, where it will continue to wait. We can exit at any time with a CTRL-C. I've also found that this is a great way to pre-test the tags before cloning: I've found that the implantable tags (implanted or not) are finicky reading and writing, and work much better at certain angles and orientations.

Stories for Discussion

Other Stories of Interest