SiRFIDaL - Simple RFID authentication for Linux

I feel this one, bit of a derail but I have a TCL TV in my bedroom. In their infinite wisdom they decided it should have a white standby LED that burns with the intensity of 1000 suns, and no option to turn it off.

To make it worse, it’s also where the IR receiver is, so can’t just put black gaff over it. Best solution to date has been multiple layers of red electrical tape…

I appreciate status lights, but come on guys, read the room!

I don’t mean to sound boring, but electrical tape is your friend :slight_smile:

EDIT:

Oh…

1 Like

If a really bright LED is enough of an annoyance to me I’ll pop the case open and either cut it out or modify it to be dimmer.

@anon3825968 Could SiRFIDal be able to do more than just uid matching? Perhaps some cryptographic key or something like the spark 2?

1 Like

It’s setup for UID-only by design: it’s meant to be usable with as many different readers / protocols as possible, at the cost of sticking to the lowest common denominator.

Adding crypto stuff would be possible, but it would be a bunch of work.

I definitely could, I just can’t be bothered clearing out a big enough spot on my workbench to pull the back off a 48” tv when red tape does a good enough job. If it was a smaller TV I would for sure

1 Like

Guys,

For information, I added support for networked readers that transmit UIDs through TCP, for the few ethernet-enabled readers out there (mostly industrial) and for things like this serial-to-wifi converter that let you use serial readers over TCP. Use this on your own secure LAN of course, as the UIDs are transmitted in clear-text.

1 Like

What about support for an ESP-RFID-Tool?

That’s a Wiegand datalogger. It captures UIDs from another reader and logs them for later retrieval by penenetration testers (or bad guys, depending on the use case). It’s not a reader.

I know what it is, but if it was supported then you could use any Weigand reader, by providing it with power and attaching an ESP-RFID-Tool. I actually use one with an unconnected HID reader as a test platform. I am assuming that you are not supporting Weigand natively, this would be an easy way to expand the supportable readers.

Well kind of. Among other things, SiRFIDaL supports any old reader that shows up as a character device or PTY in the system and outputs UIDs in LF-terminated text lines. So it’s more a hardware problem than a software support problem: if you manage to connect your Wiegand reader and it shows up in /dev, you’re good to go.

Typically, you want to do that with a Wiegand-to-serial converter. Or, you may have some board that reads Wiegand readers and makes the data immediately available through telnet, or with a HTTP server, or with a HTTP client that connects to a fixed server. SiRFIDaL supports all those schemes too.

But the key here is that it should get the UIDs in real-time. To my knowledge, the ESP-RFID just sits there and collects UIDs it sees on the Wiegand interface and stores them in memory, to be retrieved at a later date. That’s not what SiRFIDaL is for at all. Unless I’m mistaken and the ESP-RFID does have a mode to report UIDs in real-time that I’m not aware of, in which case, it might be supported depending on how it’s done.

I would have to check… I will dig mine out and let you know.

I’ve added support for the Halo Scanner to SiRFIDaL, thanks to the help of the manufacturer.

If you think this is cool and you like how they treat our little community, drop them a line next time you order a Halo Scanner.

Of course, video proof is needed :slight_smile: This is me locking / unlocking my session with my xBT:

Incidentally, I recently did a major code cleanup of SiRFIDaL. The new codebase is quite a bit more efficient if you have a lot of readers connected, and more importantly, the settings make a lot more sense.

Also, as a recap, here is the list of devices that SiRFIDaL now supports - quite a bit more than what it started with by now:

  • PC/SC readers (ACR122U and others)
  • Serial readers
  • Halo Scanner
  • HID readers (aka keyboard wedges, e.g. KBR1)
  • NFC-enabled Android devices (e.g. old cellphone you want to turn into a tabletop reader)
  • Proxmark3
  • Chameleon Mini / Tiny
  • Digital Logic uFR, uFR Nano, uFR Nano Online
  • Ethernet readers that push data to HTTP servers
  • Ethernet readers that serve up data as a TCP server
3 Likes

Hi Rosco, are you able to give any clues as to why my ubuntu setup isn’t working?
I’ve enabled my pm3 in the parameters section, and pointed the client part to the git folder (in my home directory)

However, when I run sirfidal_getuids.py and then interrupt with ^C I get the following msg;

Traceback (most recent call last):
File “/usr/local/bin/sirfidal_getuids.py”, line 99, in main
with scc.sirfidal_client() as sc:
File “/usr/local/bin/sirfidal_client_class.py”, line 47, in init
self.connect(socket_path = socket_path)
File “/usr/local/bin/sirfidal_client_class.py”, line 66, in connect
self._sock.connect(socket_path)
FileNotFoundError: [Errno 2] No such file or directory

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/usr/local/bin/sirfidal_getuids.py”, line 142, in
sys.exit(main())
File “/usr/local/bin/sirfidal_getuids.py”, line 136, in main
sleep(.2) # Wait a bit before reconnecting in case of error or timeout
KeyboardInterrupt

Also, if I run sudo sirfidal_useradm.py -a
it returns-
Error: [Errno 2] No such file or directory

This seems to indicate the socket file isn’t found, meaning the server isn’t running. Did you start sirfidal_server.py?

You can open another console and start it manually to check that it works, or permanently start it as a service if you followed the installation instructions in the README using systemctl enable sirfidal_server then systemctl start sirfidal_server

Also, the server needs to run as root, in case it wasn’t obvious.

(And yes, I realize at some point I really should package it properly :slight_smile:)

I didn’t manually try and start it before, because I had started and enabled via systemctl as per the README.

After running sirfidal_server.py as root just to test now, I get:

Traceback (most recent call last):
File “/usr/local/bin/sirfidal_server.py”, line 301, in
from setproctitle import setproctitle
ModuleNotFoundError: No module named ‘setproctitle’

I followed the readme, regarding config files and pam, but omitted the steps for Sound, Android, uFR

Okay that’s something I failed to add in the readme. Try this as root:

apt-get install python3-setproctitle

Bingo!, and I can now see the fake proxmrk3.log file and the socket connection in my /tmp directory.

Next point, if I try to …_useradm or …_getuid there is no reading happening, and the DT RFID-diagnostic card confims the proxmark isnt even trying

That would seem to indicate the Proxmark3 listener in the server has some kind of problem. Try running the server manually in the console (as root) with the -d parameter. It’ll dump runtime error messages on the console. That should tell you what’s wrong with it.

You should see the PM3’s lights flashing quite a lot if the listener is talking to it.

yes, listner has a problem alright… It DIED! :slight_smile:

sudo sirfidal_server.py -d
[server] Started
[proxmark3_listener] [proxmark3_#1] Started
[proxmark3_listener_sigchld_handler] [proxmark3_#1] Proxmark3 client died
[proxmark3_listener] [proxmark3_#1] [Errno 13] Permission denied: ‘/usr/local/bin/proxmark3

permissions for that folder are: drwxr-xr-x 22 root root 4096 Nov 22 17:11 proxmark3
and within that folder point of interest is
-rwxr-xr-x 1 root root 17037 Nov 22 17:11 pm3

Ah ok I see the issue.

The client parameter in the server should point to the executable, not the directory it runs in. Mine installed the binary in /usr/local/bin, while yours made a /usr/local/bin/proxmark3 directory and there’s a pm3 binary inside it. Or so it seems.

So the parameter in the server should be /usr/local/bin/proxmark3/pm3 in your install.

One way to find out exactly where the executable is located is to run which pm3 (if your PM3 client binary is called “pm3” of course, which seems to be the case on your machine).