clemsonMakerspace / CATS

Clemson (Machinery) Access Tracking System
GNU General Public License v3.0
4 stars 9 forks source link

Get Cheaper Scanner to Work #66

Closed r3cebarnett closed 7 years ago

r3cebarnett commented 7 years ago

HID OMNIKEY 5421. Will update with more info as I get it.

ophilli commented 7 years ago
r3cebarnett commented 7 years ago

Hot reads right now, if we can decompile and interpret a certain dll we can pull the info straight from there. Trying to find more info on which dll and testing with a decompiler to accurately get info.

ophilli commented 7 years ago

Skip to Appendix A - looks like that might be the most relevant part for us.

ophilli commented 7 years ago

Appendix A of the Contactless Developer Guide.

r3cebarnett commented 7 years ago

I'm not even looking at the dev guide aorn, I'm setting up stuff on my laptop to test things. Notable little quirk I found, when the card is inserted all the way it seems to freeze to scan for the smart chip whereas it doesn't take any time contactless. There's some sort of switch in it.

r3cebarnett commented 7 years ago

A.7.1 is looking like the thing to really look at. APDU is a buzz word we might want to learn about.

r3cebarnett commented 7 years ago

Gonna stop and play a game because I'm a kid in college and want a life but, I have some stuff that I found around StackOverflow.

http://stackoverflow.com/questions/4497671/contact-less-card-through-an-omnikey-how-to-get-uid?rq=1

This above approach uses C#. From what I understand C# is Windows only, at least in this situation described in the StackOverflow post. Perhaps we could use the methods discussed in there to help us.

Notable info: The protocol is ISO 15693. Apparently this matters with how you approach it. I haven't specifically found a Python thing but there are definitely people out there that have done it in different programs. We can still get it from a dll apparently but I haven't been able to find a program that will decompile winscard.dll which is apparently our cash cow.

Notable dll's to worry about: cxru0x64.sys scarddlg.dll scardsvr.dll winscard.dll

When testing for UID and ATR (for those out of the loop, the UID is "Unique ID" and ATR is "Action-to-Reset" which is basically parameters on how the card reacts to the reader), make sure you use HID OMNIKEY Workbench because the UI is nice and easy. Drivers are on http://hidglobal.com/drivers/ .

Important: The ATR is NOT unique. They are expected to be the same if the type of the card is same. My ATR = Your ATR != USC's ATR. This can be used for preemptive authentication, kind of like we already have in main.py line 65, if we stick with this new reader.

I'm going to go ahead and assign Brice and Thor to this project because I know that they have specific interest in this. Sorry that I kinda rambled.

mbgroom commented 7 years ago

Called HID asking for assistance and their response was rather irritating. They told us we would need to either pay for licensing or use a licensed secure host to access the "weigand data".

Maurice believes that if we were to use an Omnikey 5321 then the software that we previously found will work. We have discussed this and I understand why the 5321 may work when the 5421 does not. We are ready to order a 5321 to test with. Until then, this issue is on hold.

r3cebarnett commented 7 years ago

I talked to Owen about it and made a pretty good case for purchasing the 5321 and even implementing it until we get into the finalization process. He said he would like to think about it and see if it's worth it or not. He asked me to put some libraries that I found here though so he can play around.

librfid, openct, pyscard, smartcard, nfcutils, RFIDIOt are some.

mbgroom commented 7 years ago

There is a used 5321 for sale that we can try out for a negligible cost. Here's the link: http://www.ebay.com/itm/HID-Fargo-Omnikey-5321-USB-Smartcard-Reader-/272512464833?_trksid=p2385738.m2548.l4275

mbgroom commented 7 years ago

And a link for a lot of 10 of them: http://www.ebay.com/itm/Lot-of-10-HID-Omnikey-5321-Smart-Card-Reader-/222227863587?_trksid=p2385738.m2548.l4275

r3cebarnett commented 7 years ago

Waiting for funding :)

r3cebarnett commented 7 years ago

Once #122 goes through I'll get to playing around with libraries again.

ophilli commented 7 years ago

@r3cebarnett @mbgroom Please update.

ophilli commented 7 years ago

Closing due to being outside scope of project.