Research, development and trades concerning the powerful Proxmark3 device.
Remember; sharing is caring. Bring something back to the community.
"Learn the tools of the trade the hard way." +Fravia
You are not logged in.
Time changes and with it the technology
Proxmark3 @ discord
Users of this forum, please be aware that information stored on this site is not private.
Pages: 1
I stumbled upon this little blogpost and github repo. Since I don't know much about iclass I'll need to ask if this is possible?
Blog https://blog.kchung.co/reverse-engineer … ster-keys/
repo: https://github.com/ColdHeat/iclass
Offline
Yes, you simply use the package iclassified, and you need an omnikey5321.
I did this a few years ago, basically the keys are hidden in ROM under write/execute memory protection - so you can't extract the keys. However, you simply call which key you want to use ( there are a few default ones, including mifare) and your away.
I was talking to Fran at Defcon, after he was presenting his talk; in his talk he kept talking about paying chinese hackers for the keys. Brad and I pointed out that it wasn't necessary and all he needed was the omnikey and the iclassified package - its enough with programming skills to write your own program. Think this is common knowledge now, Ive come across a number of physical-pentesters who can clone iClass keys, you ask them if they know the keys and the answer is "no", they use the omnikey with this / similar software.
Offline
Looking at the source, I don't see how you tell the reader to use a certain key.
Offline
Looking at the source, I don't see how you tell the reader to use a certain key.
iclass/iclass.c
lines 226 -- basically means authenticate with key x21
odd though, I used keys 0x20 (kd) & 0x23 (kc)
Offline
bizarr that you can send a apdu which tells the reader to authenticate with a builtin key.
Offline
I have a few of these readers, so are there multiple keys? I tried it with an iClass Tag and it worked perfectly, going to buy a blank and dump the blocks back one by one.
Is the ROM on the same IC? I could prob use a logic analyser and pull the keys being requested from ROM/NV Data
Offline
Yeah the ROM is protected so you only get zeros back, and the one you sniff from the wires is usually the ones unique to that particular card (the diversified key)
Offline
I wrote the blog post, hope you liked it.
A few things are that this definitely wasn't common knowledge when I was working on iClass and most people just buy the iClass Cloner from xfpga. The blog post illustrates how you can extract the master key from the xfpga software if you have the USB dongle it comes with or have a recording of it unpacking itself.
It's very difficult to get the vulnerable readers needed to do the Heart of Darkness method these days so the xfpga software is really the simplest choice for testers.
There are multiple keys as illustrated in the Omnikey documentation https://www.hidglobal.com/sites/default … ide_en.pdf
I'm not exactly sure what key 0x20 and 0x23 do specifically but 0x21 is apparently the HID master key stored on the reader.
The real trick is the second secure mode initialization, not simply using the key. For some reason, this causes the reader to glitch and perform authorized actions using the key.
Last edited by kchung (2016-10-21 06:27:05)
Offline
Yes! I saw your post, great, great stuff, I'm still kind of hazy on what the master key does? Like I was able to extract all data from an iClass card (Using iclassified & an Omnikey 5321), however apparently you need the HID Masterkey to decrypt block 6 or 7 that contains the site code and card number?
So if you wanted to say, increment your card number, you'd need the HID Master Key to decrypt block 6 or 7, increment, encrypt, then write back to the card?
Why do we need the Master Key when we can just flip the card into Secure Mode? What's the point of the Master Key being on there?
Another question is once you have the Master Key, how can you plug it into a Proxmark3? I'm thinking of obtaining the software from xpga and dumping it out like in your blog.
Brings me to yet another question, configuration cards, by the sounds of things these cards require you to switch off the reader, hold the card to the reader and power it on, is this the case? Or can I create a reset card and just walk up to any HID Reader?
Last edited by dylanger (2016-10-21 06:38:15)
Offline
Kchung
you working the old iclass or the elite iclass ?
I am very interested in your research.
Offline
I did all of my research on the old iClass system as that is what I used in my day to day life as a college student. The iClass elite system is much different and you're not really going to be able to get away with using a hardcoded static key in an off the shelf reader but there's enough research out there to figure it out.
I personally have never encountered an iClass elite system so it's not particularly interesting for me but I have done some cursory googling on it.
dylanger:
The master key grants you read/write access to a standard iClass card. Basically, you need the master key in order to write data to blocks 6-9 on an iClass card. Block 7 is usually the only portion you need to write to clone a card though.
If you have the key it basically just becomes read and write operations on blocks on the card. The card system has encryption schemes are various levels (which others have discussed in far greater detail than I could).
You don't need the master key to go into secure mode. Secure mode simply encrypts the communications between the card and the reader. The xfpga software for example doesn't utilize secure mode what so ever, but still allows you to read and clone iClass cards.
Some of the hf iclass commands require you to pass the key in as a parameter which is how you load the key in:
https://github.com/Proxmark/proxmark3/wiki/commands#hf-iclass
Yup, I thought that was the case too but I asked some other members of this forum and apparently that can't be done. For a configuration card to work you must present it to the reader soon after it powers on.
Offline
I did all of my research on the old iClass system as that is what I used in my day to day life as a college student. The iClass elite system is much different and you're not really going to be able to get away with using a hardcoded static key in an off the shelf reader but there's enough research out there to figure it out.
I personally have never encountered an iClass elite system so it's not particularly interesting for me but I have done some cursory googling on it.
dylanger:
The master key grants you read/write access to a standard iClass card. Basically, you need the master key in order to write data to blocks 6-9 on an iClass card. Block 7 is usually the only portion you need to write to clone a card though.If you have the key it basically just becomes read and write operations on blocks on the card. The card system has encryption schemes are various levels (which others have discussed in far greater detail than I could).
You don't need the master key to go into secure mode. Secure mode simply encrypts the communications between the card and the reader. The xfpga software for example doesn't utilize secure mode what so ever, but still allows you to read and clone iClass cards.
Some of the hf iclass commands require you to pass the key in as a parameter which is how you load the key in:
https://github.com/Proxmark/proxmark3/wiki/commands#hf-iclassYup, I thought that was the case too but I asked some other members of this forum and apparently that can't be done. For a configuration card to work you must present it to the reader soon after it powers on.
What do you mean by present it to the reader soon after it powers on ?
Well if you need some members to ask questions about, you probably have to talk to holiman about it.
Offline
This is the fastest resource I found online about using a configuration card. The readers are not constantly watching for configuration cards.
https://www.honeywellintegrated.com/documents/Technical%20update%20-%20Smart%20Config%20Cards.pdf
Offline
Cheers @kchung your response is much appreciated!
Offline
Pages: 1