Skip to content

Instantly share code, notes, and snippets.

@kitsunehunter
Last active November 5, 2024 00:36
Show Gist options
  • Save kitsunehunter/c75294bdbd0533eca298d122c39fb1bd to your computer and use it in GitHub Desktop.
Save kitsunehunter/c75294bdbd0533eca298d122c39fb1bd to your computer and use it in GitHub Desktop.
HID Secure Identity Object downgrade guide

Before we begin:

HID iCLASS Credentials tech primer

What does all this shit on my card mean?!

Key Terms:

  • SIO - Secure Identity Object

  • PACS - Physical Access Control System

  • Encoding - Writing binary data to a credential

  • Logical copy - Not a 1:1 copy as we can only read the binary data off the SIO and encode it as a legacy format but should work regardless

  • Omnikey - Official HID desktop reader to read PACS binary off iCLASS SE and SEOS

  • Weaponized reader - "DIY" omnikey reader to perform the same job as the omnikey using a actual HID reader you might find on a wall

  • NARD & SAM - Optional add-on for Flipper to read iCLASS SE and SEOS and perform downgrade attacks

  • PM3 - Proxmark 3

  • F0 - Flipper Zero

  • SAM - Ur fuckin uncle HID Secure Access Module for decoding PACS data on a SIO

Your iCLASS SE or SEOS credential has a SIO (Secure Identity Object) that stores your access control information also known as the PACS data. We will need to extract the SIO which contains the PACS data with one of the methods outlined below and encode that data onto a iCLASS legacy credential.

Unfortantely not all readers will have iCLASS legacy enabled and your downgrade will not function. The good thing is that most readers are left in their default configuration with iCLASS legacy enabled which allows us to easily take your secure credential and make a logical copy onto a less secure format. We can easily test if the reader is standard keyed and will accept a credential downgrade attack with the steps below.

If the reader beeps, proceed to encoding a downgraded iCLASS legacy credential.

To check if your credential is standard keyed:

PM3 hf iclass dump --ki 0 if it dumps == standard key

F0 Picopass app > Read card check if key == standard

To encode a standard keyed iCLASS legacy credential to test:

PM3 hf iclass encode --bin 110000000000000001000101000000100001111001011000 --ki 0 encodes iclass_dump.json to card

F0 qflipper > SD card > apps data > picopass drop .picopass file here and write to card on Flipper

Hold the device to the reader. If it beeps, proceed to encoding a downgraded iCLASS legacy credential.

PM3 hf iclass eload -f iclass_dump.json

PM3 hf iclass sim -t 3

F0 qflipper > SD card > apps data > picopass drop .picopass simulation file here and simulate on Flipper

A Android phone with NFC is recommended for this next step as iPhone can only inspect readers that are bluetooth enabled natively or have a BLE backpack installed as a add-on. This method of inspection will not work if the reader has a MOB key or ELITE key. Reader inspection is only possible on official HID readers, not third party readers using HID credentials.

Click use NFC and hold the phone to the reader and follow the prompts. Click on apply template.

Reader Manager Home Screen

Click on the plus button

Templates

Click on credentials

creds

Make sure the switch for iCLASS is switched on (blue)

Screenshot 2023-11-14 221005

If you have successfully confirmed that iCLASS legacy is switched on. You can proceed to the next step which is encoding a downgraded iCLASS legacy credential.

  1. Download latest version of Omnikey workbench here
  2. Plug in Omnikey reader
  3. Start Omnikey workbench
  4. Switch reader mode to CCID mode
  5. Go to reader upload tab
  6. Use the "load file" function and load the encoder.cfg config file
  7. Launch PM3 client, place iCLASS/Picopass card on HF antenna and read your original card on the Omnikey reader
  8. Press enter
  1. Launch Seader application

if credential == iCLASS use read picopass

if credential == SEOS use read 14443A

  1. Place credential on flipper and read
  2. Save as picopass
  3. Go to picopass app and write your downgraded iCLASS credential to a iCLASS card

To begin, you will need the following bill of materials:

  • Any standard keyed iClass SE reader
  • ESP-RFID-TOOL
  • Some 20-24 AWG wire or ethernet cable
  • Your preferred power source (5-9v)
  1. Connect the Data 0, Data 1, Ground, Power to the respective terminals on the ESP-RFID-TOOL
  2. Provide 5-9V power to the reader and ESP-RFID-TOOL at the same time using your preferred power source

IT IS ABSOLUTELY NECESSARY THAT THE READER AND ESP RFID TOOL SHARE THE SAME GROUND EVEN IF YOU ARE POWERING ESP-RFID-TOOL AND READER SEPERATELY

  1. Connect to the wifi network ESP-RFID-TOOL and navigate to 192.168.1.1 for the interface
  2. Scan your credential on the reader
  3. open log.txt and copy the binary string WITHOUT the preamble
  4. Use the above instructions and encode the binary wiegand data to a iClass card using PM3

You can check if the LF field is active by using one of these methods:

  • Hold a RF field detector at the reader and see if the red light flashes
  • Use the Flipper RFID detector app apps > tools > RFID detector and make sure RFID symbol is active
  • Use reader manager and inspect the reader and check if 125khz prox is enabled at the bottom of the credentials page
  • Apply SEOSauce® directly to the reader and see if it boils immediatly
  1. Copy the raw PACS binary from your Omnikey output
  2. PM3 wiegand decode --bin <raw PACS binary>

Below is example syntax, you will use your specific card information gathered in the previous step.

  1. PM3 lf hid clone -w c1k48s --fc 69 --cn 69420
  2. PM3 lf hid reader to verify output
  1. After reading your credential with Seader in the instructions above, select the save RFID option
  2. Use the 125kHz RFID app and write the data to a T5577
{
"Created": "proxmark3",
"FileType": "iclass",
"Card": {
"CSN": "6DC25B15FEFF12E0",
"Configuration": "12FFFFFF7F1FFF3C",
"Epurse": "FFFFFFFF05FEFFFF",
"Kd": "B2453554FC7F4148",
"Kc": "FFFFFFFFFFFFFFFF",
"AIA": "FFFFFFFFFFFFFFFF"
},
"blocks": {
"0": "6DC25B15FEFF12E0",
"1": "12FFFFFF7F1FFF3C",
"2": "FFFFFFFF05FEFFFF",
"3": "B2453554FC7F4148",
"4": "FFFFFFFFFFFFFFFF",
"5": "FFFFFFFFFFFFFFFF",
"6": "030303030003E017",
"7": "783602A2283010E8",
"8": "2AD4C8211F996871",
"9": "2AD4C8211F996871",
"10": "FFFFFFFFFFFFFFFF",
"11": "FFFFFFFFFFFFFFFF",
"12": "FFFFFFFFFFFFFFFF",
"13": "FFFFFFFFFFFFFFFF",
"14": "FFFFFFFFFFFFFFFF",
"15": "FFFFFFFFFFFFFFFF",
"16": "FFFFFFFFFFFFFFFF",
"17": "FFFFFFFFFFFFFFFF",
"18": "FFFFFFFFFFFFFFFF"
}
}
Filetype: Flipper Picopass device
Version: 1
Credential: 00 00 C0 00 45 02 1E 58
# Picopass blocks
Block 0: 6D C2 5B 15 FE FF 12 E0
Block 1: 12 FF FF FF 7F 1F FF 3C
Block 2: FF FF FF FF 05 FE FF FF
Block 3: B2 45 35 54 FC 7F 41 48
Block 4: FF FF FF FF FF FF FF FF
Block 5: FF FF FF FF FF FF FF FF
Block 6: 03 03 03 03 00 03 E0 17
Block 7: 78 36 02 A2 28 30 10 E8
Block 8: 2A D4 C8 21 1F 99 68 71
Block 9: 2A D4 C8 21 1F 99 68 71
Block 10: FF FF FF FF FF FF FF FF
Block 11: FF FF FF FF FF FF FF FF
Block 12: FF FF FF FF FF FF FF FF
Block 13: FF FF FF FF FF FF FF FF
Block 14: FF FF FF FF FF FF FF FF
Block 15: FF FF FF FF FF FF FF FF
Block 16: FF FF FF FF FF FF FF FF
Block 17: FF FF FF FF FF FF FF FF
@mmande34
Copy link

Testing out readers to see if a standard user (random person with the HID Reader Manager app) can enable legacy mode. For me it is grayed out and says only an admin or HID can enable legacy modes. Is there a way to reset the reader or force enable the legacy mode? Thank you!

@CountParadox
Copy link

Testing out readers to see if a standard user (random person with the HID Reader Manager app) can enable legacy mode. For me it is grayed out and says only an admin or HID can enable legacy modes. Is there a way to reset the reader or force enable the legacy mode? Thank you!

Ive seen this on Signo readers but not on iClass ones, you may need to reboot the reader (remove from wall; remove vcc cable (red) and reconnect)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment