skip to main content
hacking.communityplay in the sandbox.
ctf arena
hard/misc500 pts

KeeLoq Rolling Code Intercept

0 solves

We intercepted two consecutive KeeLoq transmissions from a vehicle's key fob operating at 433.92 MHz. The manufacturer uses a 64-bit fixed serial and a standard KeeLoq cipher with manufacturer key 0x5C0F7B9A2E6D8341.

First transmission (hex): E8 4A 7B 9C 2D 1F 6E 8A 3C 5D Second transmission (hex): E8 4A 7B 9C F1 A3 82 6D 4B 7E

KeeLoq frame structure: [Serial:32bit][Encrypted:32bit][CRC:16bit]

The encrypted portion contains: [Counter:16bit][Button:4bit][Battery:1bit][Reserved:11bit]

Both transmissions used button code 0x2 (UNLOCK). The counter increments by 1 each press. We need the next valid code to replay.

Your task: Extract the counter from the second transmission, increment it, forge the third transmission for button 0x8 (TRUNK), and provide the 10-byte hex string (no spaces) that would successfully authenticate. The serial remains constant, battery bit stays 0, reserved bits stay 0x000.

Note: KeeLoq decryption requires 528 rounds of the block cipher. The manufacturer key decrypts the 32-bit payload to reveal the plaintext counter and button data. For this challenge, after decryption the second transmission reveals counter=0x04B7, button=0x2, battery=0, reserved=0x000. You must encrypt counter=0x04B8, button=0x8, battery=0, reserved=0x000 with the same key, then compute CRC-16-CCITT over serial+encrypted bytes.

// no hints provided for this challenge
// reward at submit: 500 pts · paste the flag exactly as found
// install app

Install hacking.community for fast access, offline reading, and push notifications. No app store needed.