Module 0 · Lesson 0.1

A badge number is just a number

Why a copied badge number can open the same door.

  • 3-minute video
  • 6-minute read
  • No background needed

Hold an ordinary access badge up to a reader, and the door clicks open. It feels as if the badge proved something. In many buildings, all it did was say a number.

What's on a proximity card

Many buildings still use 125 kHz proximity cards, often called Prox cards. Inside is a coil antenna and a tiny chip, with no battery. When the card comes near a reader, the reader's radio field powers the chip, and the chip sends the number stored in it. It sends the same number every time, to any reader that asks.

The number usually follows a widely published layout. In the common 26-bit format, 8 bits hold a facility code, which is often shared by every card at a site, and 16 bits hold the card number. Two parity bits help detect read errors.

The 26-bit credential data A row of 26 bits. The first bit is a parity bit, the next 8 bits are the facility code, 42, the next 16 bits are the card number, 12345, and the last bit is another parity bit. The badge presents this same data every time it is read. The 26-bit credential data 10010101000110000001110011 Facility code: 42 8 bits, often the same for a whole site Card number: 12345 16 bits, different for each card parity parity Nothing here is secret: any compatible reader in range can read the same data.
The common 26-bit format. Parity can detect some transmission errors. It cannot authenticate a badge.

The reader passes that number to the access control system, which looks it up. If the number belongs to an enrolled card that's allowed through this door at this time, the door opens. Nothing in that exchange is secret.

How a card gets copied

Because the card answers any reader, anyone with a reader can learn its number: a handheld reader, a reader hidden in a bag, or a purpose-built long-range reader that works from farther away than a door reader does. A badge on a lanyard, in a line or in an elevator, is enough.

The number is then written onto a rewritable blank card or key fob, or played back by a device that imitates a card. Inexpensive handheld copiers that do this in seconds are sold openly.

To the reader, the copy and the original are identical: same number, same response. The system can't tell them apart, because there's nothing to tell apart.

Try it: copy a badge

Your browser plays a copier and a door. The badge uses the common 26-bit format. Read it, write the number to a blank, then present each card at the door. Nothing is sent or stored.

Original badge (enrolled to J. Rivera)

Facility code 42 · Card number 12345

What the copier received

Nothing yet.

Blank card

Empty.

Doesn't a "smart" card fix this?

It depends on whether the system actually uses the card's secret. Many 13.56 MHz cards contain cryptography. MIFARE Classic, introduced in 1994 and still widely deployed, protects its memory with 48-bit keys and a proprietary cipher called Crypto-1. A system can use such a card in two very different ways:

  • Reading only the serial number. Many installations ignore the protected memory and read only the card's serial number, called the UID. Cards configured to present a fixed UID send it without protection, so this is just another number, and special blanks allow a UID to be written onto a copy.
  • Reading protected data. Here the security rests on Crypto-1. In 2007 and 2008, researchers reverse-engineered it and showed that it's weak. The first published key-recovery attacks used communication between the card and a genuine reader; later research found attacks against the card alone. Later "hardened" versions of the chip resisted some of those attacks, and further research found new ones against them. Once an attacker recovers the keys, the protected data can be read and copied.

The point isn't that one product is bad. A card can only be trusted as far as the secret behind it. If there's no secret, or the secret can be recovered, the card can be copied.

Why this matters for the rest of the course

A number is an identifier: it tells the system which record to look up. Anyone who can read it can repeat it. Proof needs something else: a secret the card can use without ever revealing it. The next lesson draws that line between reading a card and proving it, and Module 1 shows the cryptography that makes the proof possible.

Go deeperOptional technical detail for readers who want more

The wire behind the reader

Many readers pass the number to the controller over a Wiegand interface, a simple one-way wire protocol with no encryption. A small device spliced into those wires can record every number that passes, and some can play one back. Module 5 covers OSDP, the newer reader protocol, and its Secure Channel, which encrypts and authenticates that link.

Why the facility code doesn't help

The facility code is meant to stop a card from one site working at another site that happens to use the same card numbers. It isn't a secret: it's sent in every read, along with the card number, and copied with it.

Read range

A door reader typically reads a proximity card from a few centimeters away. Read range depends on both the reader and the credential: the same reader can have different ranges with a full-size card and a key fob, and a larger, more powerful reader can read a given card from farther away than a door reader does. That's what makes covert copying practical.

Other cards and formats

Many card formats exist beyond 26 bits, some with longer card numbers. A longer number makes guessing harder but doesn't stop copying: the number is still sent without any proof behind it. The same holds for any system that reads only a fixed value, whether it's a card number, a UID or a static identifier stored on a smart card.

Sources

Draft lesson, awaiting technical review · Last updated 21 November 2026

Search

Press / to search from any page