RFID and NFC
RFID and NFC are the technologies of access cards, hotel keys, transit passes, contactless cards, and inventory tags. Many implementations use old, weak technology (like MIFARE Classic) with broken or no encryption, which allows reading, cloning, and sometimes modifying cards with cheap hardware. It’s a pillar of physical red teaming: cloning an access card opens doors, literally.
Only against your own cards or a physical red team engagement with written authorization. Cloning someone else’s credentials without permission is illegal.
Threat model
Section titled “Threat model”The attacker needs proximity to the card (seconds of close contact, or long-range readers / covert reading from a bag). LF cards are usually just a fixed unencrypted ID: cloning is trivial. In HF, MIFARE Classic uses Crypto1, which is broken, and the whole card is dumped. The most serious design flaw is trusting the logic or values (balance, access level) to the card itself instead of validating them in a backend: that turns a clone into a master key or free money.
Theory: RFID vs NFC and frequencies
Section titled “Theory: RFID vs NFC and frequencies”- LF (125 kHz): low-frequency RFID, old proximity cards (EM410x, HID Prox). Often unencrypted, just a clonable ID.
- HF (13.56 MHz): high-frequency RFID/NFC (MIFARE Classic/DESFire, phone NFC). From broken (MIFARE Classic) to robust (DESFire EV2/EV3).
flowchart TD
A[Bring reader near the card] --> B{Frequency}
B -->|LF 125 kHz| C[Read EM410x/HID ID -> write to T5577]
B -->|HF 13.56 MHz| D{Type}
D -->|MIFARE Classic| E[Recover Crypto1 keys -> full dump]
D -->|DESFire| F[Try default keys]
C --> G[Working clone / emulation]
E --> G
E --> H[Modify data if validated on the card]
Red Team: hardware
Section titled “Red Team: hardware”- Proxmark3 (Iceman/RRG fw): the RFID swiss-army knife (LF+HF): read, clone, crack, emulate.
- Flipper Zero: convenient for basic LF/HF, clone simple cards, emulate.
- ACR122U: cheap USB NFC reader (HF).
- Blank cards: T5577 for LF, “magic” cards (writable UID) for HF.
Red Team: LF (125 kHz) — trivial cloning
Section titled “Red Team: LF (125 kHz) — trivial cloning”Many LF cards only transmit a fixed unencrypted ID → cloning = read the ID and write it to a blank card:
# Proxmark3 (Iceman firmware)lf search # identify the card typelf em 410x reader # read the ID (EM410x)lf em 410x clone --id 1A2B3C4D5E # clone to a T5577# Flipper Zero: Read -> Save -> Emulate/WriteRed Team: HF (13.56 MHz) — MIFARE Classic (broken)
Section titled “Red Team: HF (13.56 MHz) — MIFARE Classic (broken)”MIFARE Classic uses Crypto1, broken years ago. Keys are recovered and the card is dumped/cloned:
# key recovery (PN532/ACR122U reader)mfoc -O dump.mfd # nested attack (needs at least one known key)mfcuk -C -R 0:A -s 250 -S 250 # darkside attack (no prior key)# Proxmark3hf mf autopwn # recover keys + dump the cardhf mf dump # dump all sectors to a filehf mf restore # clone to a "magic" card (writable UID)With the keys you read all the content, clone it, and sometimes modify it (balance, permissions) if the logic trusts the card.
Red Team: attacks and scenarios
Section titled “Red Team: attacks and scenarios”- Cloning for physical access: read an employee’s card up close and clone it to a T5577 / magic card.
- Emulation: the Proxmark/Flipper poses as the card to the reader.
- Data modification: transit/cafeteria balance or access level, if validated on the card.
- Default keys: DESFire and others misconfigured with factory keys.
- Phone NFC: contactless payment read/relay, malicious tags (URLs/exploits).
Blue Team
Section titled “Blue Team”- Don’t use MIFARE Classic or unencrypted LF for access control; migrate to DESFire EV2/EV3 or technology with strong encryption and mutual authentication.
- Don’t store sensitive logic/values on the card; always validate against a backend (the card is an identifier, not the source of truth).
- Unique keys per installation (no default keys), rotation, and per-card diversification.
- Protect against remote reading (shielded sleeves) and against cloning (mutual authentication, signed data).
- Correlate access: the same card in two places at once = clone.
Checklist
Section titled “Checklist”- Identify the frequency/technology (
lf search/hf search) - LF: read and clone the ID (EM410x/HID) to a T5577
- HF MIFARE Classic: recover keys (
mfoc/hf mf autopwn) and dump - Clone to a “magic” card (writable UID)
- Sensitive data on the card? Modifiable? (balance/access)
- DESFire/others: default keys?
- Emulation with Proxmark/Flipper for physical access
- Blue: strong encryption, backend validation, unique keys?