Little Code on Proxmark3
LittleCPM3 is an Electron desktop application focused on storing and retrieving text/code payloads inside MIFARE Classic 1K NFC cards using a Proxmark3 device.
This project is designed to:
- Store source code snippets, notes, or plain text on NFC cards.
- Read that content back in a structured and reliable way.
- Support content larger than one card by splitting data across multiple cards.
- Provide a practical GUI on top of Proxmark3 operations.
This is useful for offline demos, physical payload transfer, lab experiments, and NFC workflow prototyping.
The app has three layers:
- Renderer (UI): editor, hex preview, card info, chunk controls, logs.
- Electron main/preload bridge: safe IPC channel between UI and backend.
- PM3 backend utility: runs Proxmark3 CLI commands, parses results, reads/writes blocks.
Operational flow:
- User triggers Read/Write/Wipe from UI.
- Renderer calls
window.pm3.*APIs from preload. - Main process invokes backend PM3 operations.
- Backend executes Proxmark3 commands (
hf mf autopwn, dump/read/write flows). - Parsed results are returned to the UI.
- UI updates editor, metadata, storage bar, and logs.
LittleCPM3 writes a custom metadata header and payload blocks.
Block 0 : Manufacturer block (read-only, ignored)
Block 1 : PM3C metadata (16 bytes)
[0-3] magic "PM3C"
[4-7] payload size (uint32, big-endian)
[8] chunk index
[9] total chunks
[10-11] CRC-16
[12-15] reserved
Blocks 2+ : payload bytes (sector trailers are skipped)
For MIFARE Classic 1K, usable payload is:
- 45 data blocks × 16 bytes = 720 bytes per card
Assuming you already have a functional Proxmark3 setup, you still need:
- Node.js 21 or newer
- npm (bundled with Node.js)
- Proxmark3 CLI available in your
PATH(for exampleproxmark3in/usr/local/bin) - A connected Proxmark3 device with card read/write access
cd LittleCPM3
npm install
npm startOptional development command:
npm run dev- Connect Proxmark3 and place a single MIFARE Classic card on the antenna.
- Start the app with
npm start. - Click Read Card to load existing payload (or detect blank state).
- Edit content in the main editor.
- Click Write Card to persist the payload and metadata.
- Read again to verify round-trip consistency.
-
Read Card
- Reads PM3C metadata and payload.
- Detects blank/non-initialized PM3C cards.
- Updates UID, port, chunk info, storage usage.
-
Write Card
- Writes current editor content to the card.
- Validates payload size against 720-byte single-card limit.
- Stores metadata for chunked reconstruction.
-
Wipe Card
- Removes PM3C metadata markers used by this app.
- Resets app-side state and editor for a clean workflow.
-
Split Editor Content
- Splits payloads larger than 720 bytes into card-sized chunks.
- Loads first chunk automatically.
- Uses chunk index/total metadata to coordinate multi-card storage.
-
Hex View
- Displays current editor content as hex + ASCII representation.
-
Line Counter in Editor
- Shows dynamic line numbers similar to code editors.
- Stays synchronized while typing and scrolling.
-
Runtime/Log Feedback
- Real-time operation logs.
- Toast notifications for success/errors.
- Overlay and button lock while operations are running.
The app uses an autopwn-first strategy:
- Runs
hf mf autopwnto discover usable keys. - Reuses discovered keys for read/write operations when possible.
- Cleans generated artifacts (
.json,.bin) after operations.
This improves compatibility with cards that do not use default keys.
| Shortcut | Action |
|---|---|
Ctrl+D |
Read Card |
Ctrl+R |
Read Card |
Ctrl+S |
Write Card |
If your content is larger than 720 bytes:
- Paste full text/code into the editor.
- Click Split editor content.
- Write chunk 1 to card 1.
- Set next chunk index and write card 2.
- Repeat until all chunks are written.
When reading, metadata indicates chunk order and total chunk count.
- Keep only one card in the RF field to avoid tag collision.
- If authentication fails, retry with the card stable on antenna so autopwn can finish.
- Ensure your OS user has serial permissions for Proxmark3 (
/dev/ttyACM*on Linux). - If no payload is found, card may be blank for PM3C format.
- Focused on MIFARE Classic 1K workflows.
- Designed for text/code payload storage, not for general card cloning use cases.
- Very large payloads require manual multi-card handling.
© 2026 Lucas Gabriel (lucmsilva). Licensed under BSD-3-Clause.