368 Commits

Author SHA1 Message Date
matteoscrugli 1e78976bd9 feat(lf): shift IDTECK command IDs to avoid collision with Jablotron PR #404
LupusE requested in the PR #407 review (2026-05-13) to move IDTECK
command IDs since PR #404 (Jablotron) also uses 3017 / 5010 / 5011.
Both PRs are open with the feature-freeze label; Jablotron retains
the original slots and IDTECK shifts up:

  DATA_CMD_IDTECK_WRITE_TO_T55XX: 3017 -> 3018
  DATA_CMD_IDTECK_SET_EMU_ID:     5010 -> 5012
  DATA_CMD_IDTECK_GET_EMU_ID:     5011 -> 5013

Files changed:
- firmware/application/src/data_cmd.h
- software/script/chameleon_enum.py

app_cmd.c references the constants by name only, no edit needed there.
2026-05-15 10:09:51 +02:00
matteoscrugli 729a7e56ea feat(cli): add lf idteck subgroup and extend lf clone with idteck type
Adds host-side CLI support for IDTECK:
- lf idteck econfig -s <slot> [--id <hex>]   set or read the emulated frame
- lf idteck write --id <hex>                 clone to a T55xx tag in reader mode
- lf clone -t idteck --id <hex>              same via the unified clone command
- hw slot list                                now renders Frame and Card ID
                                              for IDTECK slots

Input accepts 16 hex characters for the full 64-bit frame, or 8 hex
for the 32-bit payload (the fixed preamble 4944544B is auto-prepended).
A non-blocking informational note is emitted when the payload checksum
does not match the value computed from the card number, since some
readers validate this field and some do not.

Private helpers in chameleon_cli_unit.py (_idteck_compute_checksum,
_idteck_compose_frame, _idteck_frame_info) parse and compose IDTECK
frames and expose card-number-driven composition for a future
`lf idteck compose` command.
2026-05-15 10:09:51 +02:00
Niel Nielsen cba4b84c4a FIX MFDEs version detection
Fixes version detection of MFDes info
2026-05-13 12:31:24 +02:00
Niel Nielsen b973385f8f Add full DESFire key check command with 3K3DES support
Adds hf des chk and hf des info commands for MIFARE DESFire EV1/EV2/EV3 key checking and card info enumeration.

Tested against: DESFire EV1 (SAK 0x20, 2KB storage) via Chameleon Ultra v2.1 USB
2026-05-12 11:21:24 +02:00
Niel Nielsen cef8b42c26 make_style as that is best practise 2026-05-11 12:36:51 +02:00
Niel Nielsen 8351a3e206 Add files via upload 2026-05-11 11:26:13 +02:00
Niel Nielsen 4e8227d331 Add files via upload 2026-05-11 11:09:24 +02:00
GameTec-live f06efdf815 Merge pull request #413 from nieldk/t55write
Deploy wiki to GitHub Pages with Jekyll / build (push) Failing after 35s
Deploy wiki to GitHub Pages with Jekyll / deploy (push) Has been skipped
Push handler / Build Firmware (push) Failing after 34s
Push handler / Create dev pre-release with artifacts (push) Has been skipped
Push handler / Create tagged release with artifacts (push) Has been skipped
T55write
2026-05-08 17:26:51 +02:00
GameTec-live 1a769a0c4a Merge pull request #417 from azuwis/fix-hf-mf-eview
Push handler / Build Firmware (push) Failing after 30s
Deploy wiki to GitHub Pages with Jekyll / build (push) Failing after 13m2s
Deploy wiki to GitHub Pages with Jekyll / deploy (push) Has been skipped
Push handler / Create dev pre-release with artifacts (push) Has been skipped
Push handler / Create tagged release with artifacts (push) Has been skipped
fix: hf mf eview param error due to chunk exceeding 32-block limit
2026-05-07 21:20:58 +02:00
Niel Nielsen 36daf7038c Add files via upload 2026-05-07 20:07:23 +02:00
Niel Nielsen f8b0ae6085 FEAT: hf 14a auth-trace 2026-05-07 17:46:53 +02:00
Zhong Jianxin d2c1f43a0e fix: hf14a_raw should return data bytes, not Response object
Callers treat the return value as bytes (len(), slicing), but hf14a_raw
was returning the Response object itself, causing TypeError.
2026-05-06 21:05:44 +08:00
Zhong Jianxin 874bb49485 fix: hf mf eview param error due to chunk exceeding 32-block limit
The firmware limits mf1_read_emu_block_data to at most 32 blocks per
request, but eview's chunk_count only honored data_max_length (256).
Added the same 32-block cap already used by esave.
2026-05-06 18:21:47 +08:00
naaraxi 0460d9b95e Support for changing the wake time in the client 2026-05-01 14:36:52 +03:00
Niel Nielsen 285d81b31e fix: restore executable permission to chameleon_cli_main.py 2026-04-28 20:36:26 +00:00
Niel Nielsen fc35ce41ba Merge branch 'RfidResearchGroup:main' into t55write 2026-04-28 22:08:46 +02:00
GameTec-live 763ea77cbd Merge pull request #379 from andrassmuk/fix/issue-378-mingw-pthread
Deploy wiki to GitHub Pages with Jekyll / build (push) Failing after 1m2s
Deploy wiki to GitHub Pages with Jekyll / deploy (push) Has been skipped
Push handler / Build Firmware (push) Failing after 45s
Push handler / Create tagged release with artifacts (push) Has been skipped
Push handler / Create dev pre-release with artifacts (push) Has been skipped
fix: use native winpthreads for MinGW/MSYS2 Windows builds
2026-04-25 08:02:57 +02:00
Niel Nielsen de1d9f6c28 T55xx PAC clone
Add lf clone PAC command
2026-04-24 13:21:48 +02:00
Niel Nielsen c3fd94ca8c hf 14a sniff, even more descriptive answers 2026-04-23 09:08:23 +02:00
Niel Nielsen 20d6136ee0 hf 14a sniff, more descriptive answers 2026-04-23 08:45:34 +02:00
Niel Nielsen 1e8c36f38c hf 14a sniff improvements for nonce collection and crack, fence to catch missing or blocked mfkey binaries 2026-04-23 07:58:57 +02:00
Niel Nielsen 4406788aef BUG: reverted bug that was reintroduced 2026-04-15 14:45:41 +02:00
Niel Nielsen 76c961ed59 Added Ultra/Lite guard 2026-04-14 09:45:02 +02:00
Niel Nielsen d70a0dd63f fix hf14a sniff 2026-04-14 09:32:35 +02:00
Niel Nielsen 0ce680b5c7 Refactor LF clone command and update usage examples 2026-04-13 06:39:03 +02:00
Niel Nielsen 63a465ce9b Fix argument parsing for 'fc' in ioprox 2026-04-12 20:10:36 +02:00
Niel Nielsen 1a09fbaf0e Merge branch 'RfidResearchGroup:main' into t55write 2026-04-08 13:11:02 +02:00
Niel Nielsen 12284d5f71 Fix: emv scan truncation 2026-04-08 12:36:12 +02:00
Niel Nielsen 350a774d7c align with RRG 2026-04-07 10:47:41 +02:00
Niel Nielsen 67c1c36212 Clarify exit method behavior with comments
Added comments to clarify behavior of exit method.
2026-04-07 10:36:15 +02:00
Niel Nielsen bbfda3070d Fix: T55 write commands help 2026-04-07 10:36:15 +02:00
Niel Nielsen e16505e6a7 FEAT! Add T55 write commands 2026-04-07 10:36:06 +02:00
Niel Nielsen efa2ea2c7b protocol ISO 14443-4 and emv scan, loading json file from PM3rdv4 2026-04-07 10:23:58 +02:00
Fauzan Mirza dc950c4f60 fix: correct nfcimport class placement after merge 2026-04-07 00:52:07 +02:00
Fauzan Mirza 7931150412 Merge remote-tracking branch 'origin/main' into pr/nfcimport-v2 2026-04-07 00:49:42 +02:00
GameTec-live 93c1e150ab Merge pull request #361 from azuwis/esave
Deploy wiki to GitHub Pages with Jekyll / build (push) Failing after 56s
Deploy wiki to GitHub Pages with Jekyll / deploy (push) Has been skipped
Push handler / Build Firmware (push) Failing after 47s
Push handler / Create dev pre-release with artifacts (push) Has been skipped
Push handler / Create tagged release with artifacts (push) Has been skipped
Fix `param error` of `hf mf esave`
2026-04-06 18:30:30 +02:00
Kevin Yuan eddbb31c05 Merge branch 'main' into pac-emulation 2026-04-06 16:43:41 +01:00
GameTec-live b77af1e779 Merge pull request #389 from Crazycurly/main
Deploy wiki to GitHub Pages with Jekyll / build (push) Failing after 1m7s
Deploy wiki to GitHub Pages with Jekyll / deploy (push) Has been skipped
Push handler / Build Firmware (push) Failing after 1m2s
Push handler / Create dev pre-release with artifacts (push) Has been skipped
Push handler / Create tagged release with artifacts (push) Has been skipped
feat(cli): integrate HardNested attack into autopwn
2026-04-04 20:12:31 +02:00
Kevin Yuan 3924ad134b Merge branch 'main' into pac-emulation 2026-04-02 14:17:42 +01:00
Niel Nielsen ce932d2e8a feat(data): add LF capture analysis commands 2026-04-02 07:43:16 +02:00
Sam 6f4722a964 feat(cli): integrate hardnested attack into autopwn for HardNested vulnerable cards
When autopwn detects a HardNested vulnerable card (nt_level=2) with some known keys,
it now automatically attempts to recover remaining keys using the hardnested attack,
instead of only printing an advisory message. The implementation:

- Iterates over each missing key slot, picking a known key before each attempt
  (allows newly recovered keys to be reused for subsequent targets)
- Invokes hardnested.recover_key() with standard parameters (200 max runs, 3 max attempts)
- After each found key, checks if it is reusable for other sectors
- Falls back to senested attack if hardnested does not recover all keys

This matches the existing behavior for nested and static-encrypted-nested attacks.
2026-03-25 16:30:48 +08:00
Kevin Yuan f5d721bbfd PAC/Stanley CLI: replace --id with --cn/--raw (PM3 parity)
Split the single --id argument into --cn (8 ASCII chars) and --raw
(32 hex char T55XX bitstream, directly compatible with PM3 raw output).
Add Python-side PAC bitstream encoder/decoder for raw format support.
Output now shows CN and Raw labels matching PM3's format.

Add NRF_LOG module registration to pac.c for debug logging,
consistent with other protocol implementations.

Reassign PAC command IDs (3014/3015) to avoid collision with ioProx
(3010/3011) after rebase onto upstream/main.
2026-03-24 15:04:41 +00:00
Kevin Yuan 69327ded7d Clean up PAC/Stanley CLI: remove debug command, accept ASCII IDs, handle unknown tag types gracefully
- Remove lf pac debug command (development-only)
- Accept both 16-hex and 8-ASCII card ID formats with 7-bit validation
- Add T55xx write command under lf pac write
- Handle unknown TagSpecificType values in slot list without crashing
- Auto-initialize slot data when setting tag type
- Simplify pac_write_to_t55xx by removing unused key parameters
2026-03-24 14:41:22 +00:00
Kevin Yuan 8442bea4c1 Add PAC/Stanley T55XX write support
Add pac_t55xx_writer() for encoding PAC card data into T55XX blocks,
along with the T5577_PAC_CONFIG (NRZ/Direct, RF/32, password-protected,
4 data blocks). Wire DATA_CMD_PAC_WRITE_TO_T55XX (3011) through the
command processor, dispatch table, and Python client.
2026-03-24 14:38:46 +00:00
Kevin Yuan 2fd1a260cf Add PAC/Stanley LF tag emulation support
Implements NRZ/Direct modulation at RF/32 for PAC/Stanley tag emulation.
The modulator encodes 8-byte ASCII card IDs into 128-bit NRZ frames
(0xFF sync + 12 UART frames) and generates PWM waveforms using constant
output levels (compare=counter_top for HIGH, compare=0 for LOW).

Firmware: modulator in pac.c, load/save/factory callbacks in lf_tag_em,
tag_emulation registration, SET/GET_EMU_ID commands (5006/5007).
CLI: pac_set/get_emu_id methods, 'lf pac econfig' command, hw slot list
display for PAC tags.
2026-03-24 14:38:46 +00:00
Kevin Yuan c494a2cc81 Add PAC/Stanley LF tag reading support
Implements NRZ/Direct modulation decoder for PAC/Stanley 125kHz cards
using SAADC ADC sampling with spike-aware threshold calibration.
The LC antenna produces brief high-amplitude transients at NRZ transitions
which are clipped before the moving-average filter to isolate the actual
data levels.
2026-03-24 14:37:25 +00:00
Fauzan Mirza 193f66acdd feat: add --amiibo flag to hf mfu nfcimport for PWD/PACK derivation
Real NTAG 215 chips never reveal the stored password over NFC, so
Flipper .nfc dumps always have zeros for pages 133-134 (PWD/PACK).
This causes readers to reject the emulated tag when they attempt
PWD_AUTH as part of their amiibo validation flow.

The --amiibo flag derives the correct PWD from the UID using the
well-known XOR algorithm and sets PACK to the standard 0x8080,
enabling proper authentication with Nintendo devices.

Usage: hf mfu nfcimport -f Kirby.nfc -s 6 --amiibo

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-21 23:52:13 +01:00
Fauzan Mirza a5847c75ef feat: add Flipper Zero .nfc file importer for MFU/NTAG slots
Add `hf mfu nfcimport` command to import Flipper Zero .nfc files
directly into ChameleonUltra emulator slots. Supports NTAG 210/212/
213/215/216, Mifare Ultralight, Ultralight C, and Ultralight EV1.

The importer parses the Flipper .nfc format and configures the slot
with the correct tag type, anti-collision data (UID/ATQA/SAK),
GET_VERSION response, READ_SIG signature, counter values, and full
page data.

Handles NTAG counter index mapping (Flipper's NFC counter index 2
maps to firmware internal index 0) and gracefully skips unsupported
counters with a warning.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-21 23:52:13 +01:00
andrassmuk 8e28d1a40e fix: use native winpthreads for MinGW/MSYS2 builds on Windows
The pthreads4w dependency uses MSVC-specific architecture detection
(_M_X64, _M_IX86 macros) which fails under MinGW/MSYS2/ProxSpace
with "unknown not supported in version.rc".

MinGW-w64 ships with winpthreads, so only MSVC builds need pthreads4w.

Fixes #378
2026-03-19 15:06:33 +01:00
Jozef Bernadic e4d70d1417 fix(cmd): resolve ioProx command ID conflict with #362 2026-03-19 08:25:59 +01:00