Commit Graph
21660 Commits
Author SHA1 Message Date
team-orangeBlue 12ea3f087c Bodge: fix mfpreadsector
Looks like either I, or someone else, has never thought about encrypted mode enforcement in mfpreadsector.

Now during readouts data is decrypted on the fly.
Checked on real tag.

Signed-off-by: team-orangeBlue <63470411+team-orangeBlue@users.noreply.github.com>
2026-04-19 22:34:45 +03:00
Iceman f0c8fe99ff Merge pull request #3251 from jrozner/bugfix/fix-broken-crc
Fix overflow in 14a to send buffer
2026-04-20 01:49:23 +07:00
Joe Rozner b1cdefe3b4 Fix overflow in 14a to send buffer
Currently there is no bounds checking on the to send buffer which
results in larger requests overflowing the buffer and corrupting the
CRC. This fixes that by adding bounds checking. It also increases
DYNAMIC_MODULATION_BUFFER2_SIZE to support frames up to 256 bytes
2026-04-19 11:23:58 -07:00
Iceman 54996da407 Merge pull request #3249 from Antiklesys/master
Update hf iclass legbrute progress counter
2026-04-19 20:19:44 +07:00
Antiklesys 9a46fd7301 Update hf iclass legbrute progress counter
Freeing up additional cpu cycles and increasing speed by reducing print statement frequency.
2026-04-19 21:05:27 +08:00
Iceman 40eb7e917c Merge pull request #3248 from kormax/felica-info-service-block-data-based-detection
Implement block-data-based service detection for `hf felica info`
2026-04-19 16:17:06 +07:00
kormax 072b82bb8e Implement block-data-based service detection in 'hf felica info' 2026-04-19 11:58:37 +03:00
kormax 63be5d21c1 Add block-based service qualifiers in 'felica_system_code_list.json' 2026-04-19 11:58:35 +03:00
iceman1001 69f40df005 unified some minor hint text messages. added a ndef detection to hf mfu dump, hf mfu view, hf mfu eview in order to suggest that there is actually a ndefmessage 2026-04-19 08:52:16 +07:00
Iceman ba22b7e4ef Merge pull request #3247 from kormax/felica-info-service-detection
Add detection of nested services present on a FeliCa system
2026-04-19 06:06:13 +07:00
Iceman 5e6b208c42 Merge pull request #3246 from kormax/duox-internal-auth
Implement DUOX internal authentication
2026-04-19 06:05:26 +07:00
Iceman 2da1cd954a Merge pull request #3245 from Antiklesys/master
Update hf iclass encode to accept -k and not just --ki
2026-04-19 05:52:12 +07:00
kormax 141c21749a Add per-system inner service discovery to 'hf felica info' 2026-04-18 20:05:42 +03:00
kormax e274482f71 Add service indicators to systems in 'felica_system_code_list.json' 2026-04-18 20:05:42 +03:00
kormax 5097554217 Fix changelog yet again 2026-04-17 20:41:48 +03:00
kormax 6a4ed240b4 Implement 'hf mfdes intauth' command 2026-04-17 20:39:38 +03:00
Antiklesys 5f08a3073a Update hf iclass encode to accept -k and not just --ki 2026-04-17 16:43:30 +08:00
Iceman d3fa7fd681 Merge pull request #3244 from kormax/pcrypto-ensure-ec-pubkey
Add crypto helper methods for loading public EC keys of various formats
2026-04-17 04:20:14 +07:00
Iceman 766c04647c Merge pull request #3243 from Antiklesys/master
Fix for circular buffer error during hf iclass sim
2026-04-17 04:19:37 +07:00
Iceman ef120e4b36 Merge pull request #3242 from kormax/duox-related-identification
Improve DUOX card identification; reformat modules
2026-04-17 04:17:29 +07:00
kormax 67db3b15c6 Support compressed public EC points 2026-04-16 23:57:30 +03:00
kormax f99af1b706 Add crypto helper methods for loading public EC keys of various formats 2026-04-16 23:30:37 +03:00
Antiklesys 0ffe244a6b Fix for circular buffer error during hf iclass sim
Issue origin:
Commit 6b7665ed5 "Added live fc/cn update to hf iclass tagsim" added a data_available() poll inside the per-byte DMA loop of GetIso15693CommandFromReader so the ARM could drop out of RF-listen and process live emulator updates.

Before that commit, that tight loop had no USB poll at all — only gotFrame / BUTTON_PRESS / WDT_HIT. Verified via git show 6b7665ed5^:armsrc/iso15693.c.

Why it shows up on sim -t 3/6/7: those are the FULL sim modes that share do_iclass_simulation. Between reader commands the decoder sits in STATE_READER_UNSYNCD, so the gated poll at iso15693.c:1570-1575 fires every byte (reading UDP peripheral registers). With DMA filling at ~1 byte / ~19 µs, the added USB register reads plus jitter occasionally push the CPU past the 90% lag threshold → behindBy 461 with DMA_BUFFER_SIZE=512.

Commit fb8f94fa2 narrowed the gate to UNSYNCD to stop mid-frame exits, but the per-byte poll itself is still what's new on that path.

Fix:

New mode constant in include/iclass_cmd.h:

#define ICLASS_SIM_MODE_FULL_LIVE  8  // FULL + allow USB interrupt for live emul updates
Treat it identically to ICLASS_SIM_MODE_FULL everywhere except for the poll gate.

Add a flag param to GetIso15693CommandFromReader — e.g. bool allow_usb_interrupt in iso15693.c:1495 and iso15693.h:42. Wrap the poll:

if (allow_usb_interrupt &&
    (dr->state == STATE_READER_UNSYNCD ||
     dr->state == STATE_READER_AWAIT_1ST_FALLING_EDGE_OF_SOF) &&
     data_available()) { ... }
Pass true only for live mode in do_iclass_simulation iclass.c:502:

bool live = (simulationMode == ICLASS_SIM_MODE_FULL_LIVE);
len = GetIso15693CommandFromReader(receivedCmd, MAX_FRAME_SIZE, &reader_eof_time, live);
The len == -2 drain block stays but becomes dead code for non-live modes (never returns -2).

Client side: cmdhficlass.c:1687 (CmdHFiClassTagSim) sends ICLASS_SIM_MODE_FULL_LIVE. CmdHFiClassSim -t 3/6/7 keeps sending ICLASS_SIM_MODE_FULL / _GLITCH / _GLITCH_KEY.

Other callers (iso15693.c:2270, iclass.c:1121 = reader-attack sim) pass false.

Result:

hf iclass sim -t 3/6/7 → byte-inner loop is back to its pre-tagsim shape → no blow-buffer abort.
hf iclass tagsim → keeps live update ability; still has the overhead, but that's the trade-off the feature needs.
2026-04-17 03:00:14 +08:00
kormax 4a2e161954 Move common functions related to Mifare GetVersion to a dedicated Mifare Prime module 2026-04-16 18:55:34 +03:00
kormax 6c26f11034 Parse I2C protocol support for Mifare Prime GetVersion 2026-04-16 18:34:58 +03:00
kormax 82a75c7e06 Add AID values related to DUOX EV charging 2026-04-16 18:34:09 +03:00
Iceman ffba70d30b Merge pull request #3241 from Antiklesys/master
Fix to improve/fix circular buffer behavior/issues
2026-04-16 15:31:22 +07:00
Antiklesys fa5318fe59 Fix to improve/fix circular buffer behavior/issues 2026-04-16 15:42:28 +08:00
Iceman b7d41079d2 Merge pull request #3240 from kormax/felica-info-heuristics
Increase speed of 'hf felica info' through heuristics
2026-04-16 06:54:56 +07:00
Iceman aac88f1f14 Merge pull request #3239 from Antiklesys/master
hf legbrute speed improvements from hashcat modules
2026-04-16 06:54:26 +07:00
Iceman aac9eb31c9 Merge branch 'master' into master
Signed-off-by: Iceman <iceman@iuse.se>
2026-04-16 06:54:17 +07:00
Iceman bc91c54d5b Merge pull request #3238 from kormax/hf-mfdes-proximity-check
Add DESFire Proximity Checking
2026-04-16 06:51:09 +07:00
Iceman 28ed45486c Merge pull request #3235 from kormax/felica-info-system-idm
Improvements to FeliCa
2026-04-16 06:50:46 +07:00
kormax 8a82de7fd6 Increase speed of 'hf felica info' through heuristics 2026-04-15 20:59:34 +03:00
Antiklesys baa69786bb Update iclass_legrec_legbrute_key_recovery.md 2026-04-15 11:48:17 +08:00
Antiklesys 4319268e1b Merge branch 'master' of https://github.com/Antiklesys/proxmark3 2026-04-15 11:19:02 +08:00
Antiklesys d92c9e06e9 Update cmdhficlass.c 2026-04-15 11:18:47 +08:00
Antiklesys f1e1e609c6 Changelog update
Updated changelog

Signed-off-by: Antiklesys <syselkitna@gmail.com>
2026-04-15 03:34:39 +08:00
Antiklesys cea87a128f Update cipher_bs_dispatch.c 2026-04-15 01:29:33 +08:00
Antiklesys 42d7edfd0e Update CHANGELOG.md 2026-04-15 01:15:24 +08:00
Antiklesys 8d6e474a75 hf iclass legbrute speed improvements #1
Imported updates from legbrute hashcat modules to speed up hf iclass legbrute

1. Bitslicing — biggest win (~32×)
Kernel stores each cipher register (l, r, b, t) as 32 parallel 1-bit lanes in u32s (m64000_a3-pure.cl:147-201, bs_iclass_tick) and computes 32 MACs per tick. The CPU doMAC_brute does 1 at a time. A 64-bit bitslice port would give ~64× per core; AVX2 gets 256×. This is the single largest speedup lever.

2. Early-reject after 8 output ticks
In m64000_sxx (m64000_a3-pure.cl:534-535) the kernel breaks out as soon as the first MAC byte can't match. doMAC_brute always produces the full 32 output bits before memcmp. Comparing byte-by-byte as bits are produced saves ~3× on the output phase since 255/256 keys fail after byte 0.

3. Pre-expanded y_ccnr bit array
Kernel expands the 96 input bits into a flat array once (m64000_a3-pure.cl:239-247) and reuses it for every candidate. suc_bytes in cipher.c:181 re-does b >>= 1 shifts for every key. Pre-expanding lets the inner loop be branch-free and vectorizable.

4. Widen lanes to 256/512 via AVX2/AVX-512. The bitslice code is written against a single uint64_t lane type — swapping for __m256i/__m512i (or an abstracted bs_word_t) gives 4×/8× throughput on hosts that support it, with scalar u64 fallback on ARM/older x86. NEON gives 2× for ARM.
2026-04-15 01:09:19 +08:00
kormax f543040c25 Update CHANGELOG 2026-04-14 19:23:30 +03:00
kormax 893ec3237e Add 'hf mfdes pc' command 2026-04-14 19:22:31 +03:00
kormax 06f715f53c Fix minor inaccuracies in 'felica_system_code_list.json' 2026-04-14 18:19:37 +03:00
kormax 27cb875470 Improve system detection, print extra info in 'hf felica info' 2026-04-14 18:19:37 +03:00
Philippe Teuwen 61a7c55a2c changelog 2026-04-14 10:22:17 +02:00
Philippe Teuwen 47102b202e changelog 2026-04-14 10:21:14 +02:00
Philippe Teuwen 961e59b5d1 Revert "Release v4.21611 - BREAKMEIFYOUCAN!"
This reverts commit aaacc75e9f.
2026-04-14 10:19:30 +02:00
Philippe Teuwen aaacc75e9f Release v4.21611 - BREAKMEIFYOUCAN! v4.21611 2026-04-14 10:19:30 +02:00
Philippe Teuwen 00cb528de7 prepare release 2026-04-14 10:19:11 +02:00