Commit Graph

21264 Commits

Author SHA1 Message Date
kormax 3da63fafcd Print VAS OSE information in 'hf vas reader' only if 'verbose' argument is given 2026-03-17 21:55:27 +02:00
kormax ff052e8ee2 Add support for reading multiple pass type identifiers in VAS 2026-03-17 20:42:39 +02:00
Iceman cd7481fa78 Merge pull request #3135 from kormax/aliro-bitmask-print-format
Improve aliro bitmask print format
2026-03-15 16:03:37 +07:00
kormax 5cbae8fc12 Update signaling bitmask print format in Aliro 2026-03-15 11:00:52 +02:00
Iceman 493dfbf928 Merge pull request #3133 from kormax/aliro-vas-maintenance
Aliro & VAS maintenance
2026-03-15 16:00:19 +07:00
kormax ec3b249d30 Remove redundant methods from Aliro/VAS, make private key load helpers universal 2026-03-15 10:08:30 +02:00
Iceman f504af8a04 Merge pull request #3134 from xNovyz/st25tb-tearoff-speedup
hf 14b tearoff: speed up tear-off loop timings
2026-03-15 14:08:31 +07:00
Iceman 9b016d79c1 Merge pull request #3132 from kormax/google-smart-tap
Add `hf gst` commands
2026-03-15 14:06:17 +07:00
xNovyz 6b5eee46af hf 14b tearoff: dramatically speed up tear-off loop timings
- Reinitialize BigBuf memory before FpgaSetupSsc to reset PDC internal buffer pointers
- With properly reset DMA pointers, the field stabilization time can be safely reduced from 5.0ms down to 0.25ms (which matches the timing originally intended by the near-field-chaos patch)
- Further reduced the ST25TB charge capacitor drain wait time from 10ms to an aggressive 0.5ms (the tRST minimum specified in ST25TB datasheet)
2026-03-14 22:44:12 +01:00
kormax 892559ac05 Add tests for zlib support 2026-03-14 22:16:59 +02:00
kormax c8a4314353 Add hf gst commands 2026-03-14 17:34:58 +02:00
Iceman 190f6265c2 Merge pull request #3131 from q0jt/master
Improve felica validation and cleanup handling
2026-03-14 11:06:23 +07:00
Iceman d962e30856 Merge pull request #3124 from xNovyz/hf-14b-tearoff
Hf 14b tearoff
2026-03-14 10:52:32 +07:00
q0jt 661634649a Fix reject responses with invalid CRC 2026-03-14 03:45:22 +09:00
q0jt 08a90b9eba Fix correct status flag error handling in authentication flow 2026-03-14 03:36:57 +09:00
q0jt bf0abf3ee1 Fix avoid double free in CmdHFFelicaReader 2026-03-14 03:22:42 +09:00
Iceman 465e5e6a9c Merge branch 'master' into hf-14b-tearoff
Signed-off-by: Iceman <iceman@iuse.se>
2026-03-13 22:14:20 +07:00
Iceman 147a19eca0 Merge pull request #3129 from kormax/vas-info
Implement 'hf vas info' command
2026-03-13 22:13:26 +07:00
Christian Zanon 5b2e805c73 Update start delay comment
Signed-off-by: Christian Zanon <105173223+xNovyz@users.noreply.github.com>
2026-03-13 13:02:34 +01:00
Christian Zanon b9ddb038b7 Merge branch 'master' into hf-14b-tearoff
Signed-off-by: Christian Zanon <105173223+xNovyz@users.noreply.github.com>
2026-03-13 11:39:06 +01:00
iceman1001 b801cddf13 fix @zerochaos compiler warning 2026-03-13 12:33:47 +07:00
kormax 0ab4cc161b Implement 'hf vas info' command 2026-03-13 07:06:04 +02:00
Iceman 6b3670f95d Merge pull request #3130 from Antiklesys/master
Updated hg iclass legrec
2026-03-13 11:38:41 +07:00
Iceman cfaddb067b Merge pull request #3128 from kormax/android-hce-aid
Refine known AIDs; add Android HCE
2026-03-13 11:38:10 +07:00
Antiklesys 61d20368af Updated hg iclass legrec
Code cleanup removed unused variables
2026-03-13 12:23:35 +08:00
xNovyz 52676ebbd4 style: whitespace fixes 2026-03-11 22:41:21 +01:00
xNovyz 286df8f4eb feat(14b): add interactive hf 14b tearoff command
Add an interactive command for performing tear-off attacks on ST25TB/SRx
monotonic counter blocks. This exploits EEPROM tearing to increment
counters that normally can only be decremented, based on the
near-field-chaos project by SecLabz.

The command sweeps tear-off timing from --start downward in --adj
microsecond steps, automatically consolidates partial writes, verifies
stability across multiple reads, and reports progress in real-time with
color-coded output.

Performance optimizations:
- One-time full iso14443b_setup() at start; subsequent field cycles use
  lightweight tearoff_field_on()/tearoff_field_off() that skip FPGA
  bitstream reload and buffer reallocation
- Periodic CMD_WTX keepalives to prevent USB timeouts during long attacks
- Calls FpgaResetBitstream() on exit to ensure clean FPGA state

Usage: hf 14b tearoff -b <block> -d <target> [--start <us>] [--adj <us>]
2026-03-11 21:43:37 +01:00
kormax 24d1fe79f8 Refine known AIDs; add Android HCE 2026-03-11 20:45:24 +02:00
Iceman 94ba21485d Merge pull request #3125 from pingu2211/standalone-mode-docs
Standalone mode Documentation
2026-03-11 16:00:20 +07:00
pingu2211 3d5f1df093 Pull docs out for all the existing stand alone modes, including a diagram and what do the lights mean, so users don't have to go digging in source code 2026-03-11 14:57:06 +11:00
Iceman 89c10a4b06 Merge pull request #3119 from jof/vanderbilt-act-key
mfc: dic: Vanderbilt ACT
2026-03-11 10:39:19 +07:00
Iceman 87d6d1563f Merge pull request #3123 from cindersocket/feat-wiegand-improvement
Improve Wiegand PACS encode/decode and add verbose output
2026-03-11 10:38:31 +07:00
Iceman 3d6e805cb9 Merge branch 'master' into feat-wiegand-improvement
Signed-off-by: Iceman <iceman@iuse.se>
2026-03-11 10:37:47 +07:00
Iceman 7c6f91bdfb Merge pull request #3120 from pingu2211/gallagher-mifare-classic
Add MIFARE Classic Reading and Writing to HF Gallagher
2026-03-11 10:32:17 +07:00
pingu2211 7d7903deed Feedback from Iceman.
Now respecting quiet flag for continuous reads.
Return Correct PM3 _* return codes.
2026-03-11 09:38:13 +11:00
CinderSocket 08cd96c5a9 Improve Wiegand PACS encode/decode and verbose output 2026-03-10 15:32:25 -07:00
xNovyz 0151c0d710 fix(fpga): add FpgaResetBitstream() to force re-initialization
After aggressive field cycling (e.g. tear-off attacks), the FPGA's
internal SSC/DMA state can become corrupted even though the bitstream
is technically loaded. FpgaDownloadAndGo() caches downloaded_bitstream
and skips re-download if it matches, so subsequent commands fail
silently or hang.

Add FpgaResetBitstream() which sets downloaded_bitstream to
FPGA_BITSTREAM_UNKNOWN, forcing the next FpgaDownloadAndGo() to
perform a complete reload.
2026-03-10 23:06:41 +01:00
xNovyz 57f200d107 fix(iso14443b): add WDT_HIT and timeout to DMA receive loop
In Get14443bAnswerFromTag(), the behindBy == 0 idle loop (waiting for
FPGA DMA samples) had no watchdog kick, no button check, and no
timeout. If the FPGA stops providing the SSC clock, this loop spins
infinitely until the hardware watchdog triggers a reboot.

Add WDT_HIT(), BUTTON_PRESS() check, and a 200ms failsafe timeout
using GetTickCountDelta() to prevent infinite spins.
2026-03-10 23:06:28 +01:00
Iceman d5dc045221 Merge pull request #3122 from kormax/felica-idm-handling
Improve FeliCa command IDM handling
2026-03-10 23:35:00 +07:00
kormax 81d2748321 Improve FeliCa command IDM handling 2026-03-10 17:55:42 +02:00
jof Lassoff d9aee50dc4 Remove redundant Vanderbilt ACT pattern keys from dictionary
- Removed 257 lines of 'Acces'+N pattern keys (416363657300-4163636573FF)
- These keys can now be generated dynamically with: hf mf keygen -k 6
- Kept unique Vanderbilt keys (414354616374, 4D61071B7254, 34016FAC127D)
- Reduces dictionary file size and maintenance burden
2026-03-10 15:51:17 +00:00
jof Lassoff ad3885a9bb Add Vanderbilt ACT pattern-based key generation to hf mf keygen
- Implements mfc_algo_vanderbilt_one() and mfc_algo_vanderbilt_all()
- Generates keys using 'Acces' + block ID pattern (416363657300-4163636573FF)
- Supports all 40 sectors for 4K cards
- Eliminates need for 256+ keys in dictionary file
- Keys generated dynamically on-demand
2026-03-10 15:49:39 +00:00
Iceman 923c39627a Merge pull request #3121 from sujit4/fix/platform-defs-strip-whitespace
fix: use strip() when comparing PLATFORM_DEFS to avoid spurious rebuilds
2026-03-10 15:45:43 +07:00
Sujit Konapur 0577f6f321 fix: use strip() when comparing PLATFORM_DEFS to avoid spurious rebuilds
PLATFORM_DEFS is built with += on an initially empty variable, which
produces a leading space in GNU make. The cached value written to
.Makefile.options.cache has no leading space, so the ifneq comparison
always evaluates to true, causing PLATFORM_CHANGED=true on every
invocation and triggering a clean of bootrom/armsrc/recovery after
every build.
2026-03-09 23:26:45 -07:00
pingu2211 68ff5c3b28 Add to Change Log 2026-03-10 15:19:23 +11:00
pingu2211 c07d688597 Implement Gallagher MIFARE Classic card writing and update MAD sector functionality 2026-03-10 15:13:42 +11:00
Iceman e4443c68cd Merge pull request #3118 from kormax/felica-universal-node-discovery
Add universal node discovery for FeliCa
2026-03-10 10:03:00 +07:00
jof Lassoff 54f067a21a mfc: dic: Vanderbilt ACT 2026-03-09 23:36:54 +00:00
kormax 6629db3659 Add universal node discovery for FeliCa 2026-03-09 18:58:08 +02:00
Iceman d27885cf43 Merge pull request #3116 from apply-science/master
hf mfp dump implementation
2026-03-09 14:17:20 +07:00