Commit Graph
23591 Commits
Author SHA1 Message Date
Philippe Teuwen d2a2d63854 Fix CodeQL warning on printf 2026-08-19 12:04:32 +02:00
dxl dca419413b Added cmd(fpga, antennal, qc...) for Proxmark5 2026-08-19 12:04:32 +02:00
dxl f145871b7e Added some cmd and struct definitions for proxmark5 2026-08-19 12:04:32 +02:00
Philippe Teuwen a061f080ed experimental_lib: add missing cmdfpga.c 2026-08-19 12:04:32 +02:00
dxl 7f946eb16f Fixed an issue where compiling the client using CMake failed. 2026-08-19 12:04:32 +02:00
dxl 83114823ec Added cmdfpga for client. 2026-08-19 12:04:32 +02:00
dxl fb21fd80eb Added the armlib third-party dependency. 2026-08-19 12:04:32 +02:00
YoungJules 2b463e4bf9 Remove suffix from repo name in build doco 2026-08-19 11:53:06 +02:00
YoungJules e3ca960ae0 Update wording 2026-08-19 11:32:36 +02:00
YoungJules b1bc5b1152 Added quick doco on how to ssh from ProxSpace 2026-08-19 11:25:46 +02:00
YoungJules 89c23828a0 Create a small kgh_tools.exe that runs in Windows and can be used from another program to read a badge number, write a new KGH badge (given a badge number). You also have to provide a stamp (as .bin file, 4 bytes). The tool can also get a full set of info from a KGH badge in JSON form (including checking KGH crc for correctness). All based on publicly available knowledge, existing lua scripts, and careful obeservations! 2026-08-19 10:50:05 +02:00
Iceman 0b010a3077 Merge pull request #3472 from oSPANNERo/fix-readable-mfc-keyb
fix(mifare): preserve readable Key B in sector trailer dumps
2026-08-19 14:12:55 +07:00
oSPANNERo 2246341dff Merge branch 'master' into fix-readable-mfc-keyb
Signed-off-by: oSPANNERo <25675033+oSPANNERo@users.noreply.github.com>
2026-08-18 18:37:11 -04:00
Iceman d3aa3d25c4 Merge pull request #3467 from kormax/felica-container-issue-information-devices
Detect and print mobile FeliCa device model in `hf felica info`
2026-08-19 02:11:01 +07:00
Iceman f4074cfc63 Merge pull request #3459 from team-orangeBlue/hyctec_mplus
Add CopyKEY M+ tags
2026-08-19 02:10:13 +07:00
Iceman 90e0b7fd8a Merge pull request #3455 from ry4000/master
R&Y: Added static FEC key to `mfc_default_keys.dic`
2026-08-19 02:09:47 +07:00
Iceman a91e5dd174 Merge pull request #3454 from cindersocket/feat-proximity-check-file
Add application proximity check selection
2026-08-19 02:09:26 +07:00
Iceman bd7fe79b63 Merge pull request #3457 from c-barron/docs/uscuid-ul-commands
Document USCUID-UL commands and fix hf_mf_uscuid_prog usage name
2026-08-19 02:08:35 +07:00
Iceman c9a6746586 Merge pull request #3451 from gentilkiwi/patch-1
Update Calypso operators for TAO / Orléans
2026-08-19 02:07:36 +07:00
Iceman 7174cf9036 Merge pull request #3461 from AliBello/patch-1
Add new AID entry for OV Pas card
2026-08-19 02:07:18 +07:00
Iceman b11067253a Merge pull request #3462 from Akury83/master
Update aid_desfire.json
2026-08-19 02:06:54 +07:00
Iceman d121b17975 Merge pull request #3450 from kormax/felica-mfg-time
Detect and print FeliCa manufacturing date in `hf felica info`
2026-08-19 02:05:41 +07:00
Iceman 03ad480d4a Merge pull request #3433 from munzzyy/fix/iclass-short-dump-oob
Fix heap out-of-bounds reads on short iCLASS dump files
2026-08-19 02:04:21 +07:00
dxl c8a20ab885 Let binutils' Downgrade be a step. 2026-08-18 19:10:24 +02:00
dxl ca83bb7ea8 Specify the URL for binutils in packages.txt. 2026-08-18 19:10:18 +02:00
dxl 43f0f9f080 Fixes an issue where compiling armsrc fails in Proxspace.
1. Resolve the compilation failure in ProxSpace by specifying the version number of mingw-w64-ucrt-x86_64-arm-none-eabi-binutils.

2. Once msys2 resolves the issue, remove the specified version number to allow the latest version to be installed.
2026-08-18 17:33:38 +02:00
oSPANNERo f1fc9adaed fix(mifare): preserve readable Key B in sector trailer dumps 2026-08-17 19:19:12 -04:00
歐歪 2362cabcd4 Add ISO15693 magic 'V3' tag support (hf 15 csetuid --v3 / hf 15 cfinalize) 2026-08-17 10:26:09 +02:00
Chloé Franke 20c5cfb226 Fixed return value checking for loadFileDICTIONARYEx 2026-08-15 12:41:10 +02:00
Chloé Franke f605e8a4c6 Fixed pattern2b gerenator to fill complete 24 byte key 2026-08-15 12:09:23 +02:00
Chloé Franke 20e1eba013 Replaced key loading logic for mfdes chk with working version 2026-08-15 12:08:38 +02:00
kormax 4fd935c974 Introduce FeliCa mobile device model detection to 'hf felica info' 2026-08-14 18:15:51 +03:00
Akury83 4ec26b59b6 Update aid_desfire.json
Signed-off-by: Akury83 <87064827+Akury83@users.noreply.github.com>
2026-08-14 13:12:28 +10:00
AliBello febfd5d8a3 Add new AID entry for OV Pas card
Added new AID entry for OV Pas card in the Netherlands.

Signed-off-by: AliBello <69728608+AliBello@users.noreply.github.com>
2026-08-11 18:17:10 +02:00
team-orangeBlue 830e35cc12 Add CopyKEY M+ tags
Signed-off-by: team-orangeBlue <63470411+team-orangeBlue@users.noreply.github.com>
2026-08-09 16:14:01 +03:00
c-barron 2d2207e0f6 Document USCUID-UL commands and fix hf_mf_uscuid_prog usage name
The magic card notes listed "No implemented commands" for USCUID-UL,
but hf_mfu_uscuid.py and hf_mf_uscuid_prog.lua both drive these cards
(config, type, UID, signature, backdoor read/write). Document both
scripts and how to set the tag signature, and correct the script name
shown in the lua script's own usage text.
2026-08-08 11:58:15 -07:00
ry4000 809ab5b20c R&Y: Added static FEC key to mfc_default_keys.dic
1. Added a static key to the `Guest Cashless Prepaid Arcade Payment Cards` section.

Signed-off-by: ry4000 <154689120+ry4000@users.noreply.github.com>
2026-08-08 17:51:46 +10:00
CinderSocket b8d9e354d6 Add application proximity check selection 2026-08-07 13:25:59 -07:00
trichimtrich 9dd2c6f3e5 fix hf iclass unhash failing on keys with repeated z values
Second, independent cause of missing pre-images. Where the previous commit
addressed the modulo forks, this one addresses check().

ck() rewrites a repeated value as the *index* it matched:

    ck(i, j, z) = ck(i, j-1, z[i] <- j)    if z[i] == z[j]

so a stored value in 0..3 is ambiguous: it may be such a marker, or a genuine
small value. reverse_ck() committed to one reading, and walked j in the same
descending order as the forward pass, so it could not undo a chained
substitution:

    half            01 03 24 03
    ck()            01 03 24 00     03 matched z[1] -> 1, then 1 matched z[0] -> 0
    reverse_ck()    01 03 24 01     restores z[0]=01 at j=0, never revisits j=1

8.9% of random four-value halves failed the ck() round-trip. Most of the time
that still landed on a different but valid pre-image, since hash0 is
many-to-one, which is why the visible symptom was intermittent: usually a
missing pre-image, occasionally none at all.

Fix. ck() reduces to, for i = 3, 2, 1 in that order:

    v = z[i];  for j = i-1 down to 0:  if (v == z[j]) v = j;   out[i] = v;

where every z[j] on the right is still the original value, because z[j] is only
rewritten once j becomes the outer index, which happens later. So out[i]
depends solely on the original z[i] and z[0..i-1], and a half can be inverted
index by index: z[0] is known, then z[1], and so on, undoing each step in
reverse and branching wherever both readings are possible. The halves are
independent, so the result is their cross product.

reverse_ck()/reverse_check() are replaced by invert_ck_index(),
invert_ck_half() and reverse_check_all(), which return every candidate rather
than one. invert_hash0() now iterates them. Candidates are still validated
through hash0() before being reported, so nothing invalid can be emitted.

Verified by round-tripping random pre-images through hash0() and invert_hash0():

                        before          after
  recovered             82.55%          100.000%
  keys with no output   1108            0
  pre-images per key    max 32, avg 4.2  max 128, avg 6.0

over 500,000 keys. Every emitted pre-image was additionally checked to hash
back to the input key; none failed. The output now matches an independent
exhaustive sweep of the pre-image space on every key tested.
2026-08-05 16:05:50 +08:00
trichimtrich 983459ab44 fix hf iclass unhash omitting valid pre-images
hash0() reduces each six-bit z chunk modulo a position-dependent value:

    _zn  = (zn  % (63 - n)) + n         n = 0..3
    _zn4 = (zn4 % (64 - n)) + n         n = 0..3, chunks 4..7

The modulus is below 0x40, so the reduction is lossy and a recovered residue
r has a second pre-image at r + modulus whenever that still fits in six bits.

invert_hash0() forked on a hardcoded table mapping {00,01,02,03} to
{3f,3e,3d,3c}, i.e. alt = 63 - r, gated on `hydra_head <= n % 4 ||
hydra_head >= 63 - (n % 4)`. Neither matches the actual arithmetic: the
alternative is r + modulus, not 63 - r, and which chunks can fork follows the
modulus rather than n % 4. The table happens to be right for a few positions
and wrong for the rest, so some valid pre-images were never generated.

Replaced with the modulus arithmetic taken directly from hash0(). Also drops
~15 lines.

Impact: the pre-image is the DES ciphertext for the master key crack. If the
true one is missing, hashcat searches the entire keyspace and finds nothing,
with no way to distinguish that from "the key isn't there".

Measured over randomly generated master/CSN pairs, where the true ciphertext
is computable and can be checked against the output:

  before   the true DES ciphertext was absent for  5 of 30 keys  (17%)
  after    present for 149 of 150 keys

The one remaining failure is unrelated and predates this change:
invert_hash0() returns no pre-images at all for roughly 0.5% of keys
(measured 2 of 400), where neither p nor ~p is found in pi[] and the x search
yields nothing. Left alone here.

Example. Master key 1111111111111111 and CSN 2222222222222222 diversify to
B94318BC673F0A12, and DES_enc(CSN, master) = 950973182317F80B:

    hf iclass unhash -k B94318BC673F0A12

  before                              after
  090973182314280B                    090973182314280B
  4F0973182314280B                    090973182317F80B
  950973182314280B                    4F0973182314280B
  DB0973182314280B                    4F0973182317F80B
                                      950973182314280B
                                      950973182317F80B   <- the true one
                                      DB0973182314280B
                                      DB0973182317F80B

Every printed candidate is still validated through hash0() before being
reported, so this only adds pre-images that verifiably hash back to the key.
2026-08-05 15:28:35 +08:00
Benjamin DELPY 7b504e0e79 Update Calypso operators for TAO / Orléans
Signed-off-by: Benjamin DELPY <benjamin@gentilkiwi.com>
2026-08-03 12:25:27 +02:00
kormax 6e9340a48a Detect and print FeliCa manufacturing time 2026-08-02 23:36:44 +03:00
iceman1001 da509461b7 fix #3448 , added sanity check 2026-08-01 13:46:09 +02:00
Iceman d9d94f9cff Merge pull request #3447 from kormax/felica-seac-improvements
FeliCa SEAC improvements
2026-08-01 18:07:32 +07:00
kormax 1d0faaadb4 Add 'hf felica seacauth1' command 2026-08-01 13:42:03 +03:00
kormax 9cab438fd2 Support FeliCa SEAC in 'hf search' 2026-08-01 13:33:00 +03:00
kormax 7d674b1484 Fold 'hf felica seacinfo' into 'hf felica info' 2026-08-01 12:48:48 +03:00
kormax cec963b9ba Annotate FeliCa SEAC request and response traces 2026-08-01 12:42:06 +03:00
kormax 5b9e37ba13 Update 'hf felica seacinfo' breakdown 2026-08-01 00:45:40 +03:00
kormax 91145e5539 Introduce FeliCa SEAC command constants 2026-08-01 00:36:47 +03:00