Commit Graph
12988 Commits
Author SHA1 Message Date
Henry Gabryjelski 319339b4cd UNTESTED: Add lots of helper functions to get data into / out of saflok formats
* Small, testable functions
* `set_` functions return boolean so they can indicate out-of-bounds values and similar failures.
* const-correctness for all helper functions

Note: The new functions are NOT used extensively yet ... they still need testing.   But they should make the code more self-documenting / readable (if somewhat verbose).
2025-11-17 01:27:32 -08:00
Henry Gabryjelski 4ce34c6c1e More type and bufferlen safety, and validation in bit manipulation routines.
Again, these should have zero impact on resulting
instructions.   At the same time, this will enable
static analysis to more accurately validate a buffer
(here `saflock_mfc_data_t`)  points to sufficiently
large allocated memory.

Additional validation for `extract_bits()` and
`insert_bits()` will prevent accidental corruptions
(and assert, if assertions are enabled).

These changes also makes the code easier to follow.
2025-11-17 01:27:32 -08:00
Henry Gabryjelski c60c15e184 self-document expr --> expiration 2025-11-17 01:27:32 -08:00
Henry Gabryjelski 5fc6f5275a More type safety for encrypt/decrypt 2025-11-17 01:27:32 -08:00
Henry Gabryjelski 72cf97c622 prevent buffer overrun ... assert with clear message instead. 2025-11-17 01:27:32 -08:00
Henry Gabryjelski 9579a2f4b9 change functions using UID and Key to use structs
This should have zero effect on an optimized build,
as there are effectively zero changes to the instructions.

Rather, this provides greater clarity as to the size of buffers
being passed to various functions, which improves the
long-term maintainability of code, especially when
maintained by someone other than the original author.
2025-11-17 01:27:32 -08:00
Iceman d29d912fff Merge pull request #3025 from aaronjamt/patch-3
[hf seos] Support variable length SIO
2025-11-15 09:50:13 +01:00
Aaron Tulino (Aaronjamt) 25140d9c8b [hf seos] Support variable length SIO 2025-11-14 23:23:46 -07:00
Aaron Tulino (Aaronjamt) ff344e6473 [hf seos] Fix buffer overflow 2025-11-14 23:08:13 -07:00
Aaron Tulino (Aaronjamt) 9ee9b1a73f Proper TLV parsing for Seos 2025-11-14 21:10:46 -07:00
Philippe Teuwen 210b9a704c Add -- to proxmark3 client to pass args to scripts
Examples:
pm3 -y myscript.py -- -h
pm3 -y myscript.py -- --input foo --output bar

This enables usage in scripts shebang, e.g.
  #!/usr/bin/env -S uv run --with pycryptodome pm3 -y
2025-11-13 09:29:05 +01:00
team-orangeBlue fb7553cd8a Basic NDEF functionality
Fixed ndef. Now it reads much like the 14443A counterpart.

Untested except for one run on TCOS cards.

Signed-off-by: team-orangeBlue <63470411+team-orangeBlue@users.noreply.github.com>
2025-11-12 00:46:15 +03:00
Foxushka b380132cbb Replaced hf mf bambukeys with hf mf keygen with multiple KDFs support, use table for key output
Added Snapmaker U1 filament RFID KDF in `hf mf keygen`
2025-11-10 20:58:49 +03:00
Iceman 3d53e85743 Merge pull request #3020 from nvx/fix_seos_adf_and_diversifier
Fix hf seos adf/pacs handling of cards with different diversifier lengths and different ADF OIDs
2025-11-10 16:33:28 +01:00
iceman1001 49e80b5b02 step 1 in fiddling with mfu restore 2025-11-10 16:32:53 +01:00
Tiernan Messmer 781f235a85 Fix hf seos adf/pacs handling of cards with different diversifier lengths and different ADF OIDs 2025-11-11 01:25:04 +10:00
iceman1001 cac4e225e1 initial modification to hf mfu restore to support secure messaging 2025-11-10 16:22:22 +01:00
iceman1001 abb0427960 style 2025-11-10 16:20:50 +01:00
iceman1001 ed516550ca added "data qrcode" command to generate QR codes from inside the PM3 client 2025-11-10 16:20:00 +01:00
iceman1001 c4de141d03 style 2025-11-10 16:16:39 +01:00
iceman1001 0aac15cfd0 fix unicode issues with mingw/proxspace. Thanks to @nvx for the fix! 2025-11-10 16:09:17 +01:00
iceman1001 fd06c38a89 add QR code generation in the pm3 client. It's a text based version using unicode to print the generated qr code. Might not work on all things but its a MIT license and a simple to use project 2025-11-09 16:54:21 +01:00
iceman1001 8df7a49a0e initial support for OpenPrint Tag NDEF records. See: https://github.com/prusa3d/Prusa-Firmware-Buddy/blob/openprinttag/src/module/nfc/openprinttag/openprinttag 2025-11-09 16:43:56 +01:00
Michael Wiesinger ead54bdf54 Fix invalid country code len for lf fdxb reader command 2025-11-07 22:12:06 +01:00
Michael Wiesinger 737a6dc3d7 Fix help description for lf indala brute 2025-11-07 21:02:14 +01:00
iceman1001 02dacdb22a update "hf mfu tamper" to use updated writeblock NG command 2025-11-07 16:03:06 +01:00
iceman1001 aa3e6611b5 added support to read bruce dump files. Only changes the file extension (.rfid) compared to the Flipper Zero (.nfc) formats 2025-11-05 16:32:05 +01:00
Philippe Teuwen 3bdb7657f4 hf_mfu_uscuid.py: avoid exception 2025-11-04 10:56:15 +01:00
Philippe Teuwen ca3795342f hf mfu info: display wafer info for more types 2025-11-03 22:51:28 +01:00
Darell Tan c5028d9384 Fix for making ndefread CRC override work
The return value from MADCheck, which happens before MADDecode, needs to be ignored also
2025-11-04 00:53:35 +08:00
Iceman f7ec92b7c2 Merge pull request #3011 from kormax/satisfy-old-compilers
Remove direct use of strndup to support older compilers
2025-11-03 11:34:17 +01:00
kormax 41f4d5111f Remove direct use of strndup to support older compilers 2025-11-03 12:10:16 +02:00
Iceman d291c33db1 Merge pull request #3013 from klks/master
Script to parse China T-Union card
2025-11-03 10:43:54 +01:00
iceman1001 083545cf1e style 2025-11-03 06:33:27 +01:00
iceman1001 9caf8364ec fix identify a desfire product 2025-11-03 06:21:44 +01:00
klks be34e814de Merge branch 'RfidResearchGroup:master' into master 2025-11-03 13:14:32 +08:00
klks fb931ade82 Add read_t-union.py script for reading T-Union data 2025-11-03 13:12:51 +08:00
ry4000 515f7590cd R&Y: Corrected ITSO AID in aid_desfire.json
`F40113` was incorrectly listed twice; the duplicate was corrected to `F40114` with apologies.

Signed-off-by: ry4000 <154689120+ry4000@users.noreply.github.com>
2025-11-03 15:38:06 +11:00
ry4000 e71e0cf46f R&Y: Update Progress Interval in cmdhfmfdes.c
`hf mfdes bruteaid` progress will intervally show the bruteforce AID progress from 0.0% to 100.0%. Other text updates have also been made.

Signed-off-by: ry4000 <154689120+ry4000@users.noreply.github.com>
2025-11-03 15:36:16 +11:00
ry4000 a2d22fd3c4 R&Y: Test Update to cmdhfmfdes.c
Signed-off-by: ry4000 <154689120+ry4000@users.noreply.github.com>
2025-11-03 15:23:39 +11:00
ry4000 0dacb9d455 R&Y: Test Update in cmdhfmfdes.c
Signed-off-by: ry4000 <154689120+ry4000@users.noreply.github.com>
2025-11-03 15:17:34 +11:00
ry4000 3a77d041e5 R&Y: Test Progress Integer Update in cmdhfmfdes.c
Signed-off-by: ry4000 <154689120+ry4000@users.noreply.github.com>
2025-11-03 15:00:47 +11:00
ry4000 4bc64fe626 R&Y: Update Progress Interval in cmdhfmfdes.c
Testing to see if it is possible to increase the progress bar to two decimal points.

Signed-off-by: ry4000 <154689120+ry4000@users.noreply.github.com>
2025-11-03 14:49:00 +11:00
ry4000 b7e1d6944a R&Y: Update hf mfdes bruteaid Progress in cmdhfmfdes.c
Testing Discord/@jump41's suggestion for implementation.

Signed-off-by: ry4000 <154689120+ry4000@users.noreply.github.com>
2025-11-03 14:21:18 +11:00
kormax bc5fabf0e4 Add quick ECP configuration aliases for hf 14a config --pla 2025-11-01 15:08:11 +02:00
kormax 47447a4698 Update ecplist.json 2025-11-01 12:23:58 +02:00
iceman1001 6df95a2dc9 ident a payment card 2025-10-30 19:40:06 +01:00
iceman1001 f4895860a5 ident a payment card 2025-10-30 19:31:43 +01:00
iceman1001 b8fa8774a1 maur 2025-10-30 19:31:04 +01:00
Iceman e2751606b8 Merge pull request #3004 from henrygab/id48_update_202510
Update id48lib
2025-10-28 10:40:40 +01:00