Commit Graph
23607 Commits
Author SHA1 Message Date
Iceman 4e0798a11e Merge pull request #3752 from matrix/fix-ndef-tlv
nfc: decode NULL, Lock Control and Memory Control TLVs as specified
2026-11-07 09:29:59 +08:00
Gabriele GristinaandClaude Opus 5.5 8024ab5ecb nfc: decode NULL, Lock Control and Memory Control TLVs as specified
A NULL TLV has no length, so a run of them swallowed the TLVs after
it. Lock and Memory Control sizes of 0 mean 256, the nibbles of their
third byte are powers of two and the Memory Control size counts bytes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-06 22:55:23 +01:00
Iceman f90d0d0bf9 Merge pull request #3750 from matrix/fix-ci-codeql-apt-mirror
CI: skip the slow Azure apt mirror in CodeQL too
2026-11-07 05:34:29 +08:00
Iceman ebf59f7adf Merge pull request #3748 from matrix/fix-flash-tty-exit-status
client: flash animation only on a terminal, exit 1 on failure
2026-11-07 05:33:46 +08:00
Iceman 95d248f923 Merge branch 'master' into fix-flash-tty-exit-status
Signed-off-by: Iceman <iceman@iuse.se>
2026-11-07 05:33:34 +08:00
Iceman c127ce940e Merge pull request #3749 from matrix/fix-rawdemod-args
data rawdemod: stop cutting --max, --samples and --p2 clock to 8 bits
2026-11-07 05:31:04 +08:00
Gabriele GristinaandClaude Opus 5.5 2adeaa42a7 CI: skip the slow Azure apt mirror in CodeQL too
CodeQL installs its packages with apt and stalls on
azure.archive.ubuntu.com like the Ubuntu jobs did
(actions/runner-images#14823). #3747 left this workflow out.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-06 22:29:46 +01:00
Gabriele GristinaandClaude Opus 5.5 aeb3705237 data rawdemod: stop cutting --max, --samples and --p2 clock to 8 bits
The values went through uint8_t or & 0xFF, so --max 300 ran with 44
and --samples 1000 with 232. The --fs clocks stay 8-bit in the FSK
demod and are now refused above 255.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-06 22:27:28 +01:00
Gabriele GristinaandClaude Opus 5.5 49e444b773 client: flash animation only on a terminal, exit 1 on failure
Since cd5906674 the flash animation runs whatever stdout is, and a
redirected flash of fullimage.elf wrote a 7 MB log.

flash_pm3() replaced a flash error with the result of
flash_stop_flashing(), always PM3_SUCCESS, so a failed flash ended with
"All done". main() exited 0 after --flash, --dumpmem and
--reboot-to-bootloader whatever happened. dumpmem printed its negative
error code with %u.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-06 22:15:28 +01:00
Iceman 04cac2724b Merge pull request #3747 from matrix/fix-ci-macos-proxspace
CI: fix the macOS and ProxSpace builds, speed up WSL and Ubuntu
2026-11-07 05:10:54 +08:00
Gabriele GristinaandClaude Opus 5.5 1e645dfd0a CI: update checkout, setup-python and upload-artifact to v7
actions/checkout v6 hands the Windows path of its credentials config to
git config --unset as a regex, which MSYS2's git rejects in the
ProxSpace job (actions/checkout#2528, fixed in v7.0.1). The
persist-credentials: false added for it did not help and is dropped.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-06 22:04:55 +01:00
Gabriele Gristina b1da58a960 Merge branch 'master' of https://github.com/RfidResearchGroup/proxmark3 into fix-ci-macos-proxspace
# Conflicts:
#	CHANGELOG.md
2026-11-06 22:03:21 +01:00
Iceman 4f4dfeb512 Merge pull request #3746 from matrix/fix-recovery-at91-pad
recovery: pad the AT91 bootrom to 0x102000 again
2026-11-07 04:44:06 +08:00
Gabriele GristinaandClaude Opus 5.5 e9689307c8 CI: skip the slow Azure apt mirror, tidy the ProxSpace job
The Ubuntu jobs drop azure.archive.ubuntu.com from the runner's mirror
list. It sometimes serves at tens of kB/s, held apt-get install for up
to 50 minutes and apt never fails over (actions/runner-images#14823).

The ProxSpace job no longer asks for arm-none-eabi-gdb, which MSYS2
replaced with gdb-multiarch in 2023, and no longer persists the
checkout credentials, whose cleanup failed with MSYS2's git on PATH.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-06 21:28:47 +01:00
Gabriele GristinaandClaude Opus 5.5 8953c8d88d CI: fix the macOS and ProxSpace builds, build in the WSL file system
mfulc_des_brute added the Homebrew openssl@3.6 include directory, which
the macOS runners no longer have, and -Wmissing-include-dirs under
-Werror stopped the build. It now uses brew --prefix openssl, as #3734
did for mfd_aes_brute.

Since MSYS2 filesystem 2026.10.18 /etc/profile runs post-install
scripts on the first start only, so ProxSpace never installed its
packages and the build found no arm-none-eabi-gcc. The workflow now
runs ProxSpace's setup script when setup\installed is missing.

The third mfulc_des_brute test in pm3_tests.sh is now labelled 3/3.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-06 20:44:38 +01:00
Gabriele GristinaandClaude Opus 5.5 c73cc293ad recovery: pad the AT91 bootrom to 0x102000 again
caa76f57b ("Fix pm5 recovery image") also moved the AT91 pad from
0x00102000 to 0x00104000, but the AT91 boot area is 8 KB and the OS
image starts at 0x102000. recovery.bin had every fullimage section
0x2000 too high and 0xFF at the OS entry, so a JTAG recovery would
leave the bootrom in flash mode.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-06 19:10:29 +01:00
Iceman e99dccf43a Merge pull request #3745 from kormax/felica-discover-hidden-environments
Allow FeliCa hidden environment discovery on SD2 cards
2026-11-06 19:36:30 +08:00
Iceman 8def3b09a4 Merge pull request #3744 from kormax/felica-new-systems-services-issuers
Add recognition for more FeliCa systems/services and issuers
2026-11-06 19:35:19 +08:00
kormax 12f72fc641 Allow FeliCa hidden environment discovery on SD2 cards 2026-11-05 21:10:27 +02:00
kormax b6398169e7 Add new known FeliCa systems and services 2026-11-05 20:26:37 +02:00
kormax 0752474574 Add new known FeliCa issuer identifiers 2026-11-05 20:24:02 +02:00
Iceman 1b71dfbbd4 Merge pull request #3737 from innocentbystanderproxmark/update_documentation_and_firmware_bins
Update documentation and firmware bins
2026-11-02 17:20:25 +08:00
Innocent Bystander 14c2bace48 Adding an entry to CHANGELOG.md per github suggestion. 2026-11-01 22:00:34 -05:00
Innocent Bystander dfee79d0ed Update Documentation, FPGA and BWM firmware flashing 2026-11-01 21:51:41 -05:00
Iceman 754bbae3d9 Merge pull request #3733 from xdrr/fix/seos-2k3des-get-data
SEOS: fix 2K3DES GET DATA wrap and silent APDU failures
2026-10-30 10:04:22 +08:00
Iceman a078a36dbe Merge pull request #3735 from nieldk/master
Add Basiskort (CPH) entry to aid_desfire.json
2026-10-29 21:05:58 +07:00
Iceman 22753531e9 Merge pull request #3734 from adrian-stepien/dev/macos-openssl-path
Fix Homebrew OpenSSL lookup in `mfd_aes_brute`
2026-10-29 20:58:13 +07:00
Iceman c00a8198da Merge pull request #3729 from adrian-stepien/dev/pm5-reader-hangs
Use `-fno-common` consistently in ARM builds
2026-10-29 20:57:49 +07:00
Niel Nielsen e6622f2dd8 Add Basiskort (CPH) entry to aid_desfire.json
Signed-off-by: Niel Nielsen <nieldk@gmail.com>
2026-10-28 13:49:09 +01:00
Ben NottandCursor Grok 4.6 68d3bf2bb0 SEOS: follow ISO7816 leftover GET RESPONSE in hf seos pacs
Large GET DATA returns 61 xx. Concatenate clear 00 C0 bodies before
unwrap so 255-byte AES and 2K3DES objects print instead of exit 246.

Co-Authored-By: Cursor Grok 4.6 <noreply@cursor.com>
2026-10-28 02:46:53 -07:00
Adrian 1eb73852d7 Find Homebrew OpenSSL through brew
The hardcoded openssl@3.6 include path fails macOS CI when that formula
is absent. Ask brew for the installed OpenSSL prefix and use it for
both headers and libraries.

Built all three mfd_aes_brute tools with Clang and GCC 16 against
OpenSSL 3 and 4 on macOS. Existing linker deprecation warnings remain.
2026-10-28 09:06:39 +00:00
Adrian 121b14ddd8 Use -fno-common consistently in ARM builds
GCC 8.5 emits COMMON globals by default. Apply -fno-common in the shared
Make and CMake flags so it covers the OS, bootrom and PM5 armlib. Also
remove bootrom archives on clean to avoid reusing old library objects.

Built OS and bootrom for PM5/RDV4 with GCC 8.5/13.3 using Make and CMake.
No COMMON object symbols remain; PM5 CDC state is inside BSS. Existing
build warnings remain. No hardware was flashed.
2026-10-28 07:11:32 +00:00
Ben NottandCursor Grok 4.6 f7388ea3a4 SEOS: fix 2K3DES GET DATA wrap and silent APDU failures
hf seos pacs on 2K3DES cards exited 236 with no message after mutual
auth. Print ExchangeAPDU14a failures, check mbedtls DES-CMAC without
mutating the caller key, decode SELECT 85 at its real length, and emit
short-form 85 when the cryptogram is under 128 bytes.

Co-Authored-By: Cursor Grok 4.6 <noreply@cursor.com>
2026-10-28 00:02:29 -07:00
Iceman d596fe6b04 Merge pull request #3730 from adrian-stepien/dev/bootrom-common-init
Include COMMON globals in bootrom BSS initialization
2026-10-28 13:15:20 +07:00
Iceman a71c3ebad3 Merge pull request #3731 from adrian-stepien/dev/bootloader-dump-cleanup
Avoid hanging the bootrom after a memory dump
2026-10-28 13:14:51 +07:00
Adrian fbdbaf3c9e Include COMMON globals in bootrom BSS initialization
The bootrom linker script defines __bss_end__ before COMMON symbols are
placed. Startup clears only up to that boundary. On PM5 with ARM GCC 8.5,
this leaves the entire 92-byte USB CDC structure outside the zeroed area,
even though bootrom sources themselves are built with -fno-common.

Place COMMON inside .bss before setting __bss_end__, and assert that the
boundary covers the whole section. The shared script applies to PM5 and
RDV4. On the tested PM5 build, stack addresses, the shared communication
area and the entry point remain unchanged.

Built both targets with ARM GCC 8.5 and ran bootrom/check. Checked ELF
boundaries and the 16 KiB boot partition; removing COMMON placement
triggers the new assertion. No compiler warnings; the existing PM5 RWX
LOAD-segment linker warning remains. CMake and BWM builds were not tested.

Flashed the bootrom alone on PM5 and verified readback against the image.
All internal flash bytes from the OS start onward matched the pre-flash
backup. Cold startup and five software reset cycles passed. Five complete
bootloader/read/reset cycles also passed after fixing the client's dump
cleanup separately. FPGA was not written. This corrects initialization;
it does not establish a fix for the USB-controller failures in #3642.
2026-10-27 17:11:20 +00:00
Adrian 6762b812d5 Avoid hanging the bootrom after a memory dump
Bootloader memory-dump cleanup sends CMD_PING to wake the communication
thread after clearing its run flag. The thread can be waiting for another
transmit after the dump ACK, so it sends this command before exiting.
The non-BWM bootrom does not handle CMD_PING: its default dispatch enters
Fatal(), leaving the device unresponsive even though the dump succeeded.

Use CMD_DEVICE_INFO for the wakeup instead. It is already supported by the
bootloader and used to identify it before the dump. Keep the wakeup so
closing the client does not leave the communication thread waiting.

Reproduced on PM5: the dump completed, but the following reset and device
probe failed. With only the rebuilt client changed, the same test script
passed five OS-to-bootloader, memory-dump and reset-to-OS cycles, with a
successful ping after each. No firmware was flashed for this comparison.

Built the client with AppleClang through Make, CMake and experimental_lib;
client/check passed. GCC 16 compiled the changed translation unit with
-Wall -Werror. Existing macOS linker warnings remain. The full GCC host
build was not repeated because of the previously observed Apple SDK
alignment error. Linux and Windows were not tested; this change replaces
an existing protocol command without changing platform-specific code.
2026-10-27 17:11:20 +00:00
Iceman 61ede21feb Merge pull request #3725 from M35mar/mfuev1-counter-reset
HF MFU: rewrite hf mfu countertear as faithful port of mfuev1_counter_reset.py
2026-10-27 09:54:36 +07:00
Iceman 94a6c1beed Merge pull request #3728 from TomHarkness/fix/cep-spi1-write-read-roerr-flush
pm5 cep: clear stale SPI1 RX byte around write/read on CEP's SPI1
2026-10-27 09:54:05 +07:00
Iceman 34225e6df6 Merge pull request #3722 from antoniovazquezblanco/emv
Tag EMV cards
2026-10-27 09:50:08 +07:00
Iceman fabf0f7b94 Merge pull request #3726 from kormax/calypso-aid-selection-fallback
Fallback to SELECT via AID if Calypso card does not respect LID file select
2026-10-24 23:57:42 +07:00
kormax 1883ef3369 Fallback to SELECT via AID if Calypso card does not respect LID file select 2026-10-24 18:29:53 +03:00
M35mar a3009aedbc Merge branch 'RfidResearchGroup:master' into mfuev1-counter-reset 2026-10-24 10:48:47 +02:00
M35MARandopencode agent a260d0514e HF MFU: rewrite hf mfu countertear as faithful port of mfuev1_counter_reset.py
Problem
The native hf mfu countertear used a device-side
CMD_HF_MFU_COUNTER_TEAROFF path with a static increment payload,
decided once per run. The pyscript mfuev1_counter_reset.py implements
the same attack with auto-calibration, a 3-phase attack loop,
per-attempt BD delay tuning (hunting) and stuck-value handling,
which the native command lacked.

Change
- rewrite the client command around the generic tear-off hook
  (hw tearoff) and raw INCREASE_CNT frames, mirroring the pyscript
  step by step: preflight checks, CHECK_TEARING_EVENT support gate,
  targeted repair/normalize, BD sweep calibration (working delay
  accepted only on 0xBD), and the DECREMENT -> PREPARE (0x00FFFF)
  -> RESET phases with the same increment payloads (000100 for
  decrement steps, 010000 for reset/repair)
- same delay tuning on counter movement: +1 when unchanged, -1 when
  a jump exceeds 10, delay locked after a successful decrement
- remove CMD_HF_MFU_COUNTER_TEAROFF usage from the client; device
  side stays untouched
- add Lua port client/luascripts/mfuev1_counter_reset.lua with the
  same behaviour, using core.console capture and Enter-to-stop
- regenerate doc/commands.md and doc/commands.json

Behaviour change
Same CLI shape as the pyscript (-c/-f/--DelayBD/--Delay00, legacy
-i/-l/-s/-x options removed). Console output now matches the pyscript.

Testing
gcc warningless for client, armsrc and bootrom (RDV4). make check
green. doc regenerated with GD enabled. Verified 1:1 against the
pyscript and the new Lua port on hardware (EV1 card). Not tested
here: clang, Windows/ProxSpace and macOS. No build files are touched,
so the usual client-side review applies.

Co-Authored-By: opencode agent (GLM-5.3-Flash-Free) <noreply@opencode.ai>
2026-10-24 10:10:55 +02:00
M35MAR b497afc00e client/pyscripts: harden mfuev1 counter reset
Validate counter choices 0-2, treat only 0x00/0xBD as valid
CHECK_TEARING_EVENT answers, and detect NACK replies from the raw
payload, so retry logic does not mistake a NACK for a real answer.
2026-10-24 10:09:37 +02:00
Iceman bc6d767964 Merge pull request #3724 from r3wretrhy/fix/emv-aidlist-rule-stringop-overflow
emv: fix false -Wstringop-overflow in AID list rule with AVX2
2026-10-24 10:30:51 +07:00
Zhaoqi XuandGrok Bot 56efde54f5 emv: fix false -Wstringop-overflow in AID list rule with AVX2
Building the client with -march=x86-64-v3 (the CentOS/RHEL 10
baseline) fails with gcc 14:

  src/emv/emvcore.c:211:24: error: writing 32 bytes into a region of
  size 22 [-Werror=stringop-overflow=]

gcc vectorizes the dash fill loop in aidlist_rule() into 32-byte
stores and loses the pos + 2 < dstlen bound. The bound was correct.
Compute the dash count with the same limit and fill it with memset,
so there is no vectorized loop store to mis-size. Output is unchanged.

Reported in #3671.

Co-Authored-By: Grok Bot <noreply@users.noreply.github.com>
2026-10-23 19:06:41 -04:00
Antonio Vázquez Blanco 6d9526f4fb Tag EMV cards 2026-10-23 13:28:28 +02:00
Iceman 6ce4ec49c1 Merge pull request #3717 from antoniovazquezblanco/emv
HF 14a: Only hint EMV when correct AID is found
2026-10-23 16:06:31 +07:00
Antonio Vázquez Blanco aa55bfca0e HF 14a: Only hint EMV when correct AID is found 2026-10-23 08:25:24 +02:00