Commit Graph
22788 Commits
Author SHA1 Message Date
Iceman ea5b017299 Merge pull request #3568 from innocentbystanderproxmark/master
Consolidiating/Cleaning up PM5 First Time Use documentation
2026-09-01 15:08:45 +07:00
Iceman 6c5be68fe7 Merge pull request #3565 from pkilar/epassport-diagnose-failed-reads
Fix ePassport reporting of failed reads, and decode EF_CardAccess
2026-09-01 15:08:15 +07:00
iceman1001 7326003be3 lessen stack usage 2026-09-01 06:41:00 +02:00
iceman1001 453c192a32 lessen stack usage 2026-09-01 06:40:46 +02:00
iceman1001 ef2ffa2bb4 lessen stack usage 2026-09-01 06:40:26 +02:00
iceman1001 70b2262326 lessen stack usage 2026-09-01 06:40:07 +02:00
iceman1001 f1cc02a6ca lessen stack usage 2026-09-01 06:39:04 +02:00
iceman1001 03f9601cc2 lessen stack usage 2026-09-01 06:38:29 +02:00
DJ Eric James bc7f0716a1 fixes 2026-08-31 23:42:38 -04:00
DJ Eric James aa189ca70c move files a bit. 2026-08-31 23:40:48 -04:00
DJ Eric James 1b4ac29a1e move files a bit. 2026-08-31 23:40:24 -04:00
DJ Eric James bfb7307216 fixes 2026-08-31 23:37:13 -04:00
DJ Eric James 7510e4faa5 fixes 2026-08-31 23:35:52 -04:00
DJ Eric James c5a67dad5f fixes 2026-08-31 23:32:59 -04:00
DJ Eric James c7915c5b83 fixes 2026-08-31 23:30:54 -04:00
DJ Eric James ab4ec63efd fixes 2026-08-31 23:29:08 -04:00
DJ Eric James 27dcb6a63c fixes 2026-08-31 23:25:55 -04:00
DJ Eric James cdf4a097bc fixes 2026-08-31 23:25:03 -04:00
DJ Eric James 4c454f387b fixes 2026-08-31 23:24:06 -04:00
DJ Eric James 50ee709954 fixes 2026-08-31 23:22:52 -04:00
DJ Eric James 7899b560a1 fixes 2026-08-31 23:19:59 -04:00
DJ Eric James b1de4b52c1 fixes 2026-08-31 23:19:03 -04:00
DJ Eric James bf230b4db4 fixes 2026-08-31 23:18:00 -04:00
DJ Eric James 6b12579546 fixes 2026-08-31 23:15:39 -04:00
DJ Eric James 52686ab6d2 fixes 2026-08-31 23:14:39 -04:00
DJ Eric James 5649bb268d fixes 2026-08-31 23:13:57 -04:00
DJ Eric James 399afc31a2 fixes 2026-08-31 20:40:58 -04:00
DJ Eric James b80be3cbf8 restructure document 2026-08-31 20:14:52 -04:00
DJ Eric James 243f1a0861 docu2 2026-08-31 19:09:36 -04:00
DJ Eric James f67eb452e3 docu2 2026-08-31 19:01:03 -04:00
DJ Eric James 703c7129fa docu2 2026-08-31 18:34:29 -04:00
DJ Eric James 448daf96b9 docu2 2026-08-31 18:33:55 -04:00
DJ Eric James 1991874159 docu2 2026-08-31 18:33:29 -04:00
DJ Eric James 0860eb749e docu2 2026-08-31 18:31:48 -04:00
DJ Eric James cdf8c03e73 docu2 2026-08-31 18:31:04 -04:00
DJ Eric James 214cb71677 docu2 2026-08-31 18:29:38 -04:00
Philippe Teuwen 2b7a436ada Warn if sending bitstream to FPGA fails 2026-09-01 00:17:28 +02:00
DJ Eric James 9aa72a5d6f First Attempt 2026-08-31 17:48:00 -04:00
Paul KilarandClaude Opus 5 92a98b1e14 ePassport: say what went wrong when a read fails, and decode EF_CardAccess
Reading a Polish passport produced an empty dump directory and the app
answered with "EF_DG1 is missing - no MRZ to render", which sent us after
one file when every file was absent. Chasing that turned up several
reasons a failed read did not explain itself, and one wrong label in the
SECURITY tab that the same document exposed.

Nothing was reported as a success. _read_finished treated any read the
classifier had not flagged as one: it set status to "success", loaded the
empty record and switched to the data page, leaving the DG1 line in the
log as the only clue. It now treats an empty record as a failure, and the
loader no longer names DG1 when nothing at all was read.

A failed read left no evidence, so pm3.log is kept beside the dump. The
key material is redacted out of it: result.command is the whole built
command line and the client echoes it back in its own output, so the MRZ,
the document number and the CAN all reach the log unless both are
scrubbed. The log does not count as a file when judging whether a read
produced anything - otherwise a failed read looks like it holds one and
the empty-dump prune, which uses rmdir, could never clear it again.

The classifier missed a lot. Fifteen of the client's failure messages
matched no rule and surfaced as the generic error; thirteen now classify,
each verified to end in a return false in the client. Two are deliberately
left alone with a comment saying why: "Secure select rejected" is answered
6A82 for an absent optional DG during a good read, and "PACE is not
available" precedes a normal BAC fallback.

It also contradicted itself twice. A superseded PACE attempt was reported
as the outcome, so a dump with every file in it announced itself as "PACE
authentication failed" - the client falls back to BAC, and
detect_mechanism already knew BAC had got in. And "Did you supply the
correct MRZ info?" is printed whenever external authentication fails,
whatever the cause, so a chip that had stopped answering was reported as a
bad MRZ; a missing APDU response now outranks it and says the key was
never tested.

EF_CardAccess was listed in the file table but never parsed, and DG14's
protocols were mislabelled: 0.4.0.127.0.7.2.2.1.2 was called "PACE (ECDH,
generic mapping)" when that arc is the Chip Authentication public key -
the client calls the same constant oid_pk_ecdh - and PACE lives under
0.4.0.127.0.7.2.2.4.x.y, as the comment above the client's own table says.
emrtd/securityinfos.py parses SecurityInfos for EF_CardAccess,
EF_CardSecurity and DG14, taking its names and domain parameters from the
client's pace_table and pacesdp_table so the two agree. Only the members
of the SET count: walking every nested SEQUENCE also collected the X9.62
identifiers inside the public key, which are not protocols the chip
supports. It uses the TLV reader already in the tree rather than
asn1crypto, an optional dependency the old OID scan silently needed.

Behaviour change: a read that writes no file reports failure and opens the
LOG tab instead of an empty data page; every dump gains a redacted
pm3.log, ignored when judging emptiness and removed with the directory;
failures that surfaced as one generic error now name themselves; DG14
lists four named protocols where it listed six raw OIDs.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-31 16:31:53 -04:00
iceman1001 ab7729259f fix multi tech timings in the trace list. 'hf iclass sam' or 'hf seos sam' 2026-08-31 21:59:32 +02:00
iceman1001 81aa2d437a Real SPI completion wait 2026-08-31 19:47:17 +02:00
iceman1001 7556dd8fc0 Resync drain after framing error 2026-08-31 19:45:23 +02:00
iceman1001 179de04301 Clear ring per send, check start ack 2026-08-31 19:43:38 +02:00
iceman1001 41f8afbfc8 Re-assert HF field every sample when running hf/lf tune 2026-08-31 19:41:40 +02:00
Iceman cb3a21d015 Merge pull request #3562 from pkilar/epassport-blank-panes
Fix ePassport FILES and LOG panes drawing nothing
2026-09-01 00:10:44 +07:00
Paul KilarandClaude Opus 5 bd34414c6d ePassport: fix the FILES and LOG panes going blank
Clicking a file that holds a picture - EF_DG2, EF_DG7 - showed nothing at
all: no image, no hex dump, and no error either.

Both panes drew their text into a single Kivy Label, and a Label is one
OpenGL texture, capped at commonly 16384px. A monospace line here is 13px,
so past roughly 1260 lines the texture fails to be created and the pane
draws nothing. A DG2 portrait is 15-25kB, which is 940-1560 dump lines at
16 bytes a row and four times that in a narrow pane, where the dump falls
back to 4 bytes a row. The LOG pane holds 4000 lines, so it blanked as
well once a dump got talkative. The 64kB cap already in the hex view
guarded the wrong bound: it was sized for how long a Label takes to lay
out, not for what the GPU will hold.

Split both over several Labels. split_blocks() chunks at 512 rows, and the
log at 256 because its lines wrap and so cover more rows than they hold.
The log reuses its Labels and only assigns the ones whose text changed, so
streaming output still re-renders just the tail.

The FILES tab now also shows the picture above the dump for the files that
carry one, which is what you actually want to see for a DG2. The PNG is
already decoded at load time for the data page, so image_for() only hands
over what is there.

Behaviour change: a file carrying an image shows it above the hex dump,
with the dump still underneath. Nothing is truncated that was not before.

Testing: 270 passed, 2 skipped (was 265). Checked on screen against a
generated sample - EF_DG2 shows the portrait, EF_DG7 the signature, EF_SOD
the dump at full height, and the LOG tab renders a full 4000-line buffer
as 16 Labels, tallest texture 3328px against the 16384px maximum. black
clean. Python only, so no client or firmware build matrix applies.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-31 10:45:57 -04:00
Iceman 5e19ee7d38 Merge pull request #3559 from Antiklesys/master
Extended T=1 support
2026-08-31 16:03:36 +07:00
Iceman b3c1ebaade Merge pull request #3558 from nieldk/master
BWM: negotiate ESP/AT32 UART baud up from 460800
2026-08-31 16:00:47 +07:00
Antiklesys a47bdebc87 Extended T=1 support
Extended T=1 support with TA1=95 and T1_IFSD_WANTED 254
2026-08-31 15:28:49 +08:00
Niel Nielsen e4dcda2d5e Add BWM link baud printing functionality
Signed-off-by: Niel Nielsen <nieldk@gmail.com>
2026-08-31 09:14:48 +02:00