Commit Graph

6051 Commits

Author SHA1 Message Date
iceman1001 add2eb8e9d hf mf dump, does a guess the key file name, and if you ran for instance a autopwn against a 4K card but didnt mention it , it defaults to 1K. Meaning the recovered keyfile will have 32 keys. When trying to dump card and specifiy 4K, it would automatically find that keyfile and happily go out-of-bounds leading to client crash 2025-06-08 19:31:02 +02:00
iceman1001 3d8a15d361 text 2025-06-08 16:10:26 +02:00
iceman1001 bcec294606 fix the visual bug with when viewing larger mifare class dumps, 2k, 4k, it would mark the signature sectors... for the rest of the dumps. 2025-06-08 16:09:23 +02:00
iceman1001 27aa9a2085 hf mf rdsc - if a successful read was made , add the used key to the sector trailer output.\nhf mf info - after getting annoyed over command running tests on non mifare classic card, this fixes it. 2025-06-08 10:06:30 +02:00
iceman1001 387009ab6a added a support function 2025-06-08 10:02:40 +02:00
iceman1001 2d610b8dc0 text & style 2025-06-08 10:02:00 +02:00
Antiklesys 80e1c7f0d4 Implemented hf iclass sim -t 7
Implemented an iclass sim function that prevents simulated card responses after updating block 3.
Block 3 gets updated with the XOR key as if it was in personalization mode.
2025-06-07 23:12:21 +08:00
BIOS9 fd3a644289 fix mad v2 cps offset
card publisher sector is an absolute sector index but the code compared it against a relative index of mifare 4k sectors
2025-06-07 23:04:34 +12:00
iceman1001 3a8c3174a8 text 2025-06-07 12:53:15 +02:00
iceman1001 88593f9b8b updated the ATR list and organized the changelog to prefered style 2025-06-07 12:08:12 +02:00
iceman1001 6fbb13ba41 style 2025-06-07 11:50:03 +02:00
Antiklesys b4edcb9510 Updated hf iclass sim -t 6
Updates to the functionality of iclass sim -t 6 to specifically target the last SIO block and to do it automatically.
It now checks the AIA to determine if the card is SR or SE and adjust the block to jam based on the SIO length declared in block 6 (if SE) or fixed length if SR.
2025-06-07 13:46:19 +08:00
Antiklesys 082bea661d Update cmdhficlass.c
Signed-off-by: Antiklesys <syselkitna@gmail.com>
2025-06-07 02:23:40 +08:00
Antiklesys 94794f7519 Implemented a hf iclass sim variation
hf iclass sim -t 3 variation that glitches specific block responses during read/write operations based on the value of the last byte of block 31.
2025-06-07 02:15:01 +08:00
iceman1001 53e1e32409 text 2025-06-06 19:00:34 +02:00
iceman1001 23338b3f39 text 2025-06-06 17:55:46 +02:00
iceman1001 f41d6fad53 style 2025-06-06 13:27:02 +02:00
Antiklesys e68be39a41 Updated hf iclass legrec to be able to use shorter delays
Added an option for hf iclass legrec to further increase speeds by using a shorter delay of 1500 vs the default of 3390.
This seems to be stable on new silicon especially now that we're keeping the field always on.
It may be more risky for the --fast operation.
2025-06-06 16:06:53 +08:00
Antiklesys 566d9957a8 Update cmdhficlass.c
Signed-off-by: Antiklesys <syselkitna@gmail.com>
2025-06-06 12:07:13 +08:00
Antiklesys 6a9c3d4dcd Update cmdhficlass.c
Signed-off-by: Antiklesys <syselkitna@gmail.com>
2025-06-06 12:03:15 +08:00
Antiklesys a79b1b9e82 Update cmdhficlass.c
Signed-off-by: Antiklesys <syselkitna@gmail.com>
2025-06-06 11:34:23 +08:00
Antiklesys 411c684e6a Implemented working multithreading support in hf iclass legbrute
Implemented key nibble based multithreading support for hf iclass legbrute.
It takes the whole iclass keyspace based on the first 4 bits of the key value (from 0x0 to 0xF) and divides it across the number of available threads.

E.g. on a 8 threads implementation:
- thread 1 will test keys starting with 0x0 onwards
- thread 2 will test keys starting with 0x2 onwards
- thread 3 will test keys starting with 0x4 onwards
- thread 4 will test keys starting with 0x6 onwards
- thread 5 will test keys starting with 0x8 onwards
- thread 6 will test keys starting with 0xA onwards
- thread 7 will test keys starting with 0xC onwards
- thread 8 will test keys starting with 0XE onwards
2025-06-06 11:25:46 +08:00
Antiklesys ab84cb459a Update cmdhficlass.c
Signed-off-by: Antiklesys <syselkitna@gmail.com>
2025-06-05 20:57:47 +08:00
Antiklesys 083a9ce945 Updated hf iclass legrec with a fast option and improved AA2 selection
1- Added a --fast option for hf iclass legrec that further increases the speed from 4.6 key updates/second to 7.4 key updates/second. This is achieved by skipping some safety checks and is a very fast but more risky operation.
2- Automated AA2 block selection based on the values in the config block
3- Other minor code cleanups
2025-06-05 20:44:58 +08:00
Antiklesys 82268b9a69 Fixed loclass --test
Updated code to fix loclass --test function now that iclass_key.bin is no longer in the repository as the master key has been added in the code.
2025-06-05 17:37:22 +08:00
iceman1001 186ed6fb07 make style 2025-06-04 18:05:30 +02:00
Antiklesys d654f6e78f Improved hf iclass legrec speed
Improved the speed of hficlass legrec from 7200 keys / hrs to 17800 keys / hr by removing the need to drop the field and re-select, re-authenticate with the card at every loop.
Re-select and re-authenticate will still happen if there's a read error and a loop needs to be repeated.
2025-06-04 22:34:28 +08:00
Antiklesys 296c375092 Updated hf iclass tearoff
1- Automated tearoff for epurse without needing to pass the block data (manual mode still available)
2- Improved read loop of original values (to reduce instances in which the block appears zeroed out)
3- Added a "fault tolerance" system to increase the threshold of read errors for old silicon cards before being shown to the user
4- Removed auth requirement to read blocks below 3
2025-06-02 15:52:20 +08:00
iceman1001 810eaeac25 string trimming 2025-06-01 14:37:55 +02:00
Antiklesys 2b2a1cc0a2 Updated hf iclass legrec
Updated hf iclass legrec to support pm3 button interrupt for user abort
Cleaned up messaging to look more neat and tidy during the process
2025-05-31 14:09:00 +08:00
Antiklesys c32f655023 Improved hf iclass tear erase phase readability
Improved readability of erase phase during iclass tear (client and arm side).
It is redundant to see a list of FF during the erase phase (which can be pretty lengthy), so it will only show it once when all bits are FF and then will resume printing the moment bits start changing again post erase phase.
2025-05-30 13:00:35 +08:00
Antiklesys 04cfe2a43e Modified iclass recover operations
1- Renamed legreclookup to legbrute to be in line with the command name
2- Updated estimate values with speed increase gains
3- Improved some if statements readability in iclass.c and added start_time = eof_time + DELAY_ICLASS_VICC_TO_VCD_READER; to increase speed by ~8% (1.86 loops per second to 2.01 loops per second = ~560 more loops per hour).

Tried disabling some arm communications/comments but the speed increase was negligible (~1 sec / 1000 updates).
2025-05-30 12:36:42 +08:00
iceman1001 83837699e1 text , but the ultralight detect in 14a info is a bit confusing. This PR was intended to make it more clear. We still need to improve the text output 2025-05-30 01:38:55 +02:00
iceman1001 804acfbefa the device side of iclass tear off is implemented. The base was done by @antiklesys. This version differs by the concept of trying to stabilize weak bits by performing a write operation in conjuction with the detected tear. Its untested but I can replicate most of the tears we performed client side. You will need to call the proxmark3 client with -f , ./pm3 -f to force flush out text which is needed for the inplace printing. I thought this was done automatically but it wasnt. hf iclass tear --arm + all the normal params to run on device side 2025-05-30 01:37:13 +02:00
iceman1001 f0022e4280 text 2025-05-29 14:52:49 +02:00
iceman1001 7b9fe29cf3 hf iclass info - show AA2 key if found 2025-05-29 11:05:52 +02:00
iceman1001 18e4c072e7 style 2025-05-28 20:54:05 +02:00
iceman1001 a223570dbf hf iclass tear - only inform about read failures and keep on, instead of quiting command 2025-05-28 20:52:51 +02:00
iceman1001 0479a1b82e text 2025-05-28 20:52:14 +02:00
Iceman 490c211361 Merge branch 'master' into bl
Signed-off-by: Iceman <iceman@iuse.se>
2025-05-28 18:10:16 +02:00
Iceman 9287e872f1 Merge pull request #2865 from Arkwin/patch-2
Saflok Parsing
2025-05-28 18:09:13 +02:00
Antiklesys bbd6f51586 Updated hf iclass info for silicon check
Updated hf iclass info to use silicone identification based on CSN rather than hf 14b responsiveness
This reverted https://github.com/RfidResearchGroup/proxmark3/commit/4f85def6b07ad9cefe78d9bd11b18f14fad5dcb7
2025-05-28 23:59:17 +08:00
iceman1001 ada340de94 fix exit call 2025-05-27 14:52:04 +02:00
iceman1001 01e57db5f1 text 2025-05-27 10:12:58 +02:00
iceman1001 585670d55c hf iclass tear - text output and when e-purse get cleared it stops and informs user 2025-05-27 09:44:27 +02:00
Kara Zajac e35a4e292d Used make style
Fixed some code comments and ran make style

Signed-off-by: Kara Zajac <Arkwin.Advanced@gmail.com>
2025-05-26 23:39:25 -04:00
Kara Zajac 176b543069 Saflok Parsing
Added when a Saflok card is detected, it decrypts and parses the data, outputting it to the screen.

Previous security researchers did this work, and I merely adapted it from the Flipper Zero code to the Proxmark3 code.

Their info is below:

// Decryption and parsing from: https://gitee.com/wangshuoyue/unsaflok
// Decryption algorithm and parsing published by Shuoyue Wang
// Parsing also inspired by Lennert Wouters and Ian Carroll's DEFCON 32 talk
// https://defcon.org/html/defcon-32/dc-32-speakers.html
// FZ parser by @Torron, with help from @xtruan, @zacharyweiss, @evilmog and kara (@Arkwin)

Signed-off-by: Kara Zajac <Arkwin.Advanced@gmail.com>
2025-05-26 15:46:23 -04:00
Antiklesys b378a369d1 Updated hf iclass tear to break endless read loop
Updated hf iclass tear to break endless read loop when the card can't be read anymore during the tear operation. Set a 10 attempts limit.
2025-05-26 23:53:33 +08:00
Antiklesys 23928b4041 Updated hf iclass tear
Updated hf iclass tear with the following improvements:

1- Show failed read if ran in verbose mode
2- Improved out logic when tearing block 1
3- Showing fuses comparison table when tearoff affects block 1 fuses
2025-05-26 16:01:06 +08:00
iceman1001 b8e8c41f28 fix the cut of version and git sha-hash 2025-05-25 20:29:15 +02:00