Commit Graph
100 Commits
Author SHA1 Message Date
Antiklesys 75c3ce61dd Update iclass.c
Fixed correctly, in the previous fix I'm checking the length of the mac, but the mac is always 4 0 bytes (set from client side as part of the variable size) and the only actual check happens on client side. I'll have to check for the mac value to be != from 00000000
2025-07-05 19:35:41 +08:00
Antiklesys 33c3988a94 Fix broken older functionality
Updated to still maintain older functionality when the macs field is passed
2025-07-05 19:26:22 +08:00
Antiklesys 7ad3f6eaf2 Updated hf iclass wrbl replay
replay behavior to use privilege escalation instead of having to generate specific block/content macs for hf iclass wrbl
2025-07-05 13:25:18 +08:00
Antiklesys f5e61410c6 Fixing style fix
Fixing https://github.com/Antiklesys/proxmark3/commit/24d80f51a9fd88d8125220dc60000e4ac09a9457 where an AND was switched to an OR
2025-07-04 18:37:46 +08:00
Antiklesys f5820999b4 Update iclass.c
Signed-off-by: Antiklesys <syselkitna@gmail.com>
2025-07-04 17:52:43 +08:00
Antiklesys 8e4b9b46a0 Update iclass.c
Signed-off-by: Antiklesys <syselkitna@gmail.com>
2025-07-04 17:48:23 +08:00
Antiklesys 649de11a9a Update iclass.c
Signed-off-by: Antiklesys <syselkitna@gmail.com>
2025-07-04 17:28:01 +08:00
Antiklesys f8bd0b4bae Updated iclass restore to support privilege escalation
Updated hf iclass restore to support privilege escalation to restore card's content using a single AA1 --nr mac value. This allows to write cards the debit key is not known.
2025-07-04 16:47:11 +08:00
Antiklesys 0662c1a9c1 Detecting response sc flag in sam response
Added detection for Secure Channel Flag in Sam's response.
2025-07-01 23:53:54 +08:00
Antiklesys 89465db4b1 Update hf iclass unhash to check lsb
Updated hf iclass unhash to check lsb to be 4x 0 and 4x 1.
If it doesn't respect that format it means it never went through hash0 (as hash0 forces the key format to have 4x LSB set to 1 and 4x LSB set to 0) and likely to be an AES based key.
2025-06-27 10:30:40 +08:00
Antiklesys f94a2cb964 Updated sam firmware version to be in decimal digits
Updated sam firmware version to be in decimal digits
2025-06-27 09:55:58 +08:00
Antiklesys 43943ce9a5 Update cmdhficlass.c
Signed-off-by: Antiklesys <syselkitna@gmail.com>
2025-06-20 17:22:14 +08:00
Antiklesys c729c88f1d Renaming and snmp data format option for sam comms
Added ability to pass data to sam directly in snmp format and for the client to calculate the packet headers accordingly.
Renamed ack_mask to ok_mask as that is a generic mask for successful commands, the same bytes are used for multiple types of successful responses.
2025-06-20 17:20:40 +08:00
Antiklesys f5254880b9 Update cmdhficlass.c
Improved code comments

Signed-off-by: Antiklesys <syselkitna@gmail.com>
2025-06-20 12:34:16 +08:00
Antiklesys c504d43398 Update cmdhficlass.c
Signed-off-by: Antiklesys <syselkitna@gmail.com>
2025-06-20 12:32:14 +08:00
Antiklesys e0b1b5b4f8 Update cmdhficlass.c
Fixed indent

Signed-off-by: Antiklesys <syselkitna@gmail.com>
2025-06-20 12:02:25 +08:00
Antiklesys 67fbd6abba Update cmdhficlass.c
Signed-off-by: Antiklesys <syselkitna@gmail.com>
2025-06-20 12:00:41 +08:00
Antiklesys 37166d6c73 Improved sam response processing
Improved sam response processing on client side, it detects when the response contains an error and highlights the error number, detects when the response is an snmp messages and does the asn.1 decoding of the snmp message.
2025-06-20 11:58:32 +08:00
Antiklesys 2ed0c9a301 Update sam_picopass.c
Signed-off-by: Antiklesys <syselkitna@gmail.com>
2025-06-20 01:35:13 +08:00
Antiklesys 80a86e741c Fixed length check for snmp responses
Fixed length check for snmp responses from the sam
2025-06-20 01:31:47 +08:00
Antiklesys 0378d91595 Minor iclass sam comms tweaks
1- Removed timeout on client side to allow the sam to be slow in responding
2- Increased SIM_WAIT_DELAY to allow for bigger sam responses
2025-06-12 19:42:56 +08:00
Antiklesys 5b7e013f1a Update CHANGELOG.md 2025-06-11 01:08:03 +08:00
Antiklesys 7fb5716ea3 Added hf iclass sam --info
Added hf iclass sam --info command that skips any card communication command and just interacts with the SAM to return:

1- Sam Firmware Version
2- Sam Firmware ID
3- Sam Serial Number
2025-06-11 01:06:38 +08:00
Antiklesys b70d462a06 Updated iclass config cards readability
Updated config cards section readability
2025-06-10 01:07:04 +08: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
Antiklesys f49bc8ebaa Update iclass.c
Signed-off-by: Antiklesys <syselkitna@gmail.com>
2025-06-07 17:00:28 +08:00
Antiklesys 606f65496c Update iclass.c
Signed-off-by: Antiklesys <syselkitna@gmail.com>
2025-06-07 16:46:44 +08:00
Antiklesys 9c672d8289 Update iclass.c
Signed-off-by: Antiklesys <syselkitna@gmail.com>
2025-06-07 16:42:49 +08: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 5558db3019 Update iclass_cmd.h
Signed-off-by: Antiklesys <syselkitna@gmail.com>
2025-06-07 02:24:45 +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
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 fd098ba12f Update iclass.c 2025-06-05 21:29:01 +08:00
Antiklesys 7acf507826 Update iclass.c
Minor optimizations to remove duplicate code
2025-06-05 21:18:03 +08:00
Antiklesys ab84cb459a Update cmdhficlass.c
Signed-off-by: Antiklesys <syselkitna@gmail.com>
2025-06-05 20:57:47 +08:00
Antiklesys b46930394a Update CHANGELOG.md 2025-06-05 20:48:45 +08:00
Antiklesys f3404d841c Merge branch 'master' of https://github.com/Antiklesys/proxmark3 2025-06-05 20:45:45 +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
Antiklesys 7225ea6ac4 Update iclass.c
Removed unused value of blockno

Signed-off-by: Antiklesys <syselkitna@gmail.com>
2025-06-04 22:46:44 +08:00
Antiklesys 81d7ac1f59 Update iclass.c
Re-added stop tracing in main loop to avoid crashes

Signed-off-by: Antiklesys <syselkitna@gmail.com>
2025-06-04 22:41:30 +08:00
Antiklesys a5ee3f50b6 Update CHANGELOG.md 2025-06-04 22:35:49 +08: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 a04fa57f86 Fpga images from orca release
Fpga images from orca
2025-06-03 18:09:22 +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
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 23d9783b26 Updated hf iclass legrec
Updated hf iclass legrec:
1- Fixed communication timing inconsistencies by moving away from iclass_writeblock_ext to iclass_writeblock_sp which supports start_time and end_time
2- Reduced number of debug messages being printed

Overall this reduces slightly the speed of the process, but it should make it more stable as the timings are now all correctly being accounted for.
2025-05-31 02:15:13 +08:00
Antiklesys 2105dbc379 Update iclass.c
Clarified what tear success means

Signed-off-by: Antiklesys <syselkitna@gmail.com>
2025-05-30 13:05:25 +08:00
Antiklesys db9667d0fb Update CHANGELOG.md
Signed-off-by: Antiklesys <syselkitna@gmail.com>
2025-05-30 13:02:11 +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
Antiklesys 503c03caa2 Update CHANGELOG.md 2025-05-29 00:00:19 +08: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
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
Antiklesys 1349b6d282 Updated tearoff repeat to not go below original start value and show loop count
Updated tearoff repeat to not go below original start value and show loop count
2025-05-25 21:50:17 +08:00
Antiklesys 8d3e301b55 Updated hf iclass tear to not run if the authentication fuses are blown
Updated hf iclass tear to not run if the authentication fuses are blown.
Or it will just get stuck at the beginning and not start anyway. At least this informs the users why this is happening.
2025-05-25 20:36:35 +08:00
Antiklesys d402903db5 Fixed authentication read for iclass tear
If the card flips to nonsecure mode during the tearoff of block 1, this read command will be stuck.
So we can disable auth completely when trying to read block 1 as that block doesn't require authentication anyway for reading operations.
2025-05-25 17:10:31 +08:00
Antiklesys 45ae30fe88 Updated iclass tear colors
Removed a huge chunk of colorful visual spam for when the tearoff isn't happening
2025-05-24 13:48:52 +08:00
Antiklesys 335c1444bd updated hf iclass trbl to support unsecure page mode
Added unsecure page mode support
2025-05-23 19:06:25 +08:00
Antiklesys 2119e46701 Merge branch 'master' of https://github.com/Antiklesys/proxmark3 2025-05-23 17:11:09 +08:00
Antiklesys 07bfef1550 Bugfixes on hf iclass trbl
Fixed tearoff trigger staying enabled in case of keyboard interruption
2025-05-23 17:11:07 +08:00
Antiklesys 1ca356531e Merge branch 'master' into master
Signed-off-by: Antiklesys <syselkitna@gmail.com>
2025-05-23 17:04:09 +08:00
Antiklesys fbbfeaa977 Update cmdhficlass.c 2025-05-23 17:00:41 +08:00
Antiklesys 047b94fbaa Updated hf iclass trbl to support looping
Implemented a functionality for hf iclass trbl to specify how many times to loop at specific delays.
2025-05-23 16:32:48 +08:00
Antiklesys f9322dfe6c Updated trbl
Fixed a bug preventing tearoff stages from being detected correctly, increased verbosity of read data and granularity of displayed information
2025-05-23 15:55:53 +08:00
Antiklesys 59e4875e6c Updated trbl to support custom increments
Updated iclass tearoff function to support custom delay increments
2025-05-18 20:41:04 +08:00
Antiklesys c156e33ad9 Update CHANGELOG.md 2025-05-18 01:57:59 +08:00
Antiklesys 67fb546887 Update iclass trbl function
Updated trbl function:
1- Better comparison of read values vs expected values
2- Stop on "partial values tearoff", show tearoff results when the block isn't zero, but is also different from the original block (even tho is not yet with the same values of the expected block)
3- Improvement to verbose mode
2025-05-18 01:54:55 +08:00
Antiklesys 23232f8aa3 iclass tearoff attack fixes
Fixed spacing, time unit, and fixed a bug preventing from properly using the credit key.
2025-05-17 23:19:10 +08:00
Antiklesys 3c35a87dee Fix bug with iclass legbrute index value being ignored
Fixed issue https://github.com/RfidResearchGroup/proxmark3/issues/2845
2025-05-16 23:19:26 +08:00
Antiklesys de01578c4b Update cmdhficlass.c
Signed-off-by: Antiklesys <syselkitna@gmail.com>
2024-12-13 16:03:45 +08:00
Antiklesys afed67ca2c Added hf iclass trbl 2024-12-12 18:54:56 +08:00
Antiklesys e4a3a244ce Added unhash instructions after legbrute
Added unhash instructions after legbrute
2024-11-30 07:53:52 +08:00
Antiklesys 2aae3317a0 Added more configcards
Added special config cards:

1- Elite Bugger : bugs the reader causing an erroneous and disruptive behavior
2- Added one config card to change the reader's default master key
3- Added a reset master key config card to restore the reader to the default master key
2024-11-24 13:08:28 +08:00
Antiklesys 2f2667944c Update cmdhficlass.c 2024-11-24 12:59:04 +08:00
Antiklesys a3813e970d Updated legrec functionality to support simulations
Added a functionality to simulate/estimate the key recovery process assuming the card was standard keyed.
2024-11-22 17:45:12 +08:00
Antiklesys c8fd19dd9d Update CHANGELOG.md 2024-11-09 02:33:00 +08:00
Antiklesys d69e04dcbc Updated hf iclass configcard
Documented and added an extensive list of configcards available and functionalities.
- Led Operations (A8 byte) are now fully documented (up from 2)
- Added : Beep Operations
- Elite Key Operations fully documented (3 up from 2)
-Added potential other bytes pending full documentation / discovery
-To Add: Reader Master Key Operations and Erratic Operations

While initially I was trying to maximise backward compatibility with cardhelper, the way its functions were linked and engrained in the code, caused a constant flow of errors and did not allow the flexibility to easily expand the list of cards. Maintaining that code would lead to creating multiple duplicate functions with no real added value perceived (except increased complexity of the code and difficulty to continue maintaining its  backward compatiblity)
2024-11-09 02:31:39 +08:00
Antiklesys 480b632528 Minor hf iclass configcard fixes
Fixed error messaging that was swapped between card key and keyroll key
2024-11-08 01:57:08 +08:00
Antiklesys 0b7d76d7cd Fixed keygen bug in legrec
Fixed legrec bug that was generating blank keys after misalignment in commit: 110dfab668
2024-11-07 19:20:50 +08:00
Antiklesys 110dfab668 Improved algorithm for hf iclass legrec
Improved algorithm for hf iclass legrec by taking in account the hash0 limitations for the ending bits distributions of each key bite, thus reducing the key entropy and number of required tries from 2^24 to almost 2^19
2024-11-06 16:52:48 +08:00
Antiklesys a8204187ab Fixed elite configcard generation
Fixed elite configcard generation. From nfc-iclass and other resources block 13 generation was completely missing.
This resulted in configcards for legacy readers to be working on Rev.A readers but not Rev.C readers when it came to setting elite keys or enabling keyrolling.
2024-11-06 16:38:32 +08:00
Antiklesys 4f85def6b0 Check for silicon version in iclass info
Updated hf iclass info to check whether the card's chipset is old silicon (supporting 14b) or new silicon (without the 14b support)
2024-10-20 12:33:25 +08:00
Antiklesys 3c3041cdee Update CHANGELOG.md
Signed-off-by: Antiklesys <syselkitna@gmail.com>
2024-10-20 11:25:34 +08:00
Antiklesys aa2ddcdee3 Merge branch 'master' of https://github.com/Antiklesys/proxmark3 2024-10-20 11:24:10 +08:00
Antiklesys 53dfcc2569 Update CHANGELOG.md 2024-10-20 11:23:12 +08:00
Antiklesys 88364f6a48 Update iclass.c
Signed-off-by: Antiklesys <syselkitna@gmail.com>
2024-10-20 11:18:50 +08:00
Antiklesys d6f8f9db4a Updated hf iclass legrec arm side and added custom key to dictionary
Updated hf iclass legrec arm functionality
Added new custom standard key to the repository

Todo: Improve keygen algorithm efficiency
2024-10-20 11:16:46 +08:00
Antiklesys dfa5d0c341 Fixed config cards segmentation fault
Fixed segmentation fault error from commit 6264b1df9a when trying to generate config cards.
2024-10-04 12:14:23 +08:00
Antiklesys 992dfdad48 hf iclass unhash improvements
Added more detailed instructions for next steps after unhashing
2024-10-02 00:16:03 +08:00
Antiklesys 190a88c61f Update cmdhficlass.c
Signed-off-by: Antiklesys <syselkitna@gmail.com>
2024-10-01 23:33:35 +08:00
Antiklesys 091b76b163 unhash hints for next steps
Added hints for next steps
2024-10-01 23:32:00 +08:00
Antiklesys 01f5d12259 Update CHANGELOG.md 2024-10-01 11:35:57 +08:00
Antiklesys 6264b1df9a Updated iclass config card generation
Improved config card generation to support using a different key than the default k0 for the card's key
2024-10-01 11:35:17 +08:00