Commit Graph
313 Commits
Author SHA1 Message Date
iceman1001 71c86f4b21 style 2024-09-30 10:36:29 +02:00
Antiklesys d5469d567f Added hf iclass unhash
Added hf iclass unhash based on the document "Exposing iClass Key Diversification"
The command works but only handles the "main" scenarios, retrieving only 8/512 potential hash0 pre-images.
Handling of the additional pre-images is still work in progress.
2024-09-29 21:38:20 +08:00
Antiklesys b92e357307 Update cmdhficlass.c
Signed-off-by: Antiklesys <syselkitna@gmail.com>
2024-09-18 23:18:30 +08:00
Antiklesys 47dc372ca7 Update cmdhficlass.c 2024-09-18 23:16:42 +08:00
Antiklesys 90b05106f8 Updates to iclass legrec and legbrute
Streamlined legbrute to remove then need for CSN and validate variables accuracy as per Iceman's suggestions.
Updated legrec (client side only) for the future arm side PR
Fixed variable overflow on the arm side for hex conversions
2024-09-18 18:10:53 +08:00
Antiklesys ac0260570a Update cmdhficlass.c
Signed-off-by: Antiklesys <syselkitna@gmail.com>
2024-09-17 16:35:52 +08:00
Antiklesys f24b087c19 Update cmdhficlass.c
Signed-off-by: Antiklesys <syselkitna@gmail.com>
2024-09-17 15:46:33 +08:00
Antiklesys 3c258827e8 Removed unused multithreading functions and updated to uint64_t 2024-09-17 15:35:23 +08:00
Antiklesys f70008bd0c Optimized legbrute
Removed multithreading and bottlenecks in favor of sequentially generated keys.
Multithreading can/should be reimplemented but optimized for keyspaces
2024-09-17 15:08:15 +08:00
Antiklesys 5bbffafe65 Updated hf iclass legbrute
Update legbrute to perform a double check when finding a potentially valid raw key, to ensure that is indeed the raw key and works against multiple macs (for the same epurse values).
2024-09-17 13:01:39 +08:00
Antiklesys 49524575be Update legbrute for even threads
Updated legbrute to use an even number of threads and display the starting key of every key block. Useful in case the operation needs to be halted and resumed
2024-09-17 01:32:44 +08:00
iceman1001 3ea655c86d text 2024-09-15 11:43:05 +02:00
iceman1001 9ebe5ae8dd text 2024-09-14 14:55:23 +02:00
Antiklesys 3253e2c288 Reverted buggy changes to hf iclass dump
Reverted code back to the original as it would "read" a card's AA1 without the correct keys.
2024-09-09 22:46:49 +08:00
Antiklesys 8e961aaa04 Re-fixed indent 2024-09-09 18:01:02 +08:00
Antiklesys 96b1b6d72c Fixed indent
Fixed indent
2024-09-09 17:58:47 +08:00
Antiklesys 041f6244cb Fixed AA2 dump with Kc only
Fixed issue preventing iclass dump to dump AA2 only when only using Kc
2024-09-09 17:54:57 +08:00
iceman1001 7549f53b63 we use calloc 2024-09-06 10:07:06 +02:00
iceman1001 6a95f16102 style and text 2024-08-25 15:17:02 +02:00
Eric Betts e9ff568833 Fix length of credential in hf iclass sam
Signed-off-by: Eric Betts <bettse@fastmail.fm>
2024-08-15 21:19:16 -07:00
Michael Micsen Johannessen Wehus 8c9739d37b Add emulator support for hf iclass encode with --emu flag 2024-08-15 11:41:42 -07:00
Michael Micsen Johannessen Wehus bebd1bb654 WIP: Adding --emu functionality to hf iclass encode
For some reason it wipes the entire emu memory
2024-08-15 10:31:01 -07:00
Michael Micsen Johannessen Wehus 9798071ec9 Move argument to where it belongs in the list of args and not just tacked at the bottom 2024-08-15 08:43:28 -07:00
Michael Micsen Johannessen Wehus 22dc41f4ca Add issuance level encoding capability to iclass encode command 2024-08-15 08:29:45 -07:00
Philippe Teuwen ee8b9ca74b make style 2024-08-03 21:21:11 +02:00
Philippe Teuwen 153064ddfa Fix a bunch of potential buffer overruns with CLIGetStrWithReturn :
Most prominent one was "lf pac clone --cn 123456789" causing garbage on the terminal
Some changed code was valid before but as ppl tend to copy-paste to new code,
better to uniformize and document usages of CLIGetStrWithReturn.

Exceptions left are when filling real buffers (bin, raw,...), not strings.
2024-07-30 22:23:04 +02:00
iceman1001 f8db7b185d added support for --ns the nosave flag in hf iclass dump 2024-07-21 16:24:18 +02:00
iceman1001 4de7b7d6b9 style 2024-07-21 16:19:21 +02:00
Antiklesys f8fbcc2754 Bugfixes and code improvements for hf iclass legrec
1- Inlined functions related to hf iclass legrec within util.c for marginal performance gains.
2- Fixed bug preventing errors to be displayed properly and the process from interrupting on an error or on completion.
3- Fixed code indentation of the while loop in iclass.c
4- Fixed bug in the while cycle (was missing index++)
5- Improved ways to display hex results by using dbhexdump
2024-07-21 13:55:17 +08:00
Antiklesys ef2c372380 Update cmdhficlass.c 2024-07-20 01:35:03 +08:00
Antiklesys 1347dd9e74 Update cmdhficlass.c
Removed timeout as we'll definitely go above the timeout timer
2024-07-20 01:26:52 +08:00
Antiklesys ed8a2d330e Update cmdhficlass.c 2024-07-19 18:46:27 +08:00
Antiklesys a127a38cb6 Updated some as per iceman's comments
Made multiple changes as per iceman's comments.
Removed redundant/unused function i forgot into cmdhficlass.c
Moved conversion functions in util.c for now but haven't yet check if it's possible to reuse the current fuctions already there. Will do that in a moment.
2024-07-19 18:27:36 +08:00
Antiklesys 1832997ccb Iclass Legacy Raw Key Recovery Function
Based on the work described in Dismantling iClass whitepaper.
hf iclass legbrute is tested working
hf iclass legrec is partially working: logic of operations and sequence seems to be in order and was tested on simulated data to be effective. The privilege escalation part is still not successful, but the logic should be correct.
2024-07-19 14:47:13 +08:00
Antiklesys fbacd60e41 Implemented VB6 rng for iclass chk elite key search
Implemented VB6 rng for iclass chk elite key search based on @bettse implementation on Flipper Zero Picopass app
2024-07-12 14:46:23 +08:00
Antiklesys 96e3e07faa Implemented VB6 rng for iclass lookup elite key search
Ported @bettse work from the Flipper Zero Picopass repository to use the lookup function with the VB6 rng
2024-07-12 11:18:17 +08:00
Xavier 99a2a37e82 update iclass elite key chk helptext
Signed-off-by: Xavier <90627943+kitsunehunter@users.noreply.github.com>
2024-04-24 21:55:24 -04:00
iceman1001 12e38cdfff text 2024-04-22 09:34:46 +02:00
iceman1001 d58a9ad84e text 2024-02-10 19:07:13 +01:00
iceman1001 0db2d1c92a added lf hitag eview command and unified some command description across the client 2024-01-30 11:02:10 +01:00
iceman1001 41d545f5b8 text 2024-01-25 16:35:20 +01:00
iceman1001 2981dd94f7 had to keep track if the field is on or off on deviceside for 14b raw.\nAdded picopass ISO14443-B anticollision. It allows us to send raw packages over 14b. 2024-01-16 15:12:16 +01:00
iceman1001 97e2d7f026 changed "data num" to accept -r -i parameters where it will reverse or inverse the values.\nrenamed some util functions 2023-12-07 16:44:31 +01:00
iceman1001 a913b2c662 style 2023-12-01 10:59:18 +01:00
nvx 7b0ca43695 Fix iClass dump truncating the AA2 area and improve dump reliability by fixing cmd retry delays. 2023-11-26 19:04:54 +10:00
Philippe Teuwen ba8e90edfd make style 2023-11-11 18:24:34 +01:00
merlokk 910c4d8c92 make style 2023-11-06 00:29:28 +02:00
iceman1001 8f7d7a2dd4 fix mem leak and add new pacs style decoding when reading block 7 2023-11-05 15:30:25 +01:00
iceman1001 eb8c2d1b6a move file operations to fileutils.c 2023-11-05 11:52:12 +01:00
iceman1001 9dba9f275c fix missing return 2023-11-05 02:17:52 +01:00