Commit Graph

452 Commits

Author SHA1 Message Date
Willy-JL 661a467ff7 Merge remote-tracking branch 'ofw/dev' into mntm-dev 2024-12-10 04:07:07 +00:00
Luu c3dc9e1ec2 Fix typo for mf_classic_key_cahce_get_next_key() function (#4015)
* Update mf_classic_key_cache.c
* Update mf_classic_key_cache.h
* Update mf_classic.c
* Update nfc_scene_mf_classic_update_initial.c

Co-authored-by: あく <alleteam@gmail.com>
2024-12-02 16:27:16 +09:00
Willy-JL 04360a47cc Merge commit '8427ec0098129a07f985e94248e12205883f2e41' into mntm-dev 2024-10-31 16:22:28 +00:00
Nathan N 8427ec0098 MIFARE Classic Key Recovery Improvements (#3822)
* Initial structure for nonce collection
* Nonce logging
* Dictionary attack structure
* Fix compilation
* Identified method to reduce candidate states
* Use EXT_PATH instead of ANY_PATH
* Use median calibrated distance, collect parity bits
* Modify parity collection
* Fixed parity bit collection
* Add note to fix nonce logging
* Fix nonce logging
* Clean redundant code
* Fix valid_nonce
* First attempt disambiguous nonce implementation
* FM11RF08S backdoor detection
* Initial accelerated dictionary attack for weak PRNGs
* Refactor to nested dictionary attack
* Renaming some variables
* Hard PRNG support for accelerated dictionary attack
* Update found keys, initial attempt
* Update found keys, second attempt
* Code cleanup
* Misc bugfixes
* Only use dicts in search_dicts_for_nonce_key if we have them
* Collect nonces again
* Should be detecting both backdoors now
* Relocate backdoor detection
* Hardnested support
* Fix regression for regular nested attack
* Backdoor read
* Backdoor working up to calibration
* Backdoor nested calibration
* Don't recalibrate hard PRNG tags
* Static encrypted nonce collection
* Update TODO
* NFC app UI updates, MVP
* Bump f18 API version (all functions are NFC related)
* Add new backdoor key, fix UI status update carrying over from previous read
* Clear TODO line
* Fix v1/v2 backdoor nonce collection
* Speed up backdoor detection, alert on new backdoor
* Add additional condition to backdoor check
* I'll try freeing memory, that's a good trick!
* Do not enter nested attack if card is already finished
* Do not reset the poller between collected nonces
* Clean up various issues
* Fix Hardnested sector/key type logging
* Add nested_target_key 64 to TODO
* Implement progress bar for upgraded attacks in NFC app
* Typo
* Zero nested_target_key and msb_count on exit
* Note TODO (malloc)
* Dismiss duplicate nonces
* Fix calibration (ensure values are within 3 standard deviations)
* Log static
* No nested dictionary attack re-entry
* Note minor inefficiency
* Uniformly use crypto1_ prefix for symbols in Crypto1 API
* Fix include paths
* Fix include paths cont
* Support CUID dictionary
* Fix log levels
* Avoid storage errors, clean up temporary files
* Handle invalid key candidates
* Fix memory leak in static encrypted attack
* Fix memory leak, use COUNT_OF macro
* Use single call to free FuriString
* Refactor enums to avoid redefinition
* Fix multiple crashes and state machine logic
* Fix inconsistent assignment of known key and known key type/sector
* Backdoor known key logic still needs the current key
* Larger data type for 4K support
* Fix typo
* Fix issue with resume logic
* Mark TODOs for next PR
* Remove redundant assignment
* Fix size_t format specifier
* Simplify auth_passed condition

Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
Co-authored-by: gornekich <n.gorbadey@gmail.com>
2024-10-31 09:53:58 +09:00
Willy-JL 806fd93b38 Merge branch 'nestednonces' into mntm-dev 2024-10-13 01:01:01 +01:00
noproto a7c0819034 Refactor enums to avoid redefinition 2024-10-11 10:01:30 -04:00
Willy-JL 3aca32c497 Merge remote-tracking branch 'ul/dev' into mntm-dev 2024-10-10 01:34:28 +01:00
MX 1030574187 Merge remote-tracking branch 'noproto/nestednonces' into dev 2024-10-09 23:13:22 +03:00
noproto 3976f128dc Use single call to free FuriString 2024-10-09 16:03:29 -04:00
noproto b843856976 Fix memory leak, use COUNT_OF macro 2024-10-09 15:51:21 -04:00
MX 3ee8e3b18b Merge remote-tracking branch 'noproto/nestednonces' into dev 2024-10-09 10:49:54 +03:00
Willy-JL 34d4ef0366 Merge branch 'nestednonces' into mntm-dev 2024-10-09 02:48:00 +01:00
noproto a1590fc74a Fix memory leak in static encrypted attack 2024-10-08 18:46:59 -04:00
Willy-JL ba605e1c03 Merge remote-tracking branch 'ul/dev' into mntm-dev
Only partially merged 1ceb1eb256 and 09d6e4ee30
Changes to login in cc1101_ext.c and adding setting are ignored
2024-10-07 04:00:01 +01:00
MX 54ad331c4c rename extract mf keys to extract MFC keys
because its used only for mifare classic, not for plus etc..
2024-10-05 07:04:21 +03:00
MX 9bb3853c80 Merge remote-tracking branch 'noproto/nestednonces' into dev 2024-10-05 05:02:08 +03:00
Willy-JL 05de1e2b2f Merge branch 'nestednonces' into mntm-dev 2024-10-05 01:06:38 +01:00
noproto 4f722a00c0 Avoid storage errors, clean up temporary files 2024-10-04 18:41:29 -04:00
Willy-JL 448be96e0f Merge branch 'nestednonces' into ofw-3822-nestednonces 2024-09-27 02:38:59 +01:00
noproto ba672e775f Support CUID dictionary 2024-09-25 10:27:32 -04:00
Willy-JL ae3b2d40e4 Merge branch 'nestednonces' into ofw-3822-nestednonces 2024-09-24 05:56:21 +01:00
noproto cd76926c74 Note minor inefficiency 2024-09-23 19:13:20 -04:00
noproto 6ae950673e No nested dictionary attack re-entry 2024-09-23 19:06:08 -04:00
noproto 6eccdc8f93 Zero nested_target_key and msb_count on exit 2024-09-20 11:53:04 -04:00
noproto 96606dc36f Typo 2024-09-18 12:52:22 -04:00
noproto c1cdd491a6 Implement progress bar for upgraded attacks in NFC app 2024-09-18 12:51:48 -04:00
Willy-JL baf14be587 Merge branch 'nestednonces' into ofw-3822-nestednonces 2024-09-10 20:34:33 +02:00
Willy-JL 777ab46ddf Merge remote-tracking branch 'mntm/dev' into ofw-3822-nestednonces 2024-09-10 20:34:12 +02:00
noproto ab8bc3e21c Clear TODO line 2024-09-09 20:51:51 -04:00
noproto cba58ed437 Add new backdoor key, fix UI status update carrying over from previous read 2024-09-09 20:50:15 -04:00
Willy-JL e282d8050f Merge remote-tracking branch 'ofw/dev' into mntm-dev 2024-09-09 23:20:14 +02:00
gornekich 9558a5fa08 Merge branch 'dev' into nestednonces 2024-09-09 13:34:47 +01:00
MX 7711b2daae Merge remote-tracking branch 'OFW/dev' into dev 2024-09-09 04:11:35 +03:00
Eric Betts 75f4782fab Rename 'Detect Reader' to 'Extract MF Keys' (#3874)
* Rename 'Detect Reader' to 'Collect Nonces'
* Updated name
* Updated name
* Format Sources

Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
2024-09-08 23:43:14 +01:00
Willy-JL 7f1c048978 Merge branch 'nestednonces' into ofw-3822-nestednonces 2024-09-04 01:30:16 +02:00
noproto 92122b2cdf NFC app UI updates, MVP 2024-09-03 15:19:12 -04:00
noproto 79bc887f95 Initial accelerated dictionary attack for weak PRNGs 2024-08-18 20:38:24 -04:00
MX 856fe752de Merge remote-tracking branch 'OFW/dev' into dev 2024-08-02 11:09:56 +03:00
Willy-JL e5ccb3821e Merge remote-tracking branch 'ofw/dev' into mntm-dev 2024-08-01 00:05:36 +02:00
Astra f73d60cba8 [FL-3766] Refactor detected protocols list (#3809)
* Refactor detected protocols list
* nfc app: fix detect protocols file name
* nfc app: fix function naming
* nfc app: fix detected protocol menu selection

Co-authored-by: hedger <hedger@users.noreply.github.com>
Co-authored-by: あく <alleteam@gmail.com>
Co-authored-by: gornekich <n.gorbadey@gmail.com>
2024-08-01 06:37:37 +09:00
Willy-JL 02f7207d28 Merge remote-tracking branch 'ofw/dev' into mntm-dev 2024-07-15 22:18:35 +01:00
MX 726cb770d0 formatting 2024-07-15 20:02:45 +03:00
hedger ffa3996a5e [FL-3867] Code formatting update (#3765)
* clang-format: AllowShortEnumsOnASingleLine: false
* clang-format: InsertNewlineAtEOF: true
* clang-format: Standard:        c++20
* clang-format: AlignConsecutiveBitFields
* clang-format: AlignConsecutiveMacros
* clang-format: RemoveParentheses: ReturnStatement
* clang-format: RemoveSemicolon: true
* Restored RemoveParentheses: Leave, retained general changes for it
* formatting: fixed logging TAGs
* Formatting update for dev

Co-authored-by: あく <alleteam@gmail.com>
2024-07-15 13:38:49 +09:00
MX 842922f018 Merge remote-tracking branch 'OFW/dev' into dev [ci skip] 2024-07-04 04:56:04 +03:00
Willy-JL 7ef699d9f6 Merge branch 'dev' of https://github.com/flipperdevices/flipperzero-firmware into mntm-dev 2024-07-04 00:08:00 +02:00
RebornedBrain 3224401479 [FL-3835] Ultralight C authentication with des key (#3720)
* Update api_symbols.csv
* Ultralight C 3des implementation added
* Access check for Ultralight cards is now splitted into 2 functions one for ULC card and another for common
* Ultralight C authentication command handlers added
* Update api_symbols.csv and api_symbols.csv
* Length added to ultralight encrypt function
* New structure for storing 3des key added
* Reseting of 3des_key added
* des_context init/deinit added to poller
* New poller step for ultralight c auth added
* Added ultralight c des key to application
* Renamed felica unlock scenes to more generic des auth scenes, because they are now used also for ultralight c
* Show different menus for different ultralight card types
* Update api_symbols.csv and api_symbols.csv
* Some macro defines added
* Different amount of pages will be now read for ultralight C and others
* New unit test for ultralight C
* Some comments and macro replacements
* New function added to api
* Now all data read checks mfulC separately
* Adjusted listener to handle missing 3des_key properly
* Now poller populates 3des_key after reading with auth to card data
* Nfc: rename _3des_key to tdes_key
* Bump API Symbols
* Mute PVS Warnings

Co-authored-by: hedger <hedger@users.noreply.github.com>
Co-authored-by: gornekich <n.gorbadey@gmail.com>
Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
2024-07-03 12:38:30 +01:00
Willy-JL 2d2b0f8201 Merge branch 'dev' of https://github.com/flipperdevices/flipperzero-firmware into mntm-dev --nobuild 2024-07-01 23:01:37 +02:00
MX 0812cd30b2 Merge remote-tracking branch 'OFW/dev' into dev 2024-07-01 22:18:36 +03:00
Astra 0b2827836d [FL-3860] Update link to mfkey32 (#3738)
Co-authored-by: あく <alleteam@gmail.com>
2024-06-30 11:54:59 +01:00
Willy-JL 1d41944182 NFC: EMV Transactions less nested, hide if unavailable 2024-06-26 03:21:37 +02:00