Commit Graph

178 Commits

Author SHA1 Message Date
noproto 9882c586ae Fix regression, read card. Don't try dict if user chose "Unlock with key". 2025-08-18 02:13:51 -04:00
noproto 374f49319b Fix uninitialized key attempt 2025-08-18 00:21:36 -04:00
noproto 1b88b86a11 Merge remote-tracking branch 'flipperdevices/dev' into ulcdict 2025-08-17 17:54:56 -04:00
WillyJL 8871df863b NFC: Support DESFire Transaction MAC file type (#4159)
* NFC: Support DESFire Transaction MAC file type

* Fix typo

---------

Co-authored-by: hedger <hedger@users.noreply.github.com>
2025-03-31 21:22:16 +04:00
WillyJL 17759a9e4b NFC: Fix crash on ISO15693-3 save when memory is empty or cannot be read (#4165)
* NFC: Possibly fix ISO15693-3 save crash with no data

* Also prevent malloc(0) if block size or count is 0

---------

Co-authored-by: hedger <hedger@users.noreply.github.com>
2025-03-31 20:59:12 +04:00
hedger 5fcaef25b0 Stricter constness for const data (#4126)
* libs: stricter constness for saving RAM with .rodata section; fbt: sdk: fixed signature generation for nested const params

* hal: additional fixes for constness in USB subsystem

* debug apps: additional usb-related fixes

* mjs: more consts for token parser

* fatfs: const driver struct

* hal: more consts for ble & nfc vars

* hal: made FuriHalSpiBusHandle static

* hal: made FuriHalI2cBusHandle static

* usb: restored previous api

* linter fixes

* API fixes
2025-03-31 19:23:32 +04:00
Zinong Li 145184f0f2 NFC: FeliCa Protocol Expose Read Block API and Allow Specifying Service (#4074)
* add one parameter to the rdbl and expose
* Bump api version and format sources

Co-authored-by: あく <alleteam@gmail.com>
2025-02-25 06:07:45 +09:00
Demae 429c0dd387 Added naming for DESFire cards + fix MF3ICD40 cards unable to be read (#4058)
* Fixed MF3ICD40 DESFire cards soft-locking NFC application due to read free memory being an unsupported function, added naming for DESFire cards
* NFC: slightly more granular desfire card type resolution

Co-authored-by: あく <alleteam@gmail.com>
2025-02-13 19:49:53 +09:00
Yukai Li 59fe896ce8 nfc: Enable MFUL sync poller to be provided with passwords (#4050)
* nfc: Enable MFUL sync poller to be provided with passwords
* Sync targret api versions

Co-authored-by: あく <alleteam@gmail.com>
2025-02-13 19:31:56 +09:00
RebornedBrain de85cc7a8e ST25TB poller mode check (#4084)
Co-authored-by: あく <alleteam@gmail.com>
2025-02-13 19:07:03 +09:00
Yukai Li a0d1d3fa0f nfc: Fix MIFARE Plus detection (#4049)
* nfc: Fix MIFARE Plus detection
  MIFARE Plus original doesn't have GetVersion support, so detection for SL2 has been moved. Also, SL2 only exists in MIFARE Plus X, so despite it not being specified in the type identification procedure chart, it's safe to call it for what it is.
* Fix spelling
* TODO: mark as non flipper one

Co-authored-by: あく <alleteam@gmail.com>
2025-01-13 03:15:52 +09:00
Yukai Li 668500e985 nfc: Fix MFUL PWD_AUTH command creation (#4051) 2025-01-10 17:20:34 +09:00
Astra a02781b936 [FL-3920] Fix lost BadBLE keystrokes (#3993)
* WIP: fix lost BadBLE keystrokes
* Switch to semaphores for synchronization
* Move checking to the gap level
* Remove leftovers from hid_service
* Remove more leftovers from hid_service
* De-allocate the semaphore after use
* Change the timeout to account for unforeseen situation
* Update F18 API
* Fix naming and unbump api version
* Move away from semaphores
* Remove the left over include
* Ble: cleanup error handling in ble_gatt_characteristic_update
* Fix PVS warning

Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
2024-12-23 09:18:14 +09:00
noproto 948dffadcc Dictionary attack functional 2024-12-20 18:07:18 -05:00
noproto cc1316303f Merge remote-tracking branch 'noproto/dev' into ulcdict 2024-11-10 17:54:23 -05:00
Mykhailo Shevchuk 4b8a1a4b11 Fixed bug with reading pwd locked MFULs (#3959)
* Fixed bug with reading pwd locked MFULs
* Format sources

Co-authored-by: あく <alleteam@gmail.com>
2024-10-31 20:01:00 +09: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
noproto 0d286e67ce Merge remote-tracking branch 'noproto/dev' into ulcdict 2024-10-28 21:24:23 -04:00
noproto 60e0a697fa Initial structure for UL-C dictionary attacks 2024-10-28 19:56:28 -04:00
noproto 6dbb46a81d Fix issue with resume logic 2024-10-25 18:38:11 -04:00
noproto bf7b91f45f Fix typo 2024-10-23 05:21:43 -04:00
noproto 92aa70ba9d Larger data type for 4K support 2024-10-22 09:54:46 -04:00
noproto db26c85b23 Backdoor known key logic still needs the current key 2024-10-18 00:46:24 -04:00
noproto 897817a829 Fix inconsistent assignment of known key and known key type/sector 2024-10-18 00:33:49 -04:00
noproto 1101748a21 Merge branch 'nestednonces' of https://github.com/noproto/flipperzero-firmware into nestednonces 2024-10-17 19:17:39 -04:00
noproto 4be9e79342 Fix multiple crashes and state machine logic 2024-10-17 19:16:30 -04:00
あく 02f7c6b421 Merge branch 'dev' into nestednonces 2024-10-14 21:06:56 +01:00
hedger 57c438d91a heap: increased size (#3924)
* reduced reserved memory size for system stack; added temporary markup to monitor usage
* fbt: relink elf file on linker script change; removed debug memory fill
* Make PVS Happy
* Make doxygen happy

Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
2024-10-14 19:26:17 +01:00
RebornedBrain 0902fd49e1 NFC: iso14443_4a improvements. Canvas: extended icon draw. (#3918)
* Now 4a listener invokes upper level callback on Halt and FieldOff
* Added new method for drawing mirrored XBM bitmaps
* iso14443_4a poller logic enhanced
* Function renamed accroding to review suggestions
* Rename #2
* Api adjustements
* Correct API bump

Co-authored-by: あく <alleteam@gmail.com>
2024-10-14 18:22:47 +01:00
noproto a7c0819034 Refactor enums to avoid redefinition 2024-10-11 10:01:30 -04:00
noproto b843856976 Fix memory leak, use COUNT_OF macro 2024-10-09 15:51:21 -04:00
noproto a905c1492d Handle invalid key candidates 2024-10-06 16:19:26 -04:00
noproto 00f356469e Fix log levels 2024-10-03 19:27:20 -04:00
noproto ba672e775f Support CUID dictionary 2024-09-25 10:27:32 -04:00
noproto 099bb4071a Fix include paths cont 2024-09-24 22:21:15 -04:00
noproto 61e24fcb13 Fix include paths 2024-09-23 21:55:39 -04:00
noproto 0ba8ac4ed0 Uniformly use crypto1_ prefix for symbols in Crypto1 API 2024-09-23 19:44:08 -04:00
noproto 4eb0f2a21b Log static 2024-09-23 18:03:15 -04:00
noproto 901bdf9692 Fix calibration (ensure values are within 3 standard deviations) 2024-09-23 15:54:50 -04:00
noproto 6a77ab77b0 Dismiss duplicate nonces 2024-09-23 14:26:19 -04:00
noproto c21b35951a Note TODO (malloc) 2024-09-20 13:09:04 -04:00
noproto c1cdd491a6 Implement progress bar for upgraded attacks in NFC app 2024-09-18 12:51:48 -04:00
noproto d8864a490b Add nested_target_key 64 to TODO 2024-09-17 17:40:17 -04:00
noproto 8eae5c0608 Fix Hardnested sector/key type logging 2024-09-17 17:07:31 -04:00
noproto 3ab752b7a0 Clean up various issues 2024-09-17 14:38:14 -04:00
noproto 18f8cfbef0 Do not reset the poller between collected nonces 2024-09-16 05:28:04 -04:00
noproto 8edafa3f39 Do not enter nested attack if card is already finished 2024-09-12 14:28:18 -04:00
noproto 13411da449 I'll try freeing memory, that's a good trick! 2024-09-11 16:22:52 -04:00
Nathan N 8d26636fba Merge branch 'flipperdevices:dev' into nestednonces 2024-09-10 20:13:20 -04:00
noproto ab0debba02 Add additional condition to backdoor check 2024-09-10 19:20:53 -04:00