Commit Graph

137 Commits

Author SHA1 Message Date
Willy-JL
e2b7cd2d2c Simplify return here 2025-03-20 05:01:50 +00:00
Willy-JL
3c977b7468 Static define T4T DESFire app ids 2025-03-20 04:24:53 +00:00
Willy-JL
3cffc69cb5 Fix some message strings 2025-03-20 04:23:33 +00:00
Willy-JL
da36d40bd7 NFC: T4T interact with DESFire without state reset 2025-03-20 04:11:11 +00:00
Willy-JL
cc789115dd NFC: Implement DESFire ISO 7816 command wrapping 2025-03-20 04:10:19 +00:00
Willy-JL
19ee0f4598 Rename mf_desfire_send_chunks() to mf_desfire_poller_send_chunks() 2025-03-20 02:50:17 +00:00
Willy-JL
f7198c6105 NFC: Support creating NDEF AID on DESFire 2025-03-19 06:57:05 +00:00
Willy-JL
27c977b7c2 Fix writing with platform detect 2025-03-19 06:05:19 +00:00
Willy-JL
121ce315c1 NFC: Detect Type 4 Tag platform (eg DESFire) 2025-03-18 06:28:04 +00:00
Willy-JL
0af703d5ee NFC: Implement Type 4 Tag writing to initialized tags 2025-03-18 03:56:38 +00:00
Willy-JL
106d72a332 Better handling of read/write failure 2025-03-18 03:46:00 +00:00
Willy-JL
b1346bc9bb Make APDU arrays static 2025-03-18 03:03:31 +00:00
Willy-JL
ca30673238 Improve ISO SELECT naming and handling 2025-03-18 03:01:34 +00:00
Willy-JL
b503020f6d NFC: Implement Type 4 Tag writing biolerplate and structure 2025-03-17 06:46:13 +00:00
Willy-JL
0df5a66b19 Keep prev selection when new selection fails 2025-03-17 06:17:25 +00:00
Willy-JL
22a6c37e20 Refactor ISO APDUs in T4T poller 2025-03-17 06:16:31 +00:00
Willy-JL
967eb06082 NFC: Handle writes to Type 4 Tag while emulating 2025-03-15 05:49:44 +00:00
Willy-JL
7689efa129 Use flags for ISO14443-4 layer decode result 2025-03-15 05:42:57 +00:00
Willy-JL
384f365cff Refactor CC parsing and dumping 2025-03-15 03:08:24 +00:00
Willy-JL
b05a735e8f Allow selecting PICC level too 2025-03-15 03:05:20 +00:00
Willy-JL
799ed9fcaf Fix emulate after save 2025-03-15 02:01:51 +00:00
Willy-JL
084774d9d7 Fix ISO READ BINARY params definitions 2025-03-15 02:00:40 +00:00
Willy-JL
01b113f508 Fix chunk sizes 2025-03-14 23:00:59 +00:00
Willy-JL
e64292d478 NFC: Initial ISO14443-4 PCB listener handling 2025-03-11 08:58:57 +00:00
Willy-JL
99b2762cd9 Fix sending error responses 2025-03-11 03:43:33 +00:00
Willy-JL
2e77e878de Support larger NDEF messages 2025-03-10 11:01:46 +00:00
Willy-JL
d174fa9505 NFC: Implement Type 4 Tag rudimentary emulation 2025-03-10 11:00:15 +00:00
Willy-JL
fbc176eb84 NFC: Rudimentary iso14443_4a_listener_send_block() (no PCB handling) (OFW issue 4059) 2025-03-10 09:13:31 +00:00
Willy-JL
b0690de06a NFC: Expose iso14443_3a_listener functions (OFW issue 4059) 2025-03-10 09:05:05 +00:00
Willy-JL
4dce8790cc Cleanup includes 2025-03-10 04:15:14 +00:00
Willy-JL
385e8b3b1c Add more specific error types 2025-03-10 02:57:01 +00:00
Willy-JL
730f1b6ecf Fix event struct passed to callbacks 2025-03-10 02:23:06 +00:00
Willy-JL
f760d97e62 Sort and add missing protocol mentions 2025-03-09 06:10:36 +00:00
Willy-JL
0beee0c6a7 Fix reading NLEN header in NDEF message 2025-03-06 02:52:02 +00:00
Willy-JL
aa38025977 NFC: Implement Type 4 Tag saving 2025-03-06 02:21:47 +00:00
Willy-JL
d5161f0806 Fix reading empty NDEF message 2025-03-06 01:40:46 +00:00
Willy-JL
358631ec86 NFC: Implement Type 4 Tag reading 2025-03-05 08:10:03 +00: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
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
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
RebornedBrain
5f4f4fcc60 FeliCa anti-collision fix (#3889)
* System code added to felica hal config functions
* Felica sensf_res setup logic adjusted with new struct
* Set api symbols version to 73.0
* Felica unit tests fix
* Furi: prevent use after free on xEventGroupSetBits call

Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
2024-09-09 22:11:53 +01: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