Commit Graph

972 Commits

Author SHA1 Message Date
Willy-JL 3b55bc345b Merge commit '1907f23e5fbc96ab5cfce6d145169a29d8025e89' into mntm-dev 2024-10-31 18:00:06 +00:00
Willy-JL 04360a47cc Merge commit '8427ec0098129a07f985e94248e12205883f2e41' into mntm-dev 2024-10-31 16:22:28 +00:00
WillyJL 1907f23e5f NFC: Add NDEF Parser for MFUL, MFC and SLIX (#3973)
* NFC: Add NDEF Parser for MFUL, MFC and SLIX
* Fix inefficiency in MAD checking
* NFC: NDEF parser less RAM waste for contact vcards
* Fix typo
* Make PVS Happy
* NFC: hide TODO in 3rd party plugin

Co-authored-by: あく <alleteam@gmail.com>
2024-10-31 14:09:13 +09:00
mxcdoam 054efbbb03 NFC: Plaintain parser fix (#3975)
* Quck fix for Plantain 4K tickets: now the balance, trips, dates are available. To do: get rid of mem size check, fix number parsing  for 4B UID cards,  fix validator info and last payment parsing
* 4B UID Quick'n'Dirty fix
* remove unnecessary variables, fbt format

Co-authored-by: あく <alleteam@gmail.com>
2024-10-31 13:33:51 +09:00
tomholford 55d1588356 nfc: add Caltrain zones for Clipper (#3969)
Co-authored-by: tomholford <tomholford@users.noreply.github.com>
Co-authored-by: あく <alleteam@gmail.com>
2024-10-31 13:27:04 +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
Willy-JL 4b8b27954b Merge remote-tracking branch 'ul/dev' into mntm-dev 2024-10-29 02:15:59 +00:00
MX ed57ddb14b NFC: Plaintain parser fix
by mxcdoam
https://github.com/flipperdevices/flipperzero-firmware/pull/3975/files
2024-10-29 02:28:33 +03:00
MX e7b64c843c upd manifest 2024-10-28 22:50:07 +03:00
MX 3d52187aa9 ndef parser updates
by luu176 and Willy-JL
2024-10-28 22:45:02 +03:00
Willy-JL 2788ae14a6 Fix typo 2024-10-27 03:59:39 +00:00
Willy-JL ef2dd08b71 NFC: NDEF parser less RAM waste for contact vcards 2024-10-27 03:57:19 +00:00
WillyJL a50ae0a604 NFC: NDEF Parser SLIX support (#278)
* Simpler protocol check

* Simplify header code

* Minor code fixes

* NFC: NDEF Parser SLIX support

* Parse success even without TLV terminator

* Also parse empty NDEF TLVs

* Add NDEF_PROTO_RAW to feed data manually

* Update changelog

* Ordering

* Comment changes

* Fix inefficiency in MAD checking
2024-10-26 03:48:33 +02:00
Willy-JL 7cc71b390f Merge remote-tracking branch 'xero/dev' into mntm-dev 2024-10-26 01:45:01 +01:00
noproto 6dbb46a81d Fix issue with resume logic 2024-10-25 18:38:11 -04:00
MX e7239f6e8b Merge remote-tracking branch 'noproto/nestednonces' into dev 2024-10-26 01:37:44 +03:00
WillyJL e1fdc5e984 NFC: NDEF SmartPoster support (#275)
* NFC: NDEF SmartPoster support

* Consistent naming

* Nicer result output

* Update changelog
2024-10-25 04:20:53 +02:00
Luu 8174ffa5b3 NFC: NDEF parser Mifare Classic support, protocol-agnostic refactor and more improvements (#265)
* Update ndef.c

included mifare classic support

* Update application.fam

* Update ndef.c

* Update ndef.c

* Update ndef.c

* Update ndef.c

* Update ndef.c for better parsing

Because mifare classic 1k has a sector trailer, the ndef parser might conflict with it if the payload is long enough or if there's too many payloads. This code removes all sector trailer in a new buffer and uses that for parsing without any problems.

* Rewrite NDEF as protocol agnostic

* Move type name buffer to stack when possible

* Parse URI without heap buffer

* Reduce binary sizes by using preprocessor defines

* Parse MFC without clone buffer and support MAD2

* Keep message count between different TLVs

* Simplify macro check

* Simplify length conversion

* Improve output of unparsed types

* Add some more logging

* Fix WiFi parsing

* Check MAD key before reading

* Rename ndef_read() to ndef_get()

* Update changelog

* Wording

---------

Co-authored-by: Willy-JL <49810075+Willy-JL@users.noreply.github.com>
2024-10-24 07:55:47 +02:00
Nathan N 47637621a7 Merge branch 'dev' into nestednonces 2024-10-22 09:52:25 -04:00
Willy-JL 0afbbf2e61 Merge remote-tracking branch 'ofw/dev' into mntm-dev 2024-10-22 03:33:47 +01:00
MX b0e591601c upd ndef parser
by jaylikesbunda and Willy-JL
2024-10-22 02:37:04 +03:00
MX fc16978be5 Merge remote-tracking branch 'OFW/dev' into dev [ci skip] 2024-10-22 02:28:24 +03:00
Zinong Li f8fa71c575 NFC TRT Parser: Additional checks to prevent false positives (#3966)
* additional checks to prevent false positives
* Update trt.c

Co-authored-by: あく <alleteam@gmail.com>
2024-10-20 16:58:33 +01:00
jay candel 7ebbadfbf8 NFC: Improve URI decoding in NDEF parser (#267)
* add decode_char

* Skip double malloc(), can just tell printf() how long the string is

* Decode URI within the same buffer

* Only decode if next 2 chars are valid hex

* Update changelog

* Clearer code for hex decode

Co-authored-by: jaylikesbunda <jaylikesbunda@users.noreply.github.com>

---------

Co-authored-by: Willy-JL <49810075+Willy-JL@users.noreply.github.com>
Co-authored-by: jaylikesbunda <jaylikesbunda@users.noreply.github.com>
2024-10-20 07:28:10 +02:00
Willy-JL b4c035d933 Merge remote-tracking branch 'ofw/dev' into js-backport-of-backport 2024-10-16 18:26:38 +01:00
あく 2bc02c0962 Merge branch 'dev' into nestednonces 2024-10-16 18:07:13 +01:00
MX 5434405c34 Merge remote-tracking branch 'OFW/dev' into dev 2024-10-16 19:46:06 +03:00
Zinong Li 1dd7ebd059 NFC Parser for Tianjin Railway Transit (#3954) 2024-10-16 16:38:07 +01:00
Willy-JL 2f6faa1b7b Merge remote-tracking branch 'ul/dev' into mntm-dev 2024-10-16 00:56:19 +01:00
Willy-JL 97d58c500f Merge remote-tracking branch 'ofw/dev' into mntm-dev 2024-10-15 23:49:41 +01:00
Willy-JL 88dfe97a89 Merge remote-tracking branch 'ofw/dev' into mntm-dev 2024-10-15 23:43:33 +01:00
MX 7415873449 add new nfc key [ci skip] 2024-10-16 01:30:19 +03:00
MX 7de26fb99b Merge remote-tracking branch 'OFW/dev' into dev 2024-10-16 01:06:19 +03:00
Zinong Li dc9548d0dc New Static Keys for Mifare Classic Dictionary (#3947)
Co-authored-by: あく <alleteam@gmail.com>
2024-10-15 18:17:33 +01:00
MX 4b9b1769f7 Merge remote-tracking branch 'OFW/dev' into dev 2024-10-15 00:08:47 +03:00
あく 02f7c6b421 Merge branch 'dev' into nestednonces 2024-10-14 21:06:56 +01:00
Zinong Li fbc3b494b7 NFC: H World Hotel Chain Room Key Parser (#3946)
* quick and easy implementation
* delete debug artifacts
* log level correction (warning -> info)
2024-10-14 21:05:24 +01:00
Willy-JL 806fd93b38 Merge branch 'nestednonces' into mntm-dev 2024-10-13 01:01:01 +01:00
MX 38889a434c Merge remote-tracking branch 'noproto/nestednonces' into dev 2024-10-11 21:13:50 +03:00
Nathan N 540478855c Merge branch 'dev' into nestednonces 2024-10-11 10:00:44 -04: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
Willy-JL c52e7a8107 Merge remote-tracking branch 'ofw/dev' into mntm-dev 2024-10-10 01:23:38 +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 af86cb2b83 Merge remote-tracking branch 'OFW/dev' into dev [ci skip] 2024-10-09 20:01:34 +03:00
ted-logan 344118c346 nfc/clipper: Update BART station codes (#3937)
In the NFC Clipper card plugin, update the BART station codes for two
newer East Bay stations (Milpitas, and Berryessa/North San Jose), and
correct the station code for Castro Valley. These station ids come from
visiting the stations and checking what id they presented as in the
Clipper card data.
2024-10-09 10:47:19 +01: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