Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NFC: Improved MFC emulation on some readers #2825

Merged
merged 13 commits into from
Jul 12, 2023

Conversation

AloneLiberty
Copy link
Contributor

@AloneLiberty AloneLiberty commented Jul 1, 2023

What's new

  • HALT don't disable field (because in the real world the card cannot turn itself off)

  • Fixes for faster re-select of card (because we know that in these cases the reader will read again)

  • Removed not particularly necessary warning output, in general improves the emulation (hf mf fchk, Android with different keys)

  • Add trace log if reader send RATS

  • Added check if the block is read, if not, it won't access it (won't reply zeros)

  • Added check if we access a block we're authorized (don't allow access outside current sector)

Verification

  • nfc-mfclassic r a u dump on ACR122U should work now

  • Emulation should work on more Android devices (at least now works on mine)

  • hf mf chk, hf mf fchk and even hf mf hardnested proxmark3 commands works stable

  • Test for regression on other readers

Checklist (For Reviewer)

  • PR has description of feature/bug or link to Confluence/Jira task
  • Description contains actions to verify feature/bugfix
  • I've built this code, uploaded it to the device and verified feature/bugfix

@AloneLiberty AloneLiberty force-pushed the nfc-mfc-emulation-fix branch from 662b2f2 to a198981 Compare July 1, 2023 20:33
@AloneLiberty AloneLiberty marked this pull request as ready for review July 6, 2023 11:06
@giacomoferretti
Copy link
Contributor

Works for me!
Tested on ACR122U, gonna test it soon with MCT on Android.

Should fix #1862 and maybe even #2577.

Copy link
Member

@gornekich gornekich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello @AloneLiberty ! Thanks for PR. Tested it and it works good.

Please, make some changes I mentioned and we will merge your PR

lib/nfc/protocols/mifare_classic.c Outdated Show resolved Hide resolved
lib/nfc/protocols/mifare_classic.c Outdated Show resolved Hide resolved
@AloneLiberty AloneLiberty requested a review from gornekich July 11, 2023 20:39
Copy link
Member

@gornekich gornekich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Core+Services HAL, furi & core system services NFC NFC-related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants