NFCGate is an Android application meant to capture, analyze, or modify NFC traffic. It can be used as a researching tool to reverse engineer protocols or assess the security of protocols against traffic modifications.
Features
Requirements For Specific Modes
Usage
Building
git submodule update --init
Operating Modes
As instructions differ per mode, each mode is described in detail in its own document in doc/mode/
:
Pcapng Export
Captured traffic can be exported in or imported from the pcapng file format. For example, Wireshark can be used to further analyze NFC traffic. A detailed description of the import and export functionality is documented in doc/pcapng.md.
Compatibility
NFCGate provides an in-app status check. For further notes on compatibility see the compatibility document.
Known Issues & Caveats
Please consider the following issues and caveats before using the application (and especially before filing a bug report).
NFC Stack
When using modes, that utilize HCE, the phone has to implement the NFC Controller Interface (NCI) specification. Most of the phones should implement this specification when offering HCE support.
Confidentiality of Data Channel (relay)
Right now, all data in relay mode is sent unencrypted over the network. We may or may not get around to implementing cryptographic protection, but for now, consider everything you send over the network to be readable by anyone interested, unless you use extra protection like VPNs. Keep that in mind while performing your own tests.
Compatibility with Cards (relay, replay, clone)
We can only proxy tags supported by Android. For example, Android no longer offers support for MiFare classic chips, so these cards are not supported. When in doubt, use an application like NFC Tag info to find out if your tag is compatible. Also, at the moment, every tag technology supported by Android’s HCE is supported (A, B, F), however NFC-B and NFC-F remain untested. NFC-A tags are the most common tags (for example, both the MiFare DESFire and specialized chips like the ones in electronic passports use NFC-A), but you may experience problems if you use other tags.
Compatibility with readers (relay)
This application only works with readers which do not implement additional security measures. One security measure which will prevent our application from working in relay mode is when the reader checks the time it takes the card to respond (or, to use the more general case, if the reader implements “distance bounding”). The network transmission adds a noticeable delay to any transaction, so any secure reader will not accept our proxied replies.
This does not affect other operating modes.
Android NFC limitations (relay, replay)
Some features of NFC are not supported by Android and thus cannot be used with our application. We have experienced cases where the NFC field generated by the phone was not strong enough to properly power more advanced features of some NFC chips (e.g. cryptographic operations). Keep this in mind if you are testing chips we have not experimented with.
Publications & Media
This application was presented at the 14th USENIX Workshop on Offensive Technologies (WOOT ’20). An arXiv preprint can be found here.
An early version of this application was presented at WiSec 2015. The extended Abstract and poster can be found on the website of one of the authors. It was also presented in a brief Lightning Talk at the Chaos Communication Camp 2015.
Reference Our Project
Any use of this project which results in an academic publication or other publication which includes a bibliography should include a citation to NFCGate:
@inproceedings {257188, author = {Steffen Klee and Alexandros Roussos and Max Maass and Matthias Hollick}, title = {NFCGate: Opening the Door for {NFC} Security Research with a Smartphone-Based Toolkit}, booktitle = {14th {USENIX} Workshop on Offensive Technologies ({WOOT} 20)}, year = {2020}, url = {https://www.usenix.org/conference/woot20/presentation/klee}, publisher = {{USENIX} Association}, month = aug, }
shadow-rs is a Windows kernel rootkit written in Rust, demonstrating advanced techniques for kernel manipulation…
Extract and execute a PE embedded within a PNG file using an LNK file. The…
Embark on the journey of becoming a certified Red Team professional with our definitive guide.…
This repository contains proof of concept exploits for CVE-2024-5836 and CVE-2024-6778, which are vulnerabilities within…
This took me like 4 days (+2 days for an update), but I got it…
MaLDAPtive is a framework for LDAP SearchFilter parsing, obfuscation, deobfuscation and detection. Its foundation is…