Skip to main content
QUICK REVIEW

[Paper Review] NFCGate: Opening the Door for NFC Security Research with a Smartphone-Based Toolkit

Steffen Klee, Alexandros Roussos|arXiv (Cornell University)|Aug 10, 2020
User Authentication and Security SystemsComputer Science18 references5 citations
TL;DR

NFCGate is a smartphone-based toolkit that transforms off-the-shelf Android devices into powerful NFC security research platforms by enabling in-flight traffic analysis, relay attacks, replay, and on-device traffic capture. The tool allows researchers to analyze and exploit NFC protocols—including those incompatible with Android’s native stack—demonstrated through a case study that uncovered critical vulnerabilities in an enterprise-grade NFC lock, which were responsibly disclosed to the vendor.

ABSTRACT

Near-Field Communication (NFC) is being used in a variety of security-critical applications, from access control to payment systems. However, NFC protocol analysis typically requires expensive or conspicuous dedicated hardware, or is severely limited on smartphones. In 2015, the NFCGate proof of concept aimed at solving this issue by providing capabilities for NFC analysis employing off-the-shelf Android smartphones. In this paper, we present an extended and improved NFC toolkit based on the functionally limited original open-source codebase. With in-flight traffic analysis and modification, relay, and replay features this toolkit turns an off-the-shelf smartphone into a powerful NFC research tool. To support the development of countermeasures against relay attacks, we investigate the latency incurred by NFCGate in different configurations. Our newly implemented features and improvements enable the case study of an award-winning, enterprise-level NFC lock from a well-known European lock vendor, which would otherwise require dedicated hardware. The analysis of the lock reveals several security issues, which were disclosed to the vendor.

Motivation & Objective

  • To address the lack of accessible, affordable, and non-conspicuous tools for NFC protocol analysis.
  • To overcome limitations of Android’s NFC stack, which restricts access to raw APDU traffic and prevents analysis of proprietary or non-standard protocols.
  • To enable active attacks such as relay and replay on NFC-based systems using only off-the-shelf smartphones.
  • To evaluate the latency overhead introduced by the toolkit in real-world attack scenarios.
  • To demonstrate the toolkit’s effectiveness through a real-world case study on a commercially available, security-award-winning NFC lock.

Proposed method

  • Extends the original NFCGate proof of concept with enhanced functionality, including replay of captured NFC traffic and on-device system-wide traffic capture.
  • Implements a Python-based plugin system to enable on-the-fly analysis and modification of NFC traffic during runtime.
  • Uses function hooking on Android to intercept NFC communication at the system level, bypassing Android’s default restrictions on NFC traffic access.
  • Hooks key Android NFC service methods such as NfcService.sendData and HCE’s onHostEmulationData to capture bidirectional APDU traffic.
  • Supports multiple NFC technologies (NFC-A/B/F/V) and enables relay attacks with wormhole-like capabilities by forwarding traffic between devices.
  • Uses pcapng format to export captured traffic for offline analysis with tools like Wireshark and libfreefare for protocol reverse engineering.

Experimental results

Research questions

  • RQ1Can a smartphone-based toolkit effectively enable active NFC protocol analysis without requiring expensive or conspicuous hardware?
  • RQ2To what extent does NFCGate’s operation introduce measurable latency in real-world NFC communication scenarios?
  • RQ3Can NFCGate be used to analyze and exploit proprietary NFC protocols that are incompatible with Android’s standard NFC stack?
  • RQ4What security vulnerabilities can be discovered in real-world, enterprise-grade NFC-based systems using this toolkit?
  • RQ5How effective is the toolkit in supporting the development of countermeasures against relay and replay attacks?

Key findings

  • NFCGate successfully enabled the analysis of an enterprise-grade NFC lock that was not natively compatible with Android’s NFC stack, demonstrating its ability to bypass system-level restrictions.
  • The toolkit uncovered multiple security flaws in the lock’s protocol, including weaknesses in its modified DESFire AES authentication mechanism, which were responsibly disclosed to the vendor.
  • The relay mode of NFCGate allowed for the capture and forwarding of NFC traffic between a lock and a transponder, enabling remote manipulation of the locking mechanism.
  • The replay mode enabled the retransmission of captured APDU sequences, demonstrating the feasibility of replay attacks on the target system.
  • Measured latency introduced by NFCGate ranged from 10ms to 80ms depending on configuration, with higher latency observed in relay and replay modes, which is critical for real-time attack feasibility.
  • The Python plugin system enabled dynamic traffic inspection and modification, allowing researchers to manipulate protocol behavior during live attacks.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.