nfc-laboratory  by josevcm

SDR tool for NFC signal sniffing and protocol decoding

created 5 years ago
468 stars

Top 65.9% on sourcepulse

GitHubView on GitHub
Project Summary

This project provides a real-time NFC signal and protocol analyzer for NFC-A, NFC-B, NFC-F, and NFC-V standards, as well as ISO7816 contact smart cards. It targets researchers, hobbyists, and security professionals interested in understanding and analyzing NFC and smart card communications using Software Defined Radio (SDR) and logic analyzers. The tool offers detailed signal visualization, protocol decoding, and data export capabilities.

How It Works

The core of the analyzer uses SDR receivers (AirSpy, RTL-SDR) to capture raw I/Q data at 13.56 MHz (or its harmonics). It then applies signal processing techniques including DC offset removal, envelope detection, and standard deviation calculation to prepare the signal. Demodulation is achieved through correlation for ASK/Miller/Manchester modulations and a novel symbol-to-symbol multiplication method for BPSK. Different bitrates are handled by a bank of correlators. For contact cards, it interfaces with DreamSourceLab logic analyzers to decode ISO7816 protocols.

Quick Start & Requirements

  • Installation: Precompiled installers are available on the releases page. Building from source requires CMake (>= 3.16), Git, MSYS2 (for Windows), Qt6, GCC/G++ (>= 11.0), and libusb.
  • Hardware: Requires an SDR receiver (AirSpy recommended, RTL-SDR supported with limitations) and optionally a DreamSourceLab DSLogic Plus, Pro16, or Pro32 logic analyzer.
  • Dependencies: Qt6 framework, libusb.
  • Setup: Building from source involves cloning the repository, configuring with CMake, and compiling. Specific SDR receiver drivers may need separate setup.
  • Resources: Requires a recent computer with significant processing power for real-time analysis.

Highlighted Details

  • Supports NFC-A (106, 212, 424 kbps), NFC-B (106, 212, 424 kbps), NFC-F (preliminary 212, 424 kbps), and NFC-V (26, 53 kbps).
  • Includes real-time signal capture, demodulation, and protocol decoding for both contact and contactless interfaces.
  • Features signal spectrum, wave, and protocol detail views, with export to compressed TRZ format and import from WAV/TRZ.
  • Offers configuration options for SDR receivers (AirSpy, RTL-SDR) and logic analyzers, including harmonic tuning and direct sampling modes.

Maintenance & Community

The project is maintained by josevcm. There are no explicit links to community forums or active development discussions provided in the README.

Licensing & Compatibility

  • License: Primarily GPLv3, with some components under different licenses (e.g., AirSpy driver, RTL-SDR driver, nlohmann json, muFFT, QCustomPlot).
  • Compatibility: GPLv3 is a strong copyleft license, potentially restricting integration into closed-source commercial products without careful consideration of derived works.

Limitations & Caveats

The project is described as a didactic exercise rather than a production application, with potential for performance improvements. NFC-V support is limited to one of the two response modes. RTL-SDR performance is significantly limited due to hardware constraints. The README notes that Pro16 and Pro32 logic analyzers are supported but not tested.

Health Check
Last commit

1 day ago

Responsiveness

Inactive

Pull Requests (30d)
3
Issues (30d)
2
Star History
23 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.