Nfc tools github android

nfc-tools

Repositories

libfreefare Public

A convenience API for NFC cards manipulations on top of libnfc.

10 Updated Nov 2, 2021

libnfc Public

Platform independent Near Field Communication (NFC) library

7 Updated Nov 2, 2021

pam_nfc Public

NFC-based PAM authentification module

0 Updated Oct 15, 2021

mfoc-hardnested Public

A fork of mfoc integrating hardnested code from the proxmark

0 Updated Aug 13, 2021

miLazyCracker Public

Mifare Classic Plus — Hardnested Attack Implementation for SCL3711 LibNFC USB reader

0 Updated Jul 26, 2021

nfc-iclass Public

iClass / Picopass tool for libnfc

0 Updated Mar 26, 2021

mfoc Public

Mifare Classic Offline Cracker

9 Updated Nov 17, 2020

nfc-supercard Public

Client for Super card

0 Updated Oct 29, 2020

libndef Public

Qt library to encode/decode NDEF (NFC Data Exchange Format) messages

1 Updated Sep 28, 2020

nfc-cryptorf Public

A tool based on libnfc that executes an active authentication and encrypted communication with a CryptoRF tag

0 Updated Sep 1, 2020

nfc-eventd Public

NFC monitor daemon which is able to launch modules (libraries) on action (tag inserted or removed)

1 Updated Aug 13, 2019

mfcuk Public

MiFare Classic Universal toolKit (MFCUK)

1 Updated Jul 14, 2018

nfc-tools.github.io Public

nfc-tools’ web site

0 Updated Nov 29, 2017

ucard Public

0 Updated Nov 16, 2016

ifdnfc Public

PC/SC IFD Handler based on libnfc

1 Updated Sep 1, 2016

nfcutils Public

lsnfc is a simple command that lists tags which are in your NFC device field

0 Updated Apr 7, 2015

dev-tools Public

0 Updated Apr 7, 2015

libllcp Public

libllcp is an implementation of NFC Logical Link Control Protocol (LLCP) for libnfc

0 Updated Mar 14, 2015

qnfcd Public

QNFCd is a C++/Qt daemon that exposes NFC devices through D-Bus

0 Updated Mar 14, 2015

You can’t perform that action at this time.

You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.

Источник

Nfc tools github android

TonUINO NFC Tools

Android app to write and read NFC tags that can be used on the TonUINO DIY music box.

For discussion, see this thread (in German), or use github issues.

The app is available for download on github, installable using the Google Play Store or the F-Droid Store.

The github releases are built on CircleCI .
Google Play releases are built using fastlane.

  • Get BytesFormatter to work without issues
  • Hide on-screen-keyboard when switching between edit fragments
  • Allow users to write a note or title to the NFC tag
  • Allow users to keep a list of tags
  • Simulate NFC tag
  • Use proper Material design theming instead of faking it
    • MainActivity if NFC is not available
# name range description
0 cookie uint32 identifies TonUINO, expected 0x1337b347
4 version uint8 always 1
5 folder uint8 values between 1 and 99, see dfplayer docs
6 mode uint8 values between 1 and 5, see next table
7 special uint8

Different Modes
Based on the value of byte mode and what happens, when the next and previous buttons are pressed

# title description next previous
1 Hörspiel
audio book (single file)
plays a single file in the folder stop Start title again from the beginning
2 Album play every file in the folder next file previous file
3 Party play files in the folder in random order play random file start title again from the beginning
4 Einzel
single
play a single file in the folder stop start title again from the beginning
5 Hörbuch
audio book (multiple files)
play all files in the folder and keep track of the progress (will start at the last file the next time next file previous file
6 Admin Not functionality

Special
Is only used in specific modes to specify variables:

  • mode 4: file number
  • mode 6: placeholder, no functionaliy yet
# name range description
0 cookie uint32 Identifies a Tonuino tag, usually 0x1337b347
4 version uint8 always 2
5 folder uint8 Values from 1 to 99, see dfplayer docs
6 mode uint8 Values from 1 to 5, see next table
7 special uint8
8 special2 uint8

Different Modes
It supports all modes of TonUINO 2.0 and adds these

# title description next previous
7 Von-Bis Hörspiel play a random file from the folder between special and special2 stop start title again from the beginning
8 Von-Bis Album play all files between special and special2 next file start title again from the beginning
9 Von-Bis Party play all files between special and special2 in random order random file start title again from the beginning

Modifier Tags (aka admin tags)

All have a folder value of 0

Modifier byte 6 byte 7 Description
SleepTimer 1 Play duration in minutes (255 max) Pauses playback after timer
FreezeDance 2 Randomly pauses the track after 5 to 30 seconds
Locked 3 All buttons are locked and no new card will be read
ToddlerMode 4 All buttons are locked
KindergartenMode 5 Previous and back buttons are locked. Adding a new card will not stop the current track but will schedule it as next track
RepeatSingleModifier 6 Repeat current track
FeedbackModifier 7 Will e.g. tell volume before changing it

NFC Host Card Emulation

It would be great if the app also can act as an NFC tag to simulate TonUINO tags, some links to this: Official Android docs

Here is a very good example https://github.com/grundid/host-card-emulation-sample which will write to you «Hello Desktop!» The App emulates a MIFARE card with this AID 0xF0, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06 You should make your self familiar with the HCE code.

In the other side you should have an NFC reader (in your case MIFARE NFC) which will be looking for the same AID as in the HCE App. Normally you should send this cmd to the Android phone from your reader after you have brought the two devices close enough 0x00 [CLA], 0xA4 [INS], 0x04, 0x00, 0x07 [Lc], 0xF0, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x00 [Le]

NFC tag type support

Currently only Mifare Classic and Ultralight are supported, but in case generic NfcA support is wished, start with these links:

About

Android app to write NFC tags for the TonUINO diy music box

Источник

Nfc tools github android

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.

This application was developed for security research purposes by students of the Secure Mobile Networking Lab at TU Darmstadt. Please do not use this application for malicious purposes.

  • On-device capture: Captures NFC traffic sent and received by other applications running on the device.
  • Relay: Relays NFC traffic between two devices using a server. One device operates as a «reader» reading an NFC tag, the other device emulates an NFC tag using the Host Card Emulation (HCE).
  • Replay: Replays previously captured NFC traffic in either «reader» or «tag» mode.
  • Clone: Clones the initial tag information (e.g. ID).
  • pcapng export of captured NFC traffic, readable by Wireshark.

Requirements for specific modes

  • NFC support
  • Android 4.4+ (API level 19+)
  • EdXposed or Xposed: On-device capture, relay tag mode, replay tag mode, clone mode.
  • ARMv8-A, ARMv7: Relay tag mode, replay tag mode, clone mode.
  • HCE: Relay tag mode, replay tag mode, clone mode.
  1. Initialize submodules: git submodule update —init
  2. Build using Android Studio or Gradle

As instructions differ per mode, each mode is described in detail in its own document in doc/mode/ :

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.

NFCGate provides an in-app status check. For further notes on compatibility see the compatibility document.

Known Issues and Caveats

Please consider the following issues and caveats before using the application (and especially before filing a bug report).

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 and Media

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:

The initial NFCGate paper describing the first version of NFCGate can be cited as follows:

  • xHook (Licensed under the MIT License)
  • Xposed Bridge (Licensed under the Apache License v2.0)
  • LibNFC-NCI (Licensed under the Apache License v2.0)
  • Protobuf (Licensed under the modified BSD 3-Clause License)
  • Android About Page (Licensed under the MIT License)
  • Android Device Names (Licensed under the Apache License v2.0)
  • Android Support library — preference v7 bugfix (Released into the public domain and partly licensed under the Apache License v2.0)
  • Android Room (Licensed under the Apache License v2.0)
  • Android Lifecycle (Licensed under the Apache License v2.0)

About

An NFC research toolkit application for Android

Источник

Nfc tools github android

External NFC Service (native style) for Android

Library for interaction with ACS NFC readers over USB; external NFC support Android devices.

  • External NFC reader management and interaction
  • Parallell use of external and/or internal NFC (i.e. in the same activity, both enabled at the same time)
  • Support for both tags and Android devices (Host Card Emulation), simultaneously
  • Use of forked android.nfc classes (Ndef, MifareUltralight, IsoDep, etc) for Android 10+ support.

As this project very much simplifies implementation for use-cases requiring external NFC readers, it saves a lot of development time (2-8 weeks depending on use-case and previous knowledge).

Bugs, feature suggestions and help requests can be filed with the issue-tracker. DO NOT send me emails unless you’re prepared to pay for my time.

This repository contains source code for

There is also a Host Card Emulation client app for use with the Basic client app as well as Android-to-Android communication.

External NFC reader API

The API defines

  • broadcast actions
    • service start / stop and status
    • reader open / close and status
    • tag connect / disconnect
  • extras objects for interaction with readers
    • disable beeps
    • display text
    • configure NFC tech types (PICC)
    • enable/disable LEDs
    • run custom commands
    • and more..
  • abstract activities for interaction with built-in and external NFC (simultaneously)
  • these currently depend on the NDEF Tools for Android project.
  • Programmatically start and stop the service (see methods startService() and stopService() in the NfcExternalDetectorActivity class in for an example).

Currently the ACS readers

are supported and must be connected to your Android device via an On-The-Go (OTG) USB cable.

Additional ACR readers might work depending on their command set, however custom reader commands will (like LED, beep etc) will not be available.

Supported tag technology

The following tags are supported by the service

  • Mifare Ultralight familiy
    • Mifare Ultralight
    • NTAG 21x with FAST READ
  • Mifare Classic and friends
    • Not recommended due to security and compatibility issues
  • Desfire EV1 tags
  • Host Card Emulation — interaction with Android devices.

The readers can for the most part can be enabled for all tag types at the same time, including Host Card Emulation.

  • Some readers only support a subset of the above tags
  • For ACR 122U the Mifare Classic does not work well.
  • No built-in NDEF support for Desfire EV1 cards
  • assume all NTAG21x Mifare Ultralight targets. This improves read speed, particullary for the tags which have legacy equivalents, like NTAG 210 and 213
  • read only tag UIDs, ignore other tag data. This improves read speed.
  • read NDEF data automatically
  • read UID for Desfire EV1 targets automatically

Note that not all Android devices actually have an USB hub, in which case no USB devices work.

Does the ACR reader not light up when connected to your device, even after the service asks for USB permissions? The ACR reader shuts down if there is not enough battery, so try charging your battery more, or connect external power.

If you are using external power, be aware that the connection order (device, reader, power) might be important. Known symptom:

  • Seeing an USB permissions window that disappears rather quickly.

There is quite a few types of tags out there, and if your tag type is not recognized, please let me know. If the tag does not register at all, make sure that auto polling is configured, and that the right protocols are enabled. Use the below utility apps for tweaking your reader settings.

Reader setting utility apps

You might be interested in

for configuration of your reader. Approximately the same configuration options are available using this API.

This project contains adapted code from

  • NFC Tools for Java
  • SMARTRAC SDK for Android NFC NTAG
  • 2.1.0: Improve bluetooth handling, various bug fixes and a few improvements.
  • 2.0.0: Moved to wrapped android.nfc NFC android classes + various refactorings.
  • 1.0.0: Library using native NFC android classes

About

Interaction with external NFC readers in Android

Источник

Читайте также:  Все для андроид 235
Оцените статью