- A project showcasing NFC vulnerabilities via replay attacks. Learn how intercepted NFC data is captured, stored, and replayed to exploit security gaps. Includes tools and guides. Created by an ethical hacker and cybersecurity student to raise awareness and improve NFC security.
- A robust and innovative solution for NFC card verification and POS machine transactions. This project includes a secure database for managing card data and verifying authenticity to prevent replay attacks.
This project is strictly for educational purposes and adheres to ethical hacking principles. It is not intended for unauthorized or malicious activities. The author is a student of ethical hacking and cybersecurity, committed to enhancing security awareness and developing secure systems.
This project demonstrates how to implement NFC card verification and prevent REPLAY ATTACK using a my Prototype. It integrates a Flask-based POS system for secure transactions and data management.
The project verifies NFC cards, detects clones, and facilitates secure money transactions using a POS machine interface.
It addresses issues of NFC card cloning and unauthorized transactions by ensuring data authenticity.
To explore innovative uses of NFC technology in secure financial systems and enhance cybersecurity skills.
- Reads NFC card data (UID, type, length, and expiration date).
- Detects cloned cards using pre-configured known UIDs.
- Sends NFC data to a Python Flask server over Wi-Fi.
- Indicates success or failure with an onboard LED.
- Receives and stores NFC data into an SQLite database.
- Serves data as JSON for programmatic access.
- Provides an intuitive web interface to view stored data in both tabular and card-style formats.
-
Table View: Displays all NFC transactions in a clean, sortable table.
-
Card View: Visualizes each NFC card's data in a stylish, animated format.
-
NFC card authentication using PN532 and ESP8266
-
Detection and prevention of cloned NFC cards
-
User-friendly POS machine interface with Flask server
-
SQLite database for secure card data management
- Python 3.x
- Flask framework
- Arduino IDE
- PN532 NFC Reader and ESP8266 module
- Arduino IDE installed.
- Python 3.x installed.
- Flask and SQLite libraries.
- Wi-Fi-enabled hardware (e.g., NodeMCU with ESP8266).
-
Hardware Connection:
- PN532 NFC module connected to ESP8266 or Arduino as per the pin configuration in the code.
- LED connected to GPIO13.
-
Code Upload:
-
Open the Arduino IDE.
-
Replace the placeholder values in the code:
const char* ssid = "Enter_your_ssid"; const char* password = "Enter_your_password"; const char* serverUrl = "Enter_your_ip/save_nfc_data"; const char* transactionUrl = "Enter_your_ip/save_transaction";
-
Upload the sketch to the ESP8266 or Arduino.
-
- Connect the PN532 NFC reader to ESP8266 via I2C protocol.
- Power on the Arduino-based NFC reader.
- Upload the Arduino code for NFC card data reading.
- The card data will be:
- Logged on the Arduino's serial monitor.
- Sent to the Flask server for storage
- Run the Flask server to handle transactions and display the interface.
- Use the POS machine webpage for transaction management.
Example to start the Flask server:
#First NFC Reading (open nfc Reader/)
python server.py
#The server will create the "nfc_data.db" file automatically.
#Second NFC Transcation (open nfc Demo transcation pos mechine)
python server.py
- /ArduinoCode: Contains code for the PN532 NFC reader.
- /FlaskServer: Flask app for transaction handling and UI.
- /Database: SQLite database files for card data.
- /Static: CSS, JavaScript, and images for the UI.
- /Templates: HTML templates for the POS machine interface.
Contributions are welcome! Please fork the repository and create a pull request for any feature additions or improvements.
This project is licensed under the MIT License. See the LICENSE file for details.
For questions or collaborations, please reach out:
- Name: [Abdul AJ]
- Email: [rahmana8154@gmail.com]
- GitHub: (https://github.com/Abdul04-hacker)


