Skip to content

deveshpunjabi/QR-Code-Exploit-Detector

Repository files navigation

QR Code Exploit Detector

Description:

A Python-based system for decoding and auditing QR codes to detect potential security threats. This tool analyzes QR codes, validates their content, and categorizes URLs while integrating with the urlscan.io API for advanced threat detection. Users can interact with the system through a user-friendly Gradio interface, and visual reports are generated for easy interpretation.

Features:

  • QR Code Decoding: Extracts text or URLs from QR codes using OpenCV.
  • URL Validation: Ensures the content is a valid URL and categorizes it (e.g., Social Media, File Downloads).
  • Threat Detection: Integrates with the urlscan.io API to identify phishing, malware, and other cyber threats.
  • Report Generation: Creates visual summaries of analysis results using Matplotlib.
  • Web Interface: A Gradio-powered interface for real-time interaction.

Project Structure:

qr-code-exploit-detector/
│
├── README.md              # Documentation for the repository
├── requirements.txt       # Python dependencies for the project
├── main.py                # Main script to launch the Gradio app
├── qr_decoder.py          # QR code decoding logic using OpenCV
├── url_validator.py       # URL validation and categorization module
├── threat_detector.py     # Threat analysis using urlscan.io API
├── report_generator.py    # Matplotlib-based report generation
└── static/                # Contains static assets (images, diagrams, etc.)     

Installation Instructions:

1. Clone the Repository

git clone https://github.com/deveshpujnabi/QR-Code-Exploit-Detector.git
cd qr-code-audit-detector

2. Create a Virtual Environment

python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate

3. Install Dependencies

Install the required Python libraries listed in requirements.txt:

pip install -r requirements.txt

4. Set Up API Key

Register at urlscan.io to get an API key. Add your API key to an environment variable or directly into the code where required.

Usage:

1. Launch the Application

Run the main script to start the Gradio interface:

python main.py

2. Interact with the Interface

  • Upload or capture a QR code image.
  • View the decoded content, URL analysis, and threat detection results.
  • Generate visual audit reports for comprehensive insights.

API Integration:

urlscan.io API:

  • Endpoint: https://urlscan.io/api/v1/scan/
  • Features:
    • Submits URLs for real-time analysis.
    • Detects phishing, malware, and other threats.
    • Provides a detailed scan report with tags and threat details.

License:

This project is licensed under the MIT License. See the LICENSE file for more details.

References:

  1. OpenCV Documentation: https://docs.opencv.org
  2. urlscan.io API Guide: https://urlscan.io/docs/api/
  3. Matplotlib Documentation: https://matplotlib.org/stable/contents.html

About

A Python-based system for decoding and auditing QR codes to detect potential security threats.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages