Skip to content

secureml-au/phishing-link-detector-app

Repository files navigation

PhishGuard App

PhishGuard Logo Java Android License

Real-Time Phishing Detection at Your Fingertips

An intelligent Android application that leverages NLP and Machine Learning to detect phishing attempts in SMS messages and protect users from cyber threats.

FeaturesDemoInstallationHow It WorksTech StackContributing


Overview

PhishGuard is a cutting-edge Android security application designed to protect users from phishing attacks in real-time. By analyzing SMS messages using advanced Natural Language Processing (NLP) and Machine Learning algorithms, PhishGuard identifies malicious content and alerts users before they fall victim to scams.

Key Highlights

  • Real-time SMS scanning with instant threat detection
  • AI-powered analysis using NLP and TensorFlow/Keras models
  • Confidence scoring for risk assessment
  • Privacy-focused — all processing happens locally
  • Native Android UI with Material Design
  • Flask REST API backend for ML model serving

Features

Security Features

  • Intelligent Message Analysis: Uses TF-IDF vectorization and neural networks to detect phishing patterns
  • Real-time Scanning: Automatic scanning of incoming SMS messages
  • Risk Assessment: Provides confidence scores for detected threats
  • Phishing Database: Maintains history of scanned messages with threat levels

User Experience

  • Clean Interface: Intuitive Material Design UI
  • Instant Alerts: Immediate notifications for suspicious messages
  • Message History: View scan history and threat analysis
  • User Feedback: Option to report false positives/negatives

ML Capabilities

  • NLP Processing: Advanced text feature extraction
  • Pattern Recognition: Identifies common phishing tactics
  • Continuous Learning: Model improvements through user feedback
  • High Accuracy: Trained on extensive phishing datasets

Demo

App Screenshots

Splash Screen Message Scanner Threat Detection
Splash Scanner Detection

Installation

Prerequisites

  • Android Studio Arctic Fox (2020.3.1) or higher
  • JDK 11 or higher
  • Android SDK API Level 21+
  • Python 3.8+ (for backend)
  • Flask and ML dependencies (see backend repo)

Clone the Repository

git clone https://github.com/ares-coding/PhishGuardApp.git
cd PhishGuardApp

Build and Run

  1. Open in Android Studio

    # Open the project folder in Android Studio
  2. Sync Gradle Dependencies

    File → Sync Project with Gradle Files
    
  3. Configure Backend Connection

    • Update the API endpoint in app/src/main/java/config/ApiConfig.java
    public static final String BASE_URL = "http://your-backend-url:5000";
  4. Run the App

    • Connect your Android device or start an emulator
    • Click Run or press Shift + F10

How It Works

Architecture Overview

┌─────────────────────────────────────────────────────────┐
│                    ANDROID CLIENT                        │
│  ┌────────────┐  ┌──────────────┐  ┌────────────────┐  │
│  │  SMS       │  │  UI Layer    │  │  Retrofit      │  │
│  │  Receiver  │→ │  (Activity)  │→ │  API Client    │  │
│  └────────────┘  └──────────────┘  └────────────────┘  │
└─────────────────────────────────────────────────────────┘
                           ↓ HTTP Request
┌─────────────────────────────────────────────────────────┐
│                   FLASK REST API                         │
│  ┌────────────┐  ┌──────────────┐  ┌────────────────┐  │
│  │  API       │  │  Preprocessor│  │  ML Model      │  │
│  │  Endpoint  │→ │  (TF-IDF)    │→ │  (Keras/TF)    │  │
│  └────────────┘  └──────────────┘  └────────────────┘  │
└─────────────────────────────────────────────────────────┘
                           ↓ JSON Response
                    {
                      "prediction": "phishing",
                      "confidence": 0.94,
                      "risk_level": "high"
                    }

Detection Process

  1. Message Reception: App intercepts incoming SMS
  2. Feature Extraction: Text is preprocessed and vectorized using TF-IDF
  3. API Request: Processed features sent to Flask backend
  4. ML Inference: Neural network analyzes patterns
  5. Risk Assessment: Confidence score calculated
  6. User Notification: Alert displayed if threat detected
  7. History Logging: Result stored in local database

Tech Stack

Frontend (Android)

Technology Purpose
Java Primary development language
Android Studio IDE and development environment
Retrofit REST API client
Material Design UI/UX components

Backend (ML API)

Technology Purpose
Python Backend programming
Flask REST API framework
TensorFlow Deep learning framework
Keras Neural network API
Scikit-learn ML utilities & TF-IDF

Project Structure

PhishGuardApp/
├── .idea/                    # Android Studio configuration
├── app/                      # Main application module
│   ├── src/
│   │   ├── main/
│   │   │   ├── java/         # Java source files
│   │   │   │   └── com.phishguard/
│   │   │   │       ├── activities/    # UI Activities
│   │   │   │       ├── adapters/      # RecyclerView Adapters
│   │   │   │       ├── api/           # Retrofit API interfaces
│   │   │   │       ├── models/        # Data models
│   │   │   │       ├── receivers/     # SMS Broadcast Receiver
│   │   │   │       └── utils/         # Helper classes
│   │   │   ├── res/          # Resources
│   │   │   │   ├── drawable/ # Images & icons
│   │   │   │   ├── layout/   # XML layouts
│   │   │   │   ├── values/   # Colors, strings, themes
│   │   │   │   └── ...
│   │   │   └── AndroidManifest.xml
│   │   └── test/             # Unit tests
│   └── build.gradle          # App-level Gradle config
├── gradle/                   # Gradle wrapper
├── .gitignore
├── build.gradle              # Project-level Gradle config
├── gradle.properties
├── gradlew                   # Gradle wrapper script (Unix)
├── gradlew.bat               # Gradle wrapper script (Windows)
├── settings.gradle.kts
└── README.md                 # This file

Permissions

The app requires the following permissions:

<!-- Required for SMS scanning -->
<uses-permission android:name="android.permission.RECEIVE_SMS" />
<uses-permission android:name="android.permission.READ_SMS" />

<!-- Required for API communication -->
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

Testing

Run Unit Tests

./gradlew test

Run Instrumentation Tests

./gradlew connectedAndroidTest

Related Repositories


Contributing

Contributions are welcome. Please feel free to submit a Pull Request.

How to Contribute

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

Development Guidelines

  • Follow Java coding conventions
  • Write unit tests for new features
  • Update documentation as needed
  • Ensure all tests pass before submitting PR

License

This project is licensed under the Apache License 2.0 - see the LICENSE file for details.


Author

Au Amores


Acknowledgments

  • TensorFlow and Keras teams for the ML framework
  • Android development community
  • Open-source phishing datasets contributors
  • Flask framework developers

Support

If you encounter any issues or have questions:

  1. Check the Issues page
  2. Create a new issue with detailed description
  3. Contact via email: [your-email@example.com]

Made with passion by Ares Coding

Visitors Last Commit

About

Real-time phishing URL detection app for analyzing and classifying links as safe or malicious using AI and cybersecurity techniques.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages