Skip to content

ares-coding/PhishGuardApp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

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.

Features β€’ Demo β€’ Installation β€’ How It Works β€’ Tech Stack β€’ Contributing


πŸ“± 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

Ares Coding


πŸ™ 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]

🌟 Star History

If you find this project useful, please consider giving it a ⭐!


πŸ›‘οΈ Stay Safe from Phishing! πŸ›‘οΈ

Made with Passion and a lot of Coffee by Ares Coding

Add Apache 2.0 license

  • Add LICENSE file with Apache License 2.0
  • Project is now open source under Apache 2.0 terms
  • Allows commercial use, modification, and distribution

Visitors Last Commit

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages