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
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.
- β 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
- 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
- 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
- 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
- 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)
git clone https://github.com/ares-coding/PhishGuardApp.git
cd PhishGuardApp-
Open in Android Studio
# Open the project folder in Android Studio -
Sync Gradle Dependencies
File β Sync Project with Gradle Files -
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";
- Update the API endpoint in
-
Run the App
- Connect your Android device or start an emulator
- Click Run (
βΆοΈ ) or pressShift + F10
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β 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"
}
- Message Reception: App intercepts incoming SMS
- Feature Extraction: Text is preprocessed and vectorized using TF-IDF
- API Request: Processed features sent to Flask backend
- ML Inference: Neural network analyzes patterns
- Risk Assessment: Confidence score calculated
- User Notification: Alert displayed if threat detected
- History Logging: Result stored in local database
| Technology | Purpose |
|---|---|
| Primary development language | |
| IDE and development environment | |
| REST API client | |
| UI/UX components |
| Technology | Purpose |
|---|---|
| Backend programming | |
| REST API framework | |
| Deep learning framework | |
| Neural network API | |
| ML utilities & TF-IDF |
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
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" />./gradlew test./gradlew connectedAndroidTest- Backend API: PhishGuard ML API with Database
- ML Model Training: Phishing Detection Model
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
- Follow Java coding conventions
- Write unit tests for new features
- Update documentation as needed
- Ensure all tests pass before submitting PR
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
Ares Coding
- GitHub: @ares-coding
- Portfolio: ares-coding.dev
- TensorFlow and Keras teams for the ML framework
- Android development community
- Open-source phishing datasets contributors
- Flask framework developers
If you encounter any issues or have questions:
- Check the Issues page
- Create a new issue with detailed description
- Contact via email: [your-email@example.com]
If you find this project useful, please consider giving it a β!
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


