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 press
Shift + 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.
Au Amores
- GitHub: https://github.com/cybersec-dev-au
- Portfolio: https://au-dev-cs.vercel.app/
- 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]
Made with passion by Ares Coding


