Skip to content

BANDLALAXMI963/AegisAi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

3 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

AegisAI - AI-Powered Phishing Detection System

A comprehensive cybersecurity solution that uses machine learning to detect phishing websites and protect users from cyber threats.

๐Ÿš€ Features

  • URL Analysis: Advanced feature extraction and ML-based phishing detection
  • Image Analysis: Screenshot analysis for phishing detection
  • User Authentication: Secure login/registration with bcrypt password hashing
  • Scan History: Comprehensive tracking and analytics
  • Real-time Dashboard: Interactive charts and statistics
  • Security Settings: 2FA, session management, and monitoring
  • Modern UI: Clean, minimal design with smooth animations

๐Ÿ“ Project Structure

AegisAI/
โ”œโ”€โ”€ app.py                 # Main Flask application
โ”œโ”€โ”€ models.py              # Database models (User, ScanHistory, LoginActivity)
โ”œโ”€โ”€ routes.py              # API routes and endpoints
โ”œโ”€โ”€ config.py              # Configuration settings
โ”œโ”€โ”€ train_model.py         # ML model training script
โ”œโ”€โ”€ requirements.txt       # Python dependencies
โ”œโ”€โ”€ utils/
โ”‚   โ”œโ”€โ”€ __init__.py
โ”‚   โ””โ”€โ”€ feature_extractor.py  # URL feature extraction
โ”œโ”€โ”€ uploads/               # Image upload directory
โ”œโ”€โ”€ templates/             # HTML templates
โ”‚   โ”œโ”€โ”€ index.html
โ”‚   โ”œโ”€โ”€ login.html
โ”‚   โ”œโ”€โ”€ dashboard.html
โ”‚   โ”œโ”€โ”€ history.html
โ”‚   โ””โ”€โ”€ settings.html
โ””โ”€โ”€ aegis_model.pkl        # Trained ML model

๐Ÿ› ๏ธ Installation

  1. Clone the repository
git clone <repository-url>
cd AegisAI
  1. Create virtual environment
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
  1. Install dependencies
pip install -r requirements.txt
  1. Train the ML model
python train_model.py
  1. Run the application
python app.py

The application will be available at http://localhost:5000

๐Ÿ“ก API Endpoints

Authentication

  • POST /register - User registration
  • POST /login - User login
  • POST /logout - User logout
  • PUT /update-profile - Update user profile

Analysis

  • POST /analyze-url - Analyze URL for phishing
  • POST /analyze-image - Analyze image for phishing

Data

  • GET /history - Get scan history
  • GET /dashboard-stats - Get dashboard statistics
  • GET /login-activity - Get login activity

๐Ÿ”ง Configuration

Environment Variables

SECRET_KEY=your-secret-key
DATABASE_URL=sqlite:///aegisai.db
FLASK_ENV=development

Database Setup

The application uses SQLite by default. The database is automatically created on first run.

Model Training

The Random Forest model is trained on URL features including:

  • URL length and structure
  • Domain characteristics
  • Suspicious word detection
  • IP address detection
  • Brand impersonation
  • TLD analysis

๐ŸŽฏ ML Model Features

URL Feature Extraction

  • Basic Features: URL length, domain length, path length
  • Domain Features: Subdomains, special characters, TLD analysis
  • Security Features: IP addresses, hex encoding, suspicious words
  • Brand Protection: Known brand impersonation detection
  • Risk Scoring: Comprehensive risk assessment (0-100)

Model Performance

  • Algorithm: Random Forest Classifier
  • Accuracy: ~95% on test data
  • Features: 30+ extracted features
  • Output: Prediction, confidence score, risk score

๐Ÿ”’ Security Features

  • Password Hashing: bcrypt for secure password storage
  • Session Management: Secure session handling
  • Login Monitoring: Track login attempts and IP addresses
  • Input Validation: Comprehensive input sanitization
  • File Upload Security: Safe file handling with type validation

๐Ÿ“Š Analytics & Monitoring

  • Real-time Statistics: Total scans, phishing detection rates
  • Trend Analysis: Weekly detection patterns
  • User Activity: Login tracking and session management
  • Performance Metrics: Processing time and accuracy

๐ŸŽจ Frontend Features

  • Modern Design: Black and white theme with Belleza font
  • Responsive Layout: Mobile-friendly design
  • Interactive Charts: Real-time data visualization
  • Smooth Animations: Professional user experience
  • Drag & Drop: File upload functionality

๐Ÿš€ Deployment

Production Setup

  1. Set environment variables
  2. Configure production database
  3. Enable HTTPS
  4. Set up reverse proxy (nginx)
  5. Configure SSL certificates

Docker Deployment

FROM python:3.9-slim
WORKDIR /app
COPY requirements.txt .
RUN pip install -r requirements.txt
COPY . .
EXPOSE 5000
CMD ["python", "app.py"]

๐Ÿค Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests if applicable
  5. Submit a pull request

๐Ÿ“ License

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

๐Ÿ†˜ Support

For support and questions:

  • Create an issue in the repository
  • Check the documentation
  • Review the API endpoints

๐Ÿ”ฎ Future Features

  • Email notifications for high-risk detections
  • Advanced image analysis with CNN
  • Real-time URL scanning
  • Browser extension integration
  • API rate limiting
  • Multi-language support
  • Advanced threat intelligence

AegisAI - Protecting users from cyber threats with AI-powered security.

About

AI-powered phishing URL detection system built with Flask and Machine Learning ๐Ÿ›ก๏ธ

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors