Skip to content

About

🧠 Full-stack malware analysis web app: upload files for instant threat detection with signature-based classification. React + Vite frontend, Flask API, PostgreSQL backend. Real-time scanning with persistent history.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

Β 

History

16 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🧠 Malware Intelligence System

A modern full-stack malware analysis web application built with Flask, React + Vite, and PostgreSQL. Users can upload a file and instantly receive a clean/suspicious/malicious classification. All past scans are saved in the PostgreSQL database and displayed in the Recent Scans section.

πŸ”₯ Live Demo

Component URL
Frontend (Netlify) https://malwaretest.netlify.app
Backend API (Render) https://malware-test.onrender.com

✨ Features

πŸ–₯️ Frontend

  • Built with React + Vite
  • Neon cyber-themed UI
  • File upload (button + drag-and-drop)
  • Real-time scan progress indicator
  • Dynamic Recent Scans table
  • Fully responsive on desktop + mobile

βš™οΈ Backend

  • Flask REST API
  • PostgreSQL with SQLAlchemy ORM
  • File hashing & text extraction
  • Simple signature-based malware detection
  • CORS support
  • Fully Dockerized and deployable

πŸ—„οΈ Database (PostgreSQL)

Stores each scan as a record containing:

  • filename
  • result
  • timestamp

πŸ§ͺ How It Works

  1. User uploads a file in the UI
  2. The frontend sends it to the backend: POST /scan
  3. Backend:
    • Validates file
    • Extracts text
    • Computes hash
    • Checks signatures
  4. Result is saved to PostgreSQL
  5. Frontend refreshes the Recent Scans section

πŸ›  Tech Stack

Frontend

  • React
  • Vite
  • Tailwind CSS
  • Netlify Hosting

Backend

  • Python / Flask
  • Flask-SQLAlchemy
  • psycopg2
  • Docker
  • Render Hosting

Database

  • PostgreSQL (Render Free Tier)

πŸ“¦ Local Development Setup

1. Clone the repository

git clone https://github.com/Gochatsurtsumia/Malware-Test.git
cd Malware-Test

2. Backend Setup

cd backend
python -m venv venv

Activate virtual environment:

  • Windows: venv\Scripts\activate
  • Mac / Linux: source venv/bin/activate

Install dependencies:

pip install -r requirements.txt

Create backend/.env:

DATABASE_URL=postgresql://your_db_url
SECRET_KEY=your_secret

Run backend:

python app.py

3. Frontend Setup

cd frontend
npm install
npm run dev

☁️ Deployment Notes (IMPORTANT)

⚠️ 1. Render PostgreSQL Free Tier EXPIRES after 90 days

Render deletes free-tier databases after 3 months. When it expires:

  • Recent Scans table becomes empty
  • You must create a new DB
  • Update backend/.env with the new DATABASE_URL

⚠️ 2. Backend May Take 10–30 Seconds to Wake Up

Render free hosting sleeps when idle.

Symptoms:

  • Connection failed
  • CORS error
  • Timeout
  • Empty responses

Solution:

  • Wait 10–30 seconds after first request
  • Everything works normally after warm-up
  • This is expected behavior β€” NOT a bug

πŸš€ Production Deployment

Backend (Render)

  • Docker auto-detects port
  • Deploy directly from GitHub
  • Required environment variable: DATABASE_URL=

Frontend (Netlify)

  • Build command: npm run build
  • Publish directory: dist
  • Environment variable: VITE_API_URL=https://malware-test.onrender.com

🧭 Project Structure

Malware-Test/
β”‚
β”œβ”€β”€ backend/
β”‚   β”œβ”€β”€ app.py
β”‚   β”œβ”€β”€ models.py
β”‚   β”œβ”€β”€ Dockerfile
β”‚   β”œβ”€β”€ requirements.txt
β”‚   └── ...
β”‚
β”œβ”€β”€ frontend/
β”‚   β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ public/
β”‚   β”œβ”€β”€ vite.config.js
β”‚   └── ...
β”‚
└── README.md

πŸ“Œ Future Improvements

  • ML-powered malware classifier
  • Dynamic sandbox behavior analysis
  • Batch file scanning
  • User accounts + private scan history
  • JWT authentication
  • WebSocket-based live scan updates

πŸ“„ License

MIT License


Made with πŸ’™ by Gochatsurtsumia

About

🧠 Full-stack malware analysis web app: upload files for instant threat detection with signature-based classification. React + Vite frontend, Flask API, PostgreSQL backend. Real-time scanning with persistent history.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages