A modern, intelligent malware and URL detection system with AI, YARA rules, VirusTotal threat intelligence, and a beautiful React frontend.
- File Scanning: Scan executable files (EXE, DLL, BIN) using:
- MalConv AI model
- YARA rule pattern matching
- VirusTotal hash lookup
- Risk scoring engine
- URL Scanning: Scan URLs using:
- Local indicator checks
- VirusTotal URL lookup
- Risk scoring
- Dashboard: Real-time scan statistics and charts
- History: Track all scan reports with detailed views
- Security Assistant: AI-powered chatbot for security questions
- Threat News: Latest cybersecurity news updates
- Dark/Light Mode: Beautiful UI with theme support
- FastAPI - Modern Python web framework
- SQLite + SQLAlchemy - Database
- JWT - Authentication
- TensorFlow - MalConv AI model
- YARA - Pattern matching
- VirusTotal API - Threat intelligence
- Groq API - Chatbot
- React 18 - UI library
- TypeScript - Type safety
- Tailwind CSS - Styling
- shadcn/ui - UI components
- Recharts - Charts and graphs
- Framer Motion - Animations
- Vite - Build tool
- Python 3.9+
- Node.js 18+
- npm or bun
git clone <repository-url>
cd Malware-Detectioncd backendpython -m venv .venv
# Windows
.venv\Scripts\activate
# macOS/Linux
source .venv/bin/activatepip install -r requirements.txtcopy .env.example .envEdit .env and set:
SECRET_KEY=your-random-secret-key-here
VIRUSTOTAL_API_KEY=your-virustotal-api-key-here (optional)
GROQ_API_KEY=your-groq-api-key-here (optional)
GNEWS_API_KEY=your-gnews-api-key-here (optional)Windows (important - use this command!):
.\.venv\Scripts\python.exe -m uvicorn app.main:app --reload --host 127.0.0.1 --port 8000macOS/Linux:
uvicorn app.main:app --reload --host 127.0.0.1 --port 8000Backend will be available at: http://localhost:8000
API docs:
- Swagger UI: http://localhost:8000/docs
- ReDoc: http://localhost:8000/redoc
cd frontendnpm install
# or
bun installnpm run dev
# or
bun run devFrontend will be available at: http://localhost:8080
All scripts should be run from the backend/ directory.
.\scripts\verify_file_scoring.ps1.\scripts\verify_phase1.ps1.\scripts\verify_phase2.ps1.\scripts\verify_phase3.ps1.\scripts\verify_phase4.ps1.\scripts\verify_phase5.ps1.\scripts\verify_url_scan.ps1.\scripts\verify_chat.ps1Malware-Detection/
βββ backend/ # FastAPI backend
β βββ app/
β β βββ routes/ # API endpoints
β β βββ services/ # Business logic
β β βββ yara_rules/ # YARA rule files
β βββ scripts/ # Verification scripts
β βββ uploads/ # Uploaded files (gitignored)
βββ frontend/ # React frontend
β βββ src/
β β βββ components/ # UI components
β β βββ pages/ # Page components
β β βββ services/ # API services
β β βββ lib/ # Utilities
β βββ public/ # Static assets
βββ images/ # Project screenshots
βββ README.md
- Beautiful gradient backgrounds
- Smooth animations with Framer Motion
- Responsive design for all screen sizes
- Dark/Light theme support
- Clean, modern UI with shadcn/ui components
- Interactive charts with Recharts
- Files are never executed - only static analysis
- Uploaded files are stored locally (not sent to VirusTotal)
- Only SHA256 hashes are sent to VirusTotal
- JWT authentication for all protected endpoints
- Guardrails to prevent harmful questions from chatbot
POST /auth/signup- Register new userPOST /auth/login- Login and get JWT tokenGET /auth/me- Get current user profile
POST /scan/file- Scan a filePOST /scan/url- Scan a URL
GET /reports/- List file reportsGET /reports/{id}- Get single file reportDELETE /reports/{id}- Delete file reportPOST /reports/delete-selected- Delete selected file reportsDELETE /reports/clear- Clear all file reportsGET /url-reports/- List URL reportsGET /url-reports/{id}- Get single URL reportDELETE /url-reports/{id}- Delete URL reportPOST /url-reports/delete-selected- Delete selected URL reportsDELETE /url-reports/clear- Clear all URL reports
POST /chat/report/file/{id}- Explain file reportPOST /chat/report/url/{id}- Explain URL reportPOST /chat/guard- Guarded chat
GET /news- Get latest cybersecurity news
This project is for educational purposes.
- MalConv model from Hugging Face
- VirusTotal API for threat intelligence
- YARA for pattern matching
- Groq for chatbot
- GNews for news updates
- shadcn/ui for UI components






