MalwareMind is an advanced malware detection system leveraging Convolutional Neural Networks (CNNs) to identify and classify malware from binary executables. The web UI is a single-page landing experience with anchor navigation (for example #analyze for Live detection): users upload PE samples, run the same CNN-oriented pipeline as in research workflows, and read calibrated threat scores. With modularity and scalability in mind, MalwareMind aims to facilitate secure and efficient malware analysis.
Note: This project temporarily supports only .exe files for better accuracy.
-
CNN-based Malware Detection: Utilize a pre-trained CNN model for accurate malware classification.
-
File upload (Live detection): Drag-and-drop or browse for
.exefiles in the Live detection section. -
Results visualization: Threat scores and analysis cards in the Live detection panel (plus supporting landing sections for pipeline and binary visualization).
-
Dockerized deployment: Simplified setup using Docker Compose for the backend and database; the frontend may run as a separate service (see below).
-
Scalability: Modular codebase supporting future enhancements.
The project consists of the following components:
-
Backend
- FastAPI: RESTful API to handle file uploads, process data, and return detection results.
- Model Inference: The CNN model performs predictions on binary data converted into image format.
- Result storage (configurable): Set
RESULT_STORAGEinmalwaremind-server/.envtojson(append-onlydata/results.json, good for serverless demos) ormongodb(Docker / Render with Mongo). Seemalwaremind-server/.env.example.
-
Frontend:
- Vite, Vue 3, and Tailwind CSS: Responsive single-page UI. The page shell lives in
malwaremind-web/src/pages/MalwareMindLanding.vue. Upload and analysis orchestration are inmalwaremind-web/src/composables/useMalwareAnalysis.js; the interactive scan surface ismalwaremind-web/src/components/landing/LiveDetectionPanel.vue, with other marketing sections undercomponents/landing/. HTTP calls use axios; icons use lucide-vue-next; motion helpers use @vueuse/motion.
- Vite, Vue 3, and Tailwind CSS: Responsive single-page UI. The page shell lives in
-
Docker:
- Docker Compose: Backend (FastAPI), frontend (Vite), and MongoDB are defined in
docker-compose.ymland can be started together from the repository root.
- Docker Compose: Backend (FastAPI), frontend (Vite), and MongoDB are defined in
Ensure that you have the following installed:
- Docker (with Docker Compose)
- Recommended OS: Linux/macOS/Windows
-
Clone the repository:
git clone https://github.com/DarriusChen/MalwareMind.git cd MalwareMind -
Modify environment variables (if necessary)
-
Backend (
malwaremind-server/.env)Copy
malwaremind-server/.env.exampletomalwaremind-server/.envand adjust as needed:FRONT_END_IP=http://localhost:5173 RESULT_STORAGE=mongodb
Use the same scheme and host you open in the browser (for example
http://127.0.0.1:5173if you use 127.0.0.1). If you omithttp://, the backend normalizes it for CORS. Fordocker compose, the backend service setsRESULT_STORAGE=mongodbandMONGO_URIindocker-compose.yml; your.envcan still override other keys. UseRESULT_STORAGE=jsonon hosts without MongoDB (for example a minimal Render demo). -
API base url
Edit
malwaremind-web/.env(requests are sent from your browser, not from inside Docker, so use the host URL):VITE_API_URL=http://localhost:8000
-
-
Start the stack (repository root, next to
docker-compose.yml):docker compose up --build -d
Stop:
docker compose down
-
Open the app
- UI: http://localhost:5173
- Backend API: http://localhost:8000
cd malwaremind-web && npm install && npm run devKeep VITE_API_URL=http://localhost:8000 while the API runs on the host or is published on port 8000.
- Live detection: Open the app at http://localhost:5173, scroll to Live detection (or use Run scan in the header to jump to
#analyze). Drag and drop.exefiles onto the ingest area, or click to browse. - API: Alternatively, call the backend REST API for uploads and bulk workflows.
- Detection results: After upload, the service runs inference and shows calibrated scores and threat-oriented summaries in the analysis cards beside the ingest panel.
- Multiple files: Several
.exefiles can be queued and processed in one batch.
- FastAPI: Customize endpoints and wiring in
malwaremind-server/src/main.py. (REST API for uploads and the CNN detection flow.) - CNN model: Adjust inference and model usage in
malwaremind-server/src/module.pyand related modules undermalwaremind-server/src/.
- Edit files under
malwaremind-web/src/: landing layout inpages/, section components incomponents/landing/, shared logic incomposables/. Global styles live insrc/assets/tailwind.csswithmalwaremind-web/tailwind.config.js.
MalwareMind/
├── malwaremind-web/ # Vite + Vue 3 frontend
│ ├── src/
│ │ ├── pages/ # e.g. MalwareMindLanding.vue
│ │ ├── components/landing/ # Landing sections, Live detection UI
│ │ ├── composables/ # e.g. useMalwareAnalysis.js
│ │ └── ...
│ ├── public/
│ └── Dockerfile
│
├── malwaremind-server/
│ ├── src/
│ │ ├── main.py # FastAPI entry point
│ │ ├── module.py # CNN / inference integration
│ │ ├── model.py
│ │ ├── file2image.py
│ │ ├── fixed_model.h5 # Pre-trained weights (path used at runtime in container)
│ │ └── ...
│ └── Dockerfile
│
├── docker-compose.yml # Backend, frontend, MongoDB
├── render.yaml # Render deployment (still testing)
└── README.md
- Enhanced Model Training: Improving the accuracy of the CNN model by incorporating more data and fine-tuning the model.
- Additional File Formats: Extending the system to support a wider range of file formats for detection.
- User Feedback System: Adding functionality for users to provide feedback on detection results, potentially improving the model through retraining.
- Dynamic Threat Analysis: Integration with real-time threat intelligence feeds.
- Richer explainability: Deeper diagnostics beyond score cards (for example saliency or region-level cues on converted binary images) to support analyst review.
- Cloud Integration: Deploy the system on cloud platforms for scalability.
Contributions are welcome! Please follow the standard GitHub workflow:
- Fork the repository.
- Create a new branch (feature/new-feature).
- Commit changes and push to your branch.
- Submit a pull request for review.
For inquiries, please contact:
- Name: Darrius Chen
- Email: darriuschen0926@gmail.com
