Skip to content

Botacin-s-Lab/malware-classification-web-ui

Repository files navigation

Malware Classification Web UI

This project is a web-based application for malware classification. It allows users to interact with machine learning models to understand how different features affect the classification of software as malicious or benign. The application is built with Python and the Django web framework. It's available for public at https://lab.ali-ayati.com.

The core of the application involves training machine learning models (likely using scikit-learn and pandas) and visualizing the results (using matplotlib). The frontend is likely built using standard HTML, CSS, and JavaScript, served by Django's templating engine.

The entire application is designed to be run in Docker containers, with Nginx acting as a reverse proxy for the Gunicorn application server.

Key Technologies

  • Backend: Python, Django, Gunicorn
  • Machine Learning: scikit-learn, pandas, matplotlib
  • Frontend: HTML, CSS, JavaScript (within Django templates)
  • Database: SQLite (default)
  • Deployment: Docker, Nginx

Architecture

The project follows a standard Django architecture:

  • csday: The main Django project directory containing settings and root URL configurations.
  • dashboard: A Django app that handles the main user-facing features like challenges, results, and leaderboards.
  • users: A Django app for user authentication and management.
  • ml_model: A Python package containing the machine learning model training logic.
  • templates: Contains the HTML templates for the application.
  • static: Contains the static assets (CSS, JavaScript).

Building and Running

The project is designed to be built and run using Docker Compose.

Prerequisites

  • Docker
  • Docker Compose

Running the Application

  1. Create an environment file: Copy the dotenv_template to a new file named .env.prod and fill in the required environment variables.

    cp dotenv_template .env.prod
  2. Build and start the containers:

    docker-compose up --build

    This command will build the Docker image for the web application, start the web and nginx services, and run the necessary database migrations.

  3. Access the application: The application should be accessible at http://localhost:80 in your web browser.

Development

For development, you can run the Django development server directly:

  1. Install dependencies:

    pip install -r requirements.txt
  2. Run database migrations:

    python manage.py migrate
  3. Start the development server:

    python manage.py runserver

    The application will be available at http://localhost:8000.

Development Conventions

  • Code Style: The Python code appears to follow standard PEP 8 conventions.
  • Configuration: Application configuration is managed through environment variables (see dotenv_template).
  • Static Files: Static files are managed by Django's staticfiles app and are collected into a staticfiles directory for production.
  • Dependencies: Python dependencies are managed in requirements.txt.

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •