Lumina is a machine learning-powered malware detection system that analyzes Windows PE files. It extracts 50+ static features and uses a LightGBM classifier to detect malware with 99.9% accuracy.
- Fast Analysis: < 2 seconds per file
- Static Analysis: No file execution required
- REST API: Easy integration
- Batch Processing: Analyze multiple files
- Detailed Results: Confidence scores & probability breakdowns
git clone https://github.com/IFTE-13/Lumina-API.git
cd Lumina-API
# Create virtual environment
python -m venv venv
venv\Scripts\activate # Windows
# source venv/bin/activate # Linux/Mac
# Install dependencies
pip install -r requirements.txt# Collect benign Windows executables
python setup_benign_data.py
# Download malicious dataset from:
# https://data.mendeley.com/datasets/vnj7sxkt53/1
# Place Header.csv in dataset/
# Build balanced dataset
python build_dataset.pypython train_model.pyThis creates:
- malware_model.pkl - Trained model
- scaler.pkl - Feature scaler
- feature_columns.pkl - Feature names
python app.pyServer runs at http://localhost:8000
| Method | Endpoint | Description |
|---|---|---|
GET |
/ |
API info |
GET |
/health |
Health check |
POST |
/predict |
Analyze .exe file |
# Health check
curl http://localhost:8000/health
# Analyze a file
curl -X POST http://localhost:8000/predict -F "file=@sample.exe"{
"filename": "sample.exe",
"verdict": "MALICIOUS",
"confidence": 95.5,
"probability_benign": 0.045,
"probability_malicious": 0.955
}# Test with EICAR (rename to .exe first)
curl -X POST http://localhost:8000/predict -F "file=@eicar.exe"
# Test with legitimate Windows executable
curl -X POST http://localhost:8000/predict -F "file=@notepad.exe"| Metric | Score |
|---|---|
| Accuracy | 97.1% |
| Precision | 95.4% |
| Recall | 97.8% |
| F1 Score | 97.1% |
- Python 3.10+
- 4GB RAM minimum
- Windows OS (for benign sample collection)
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (git checkout -b feature/AmazingFeature)
- Commit your changes (git commit -m 'Add some AmazingFeature')
- Push to the branch (git push origin feature/AmazingFeature)
- Open a Pull Request
- PEFile - PE parsing
- LightGBM - ML framework
- Mendeley Dataset - Training data
MOHAMMED IFTEKHAR
GitHub: @IFTE-13