Malware Detection System
Desktop machine-learning app that scans a Windows .exe / .dll file's header and predicts malware or legitimate, comparing 6 models, with charts and a scan history. Python, Tkinter, scikit-learn, pefile.
- Price: ₹1,999
- Category: Security
- Technology: Python, Tkinter, scikit-learn, pefile, pandas, Matplotlib, SQLite
- Includes: Source code + database
- Suitable for: BCA / B.Sc CS, MCA / M.Sc CS, B.E / B.Tech CSE & IT
Project overview
Signature-based antivirus is slow to recognise new malware variants, but the structure of a Windows program's header already says a lot about it. This desktop application trains six classifiers - Random Forest, Gradient Boosting, Decision Tree, K-Nearest Neighbours, Logistic Regression and SVM - on a public dataset of about 16,000 unique Windows programs described by 12 PE-header values, and compares them with accuracy, precision, recall and F1 score, a bar chart and a confusion matrix (tree-based models reach about 98 percent on unseen files). The best model is saved automatically. On the Predict screen the user clicks 'Analyze a program file', picks any .exe or .dll, and the application reads the header with the pefile library and shows whether the file looks like malware or legitimate, with a confidence percentage and a probability chart; the 12 values can also be typed by hand. The program is never executed. Every scan is kept in a history that can be exported to CSV, and a dataset explorer shows the records, class balance and correlation heatmap.
Modules
- Login: Admin login with a salted password hash; the password can be changed from the Home screen.
- Home: Shows records, input fields, classes, the active model and its accuracy.
- Dataset explorer: Browse the PE-header records; class distribution, correlation heatmap and feature histograms.
- Train & Compare: Train 6 models in the background; accuracy, precision, recall, F1 table; bar chart; confusion matrix; CSV export.
- File scanner (Predict): Browse an .exe / .dll, read its header with pefile and predict malware or legitimate; or type the 12 values; confidence and probability chart.
- History: Every scan saved with time and values; export to CSV or clear.
Requirements
- Python 3.11
- Internet once, to install the libraries (about 3 minutes)
- Windows 10 / 11
How to run this project
- Install Python 3.11 from python.org and tick "Add python.exe to PATH" during setup.
- Extract the zip and open the project folder (STUDENT_GUIDE.md explains every step in simple words).
- Double-click `1_INSTALL.bat` once and wait until it says [OK] (about 3 minutes; it downloads the libraries into a private .venv folder).
- Double-click `2_RUN.bat` to start the project. If it does not start, double-click `CHECK_SETUP.bat` and read what it says.
- Log in with admin / admin123.
- Open Train & Compare and click Train: compare the 6 models and open the confusion matrix. Open Predict, click 'Analyze a program file...' and pick notepad.exe or any .exe; then try a downloaded installer and compare.