A Python-based desktop application that detects unauthorized file changes using SHA-256 hashing and HMAC-SHA256 authentication.
File Integrity Monitor (FIM) helps protect files by creating a trusted baseline and comparing it against the current state of a selected directory. It detects modified, added, deleted, and unchanged files through a simple Tkinter dashboard.
- SHA-256 Hashing – Generates cryptographic hashes to verify file integrity.
- Baseline Management – Creates and stores trusted file references.
- HMAC Authentication – Verifies baseline authenticity and detects tampering.
- Change Detection – Identifies modified, added, deleted, and unchanged files.
- Background Scanning – Keeps the GUI responsive during scans.
- Security Alerts – Notifies users when file changes are detected.
- Activity Logging – Records application activities and scan results.
- GUI Dashboard – Displays file statuses in an easy-to-use interface.
- Python and Tkinter
- SHA-256 and HMAC-SHA256
- JSON
- Threading
- Logging
FileIntegrityMonitor/
├── core/
│ ├── __init__.py
│ ├── hasher.py
│ ├── baseline.py
│ ├── integrity_checker.py
│ └── logger.py
├── data/
├── logs/
├── test_folders/
├── main.py
├── requirements.txt
├── README.md
├── LICENSE
└── .gitignore
git clone https://github.com/YOUR-USERNAME/FileIntegrityMonitor.git
cd FileIntegrityMonitor
python -m venv .venvActivate the virtual environment on Windows CMD:
.venv\Scripts\activate.batRun the application:
python main.pyNote: No external Python packages are currently required.
- Launch the application.
- Select a folder to monitor.
- Click Create Baseline to save its trusted state.
- Click Scan Files to detect changes.
- Review the results and activity logs.
| Status | Description |
|---|---|
| UNCHANGED | File matches the baseline. |
| MODIFIED | Existing file content has changed. |
| ADDED | A new file was detected. |
| DELETED | A monitored file is missing. |
| ERROR | A file could not be accessed. |
- HMAC-SHA256 authenticates baseline data using a protected secret key stored outside the project directory.
- Keep the secret key secure. Anyone who obtains it may forge an authenticated baseline.
- Missing or invalid keys prevent baseline authentication.
- Scanning is currently manual; continuous real-time monitoring is not supported.
- Avoid committing secret keys, personal baselines, or sensitive logs to public repositories.
This project is licensed under the MIT License.
Developed as a Python cybersecurity project focused on file integrity monitoring, cryptographic hashing, and baseline authentication.