A beginner-friendly cybersecurity project that monitors multiple files inside a folder and detects unauthorized modifications using SHA256 hashing.
This tool helps verify file integrity and can be used to identify whether important files have been tampered with, modified, or deleted.
- Generates SHA256 hashes for all files inside a directory
- Stores file hashes in a JSON database (
hashes.json) - Verifies folder integrity at any time
- Detects:
- Modified files
- Deleted files
- Works as a basic File Integrity Monitoring (FIM) tool
File Integrity Monitoring is widely used in cybersecurity and SOC environments to:
- Detect malware tampering
- Monitor critical system and configuration files
- Ensure authenticity of important documents/software
- Support digital forensics and incident response
Even a small change in a file results in a completely different hash, making this method reliable for integrity checking.
- The tool scans all files in a folder
- Generates a unique SHA256 hash for each file
- Saves hashes into a database file (
hashes.json) - Later, compares the saved hashes with current hashes
- Alerts the user if any file has been modified or removed
python Integrity-Checker.py
2. Generate Hashes (First Time)
Choose: 1
Enter folder path: "your_folder_name"
3. Verify Folder Integrity
Run again and choose:2
The tool will check if any file has changed.
✅ Example Output
If no changes are detected:
✅ Folder integrity verified. No changes detected!
Modified file detected:
⚠️ WARNING: Changes detected in these files:
- example.txt (Modified)