FileGuard-FIM (File Integrity Monitoring) is a professional-grade, real-time security tool designed to detect unauthorized file system changes instantly. It monitors critical directories and alerts you via Desktop Notifications and Email Alerts the moment a file is accessed, modified, created, or deleted.
- Real-Time Detection: Monitors file events (Create, Modify, Delete, Move) with zero latency.
- Dual Alerting:
- 🖥️ Desktop Pop-ups: Instant visual feedback on your screen.
- 📧 Email Notifications: Detailed activity reports sent to your inbox.
- Spam Prevention: Configurable cooldown periods to prevent inbox flooding.
- Detailed Logging: Comprehensive audit trail saved to
logs/activity.log. - Cross-Platform: Works efficiently on Linux and Windows.
- Open
config.jsonin the project folder. - Add Folders: Update
"monitor_folders"with the paths you want to protect. - Setup Email (Crucial for Alerts):
- Gmail Users: You MUST use an App Password.
- Go to Google Account > Security > 2-Step Verification > App Passwords.
- Generate a new password and paste it into
"email_password". - Set
"sender_email"to your Gmail address.
{
"monitor_folders": [
"/home/user/Desktop/critical_files", (Your Folder path)
"/var/www/html"
],
"sender_email": "your_email@gmail.com",
"email_password": "abcdefghijklmnop",
...
}Ensure you have Python 3 installed. Linux users should use a virtual environment to manage dependencies cleanly.
Open your terminal in the FileGuard-FIM directory and run:
# Create a virtual environment
python3 -m venv venv
# Activate the environment
source venv/bin/activate
# Install required libraries
pip install watchdog plyerTo start monitoring, simply run:
# Ensure your virtual environment is active (you should see (venv) in your prompt)
python fileguard_fim.pyTo keep the tool running even after you close the terminal:
nohup python fileguard_fim.py > /dev/null 2>&1 &To stop it later, run pkill -f fileguard_fim.py.
All detected activities are recorded in logs/activity.log with precise timestamps:
2025-12-28 20:38:57 - File/Folder Created - /path/to/file.txt
2025-12-28 20:39:00 - File Modified - /path/to/file.txt
This tool is intended for defensive security monitoring. Protect your config.json file as it contains sensitivity email credentials (chmod 600 config.json is recommended).
This project is licensed under the MIT License. See the LICENSE file for details.