DEV Community

Mihika
Mihika

Posted on • Edited on

Basic File Integrity Monitoring System

Git Repo : Git repo of File integrity monitoring system

This Python-based system monitors assigned files and directories, notifying you of any changes. To run it, use: python3 ./FIMS.py

If no changes are detected, you're notified:

File integrity checked, no changes found

If changes occur, you decide whether they're authorized:

changes found by file integrity monitoring system

If authorized, the baseline (which stores details like filename, permissions, and hashes) updates accordingly.

FIM system notification, baseline updated

If unauthorized, a report.txt is generated, logging the modifications for investigation.

unauthorized changes found by FIM system

this is what report.txt looks like:

report.txt will record unauthorized changes

To get started, clone the repo, modify the paths in create_baseline.py file.

Modifying the paths in create_baseline.py accordingly

run it to set up a baseline for monitoring:
python3 ./create_baseline.py

This will create baseline.csv file and snapshot directory.

also modify the paths in FIMS.py file.

Modifying the paths in FIMS.py accordingly

we mention some files to monitor in create_baseline.py separately and also mentioned a directory to monitor in FIMS.py
all done, run the script : python3 ./FIMS.py

Sentry image

Hands-on debugging session: instrument, monitor, and fix

Join Lazar for a hands-on session where you’ll build it, break it, debug it, and fix it. You’ll set up Sentry, track errors, use Session Replay and Tracing, and leverage some good ol’ AI to find and fix issues fast.

RSVP here →

Top comments (0)

Image of Datadog

Create and maintain end-to-end frontend tests

Learn best practices on creating frontend tests, testing on-premise apps, integrating tests into your CI/CD pipeline, and using Datadog’s testing tunnel.

Download The Guide