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

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

Top comments (0)

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more