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

Do your career a big favor. Join DEV. (The website you're on right now)

It takes one minute, it's free, and is worth it for your career.

Get started

Community matters

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

πŸ‘‹ Kindness is contagious

Discover a treasure trove of wisdom within this insightful piece, highly respected in the nurturing DEV Community enviroment. Developers, whether novice or expert, are encouraged to participate and add to our shared knowledge basin.

A simple "thank you" can illuminate someone's day. Express your appreciation in the comments section!

On DEV, sharing ideas smoothens our journey and strengthens our community ties. Learn something useful? Offering a quick thanks to the author is deeply appreciated.

Okay