Menu

I Built a File Integrity Checker Using Python and HMAC
📰

I Built a File Integrity Checker Using Python and HMAC

DEV Community: cybersecurity·Rishi Kumavat·10 days ago
#J2lSz4x8
#devtocybersecurity#devto#dev#file#baseline
Long article (404 words) — no AI summary yet.
Reading 0:00
15s threshold

As someone learning cybersecurity, I believe the best way to understand security concepts is to implement them through practical projects.

Recently, I completed a project called File Integrity Checker , based on the File Integrity Checker challenge from roadmap.sh.

The idea behind this project is simple: detect whether monitored log files have been modified, deleted, or newly added.

What does it do?

The File Integrity Checker is a Python-based command-line tool that monitors .log files and checks whether their contents have changed since the trusted baseline was created.

It can identify:

UNMODIFIED: The file content has not changed.

MODIFIED: The file content has been changed.

MISSING: A previously monitored file has been deleted.

NEW: A new log file has been detected.

NOT_MONITORED: The specified file is not part of the baseline.

Technologies used

Python

SHA-256 hashing

HMAC-SHA256 authentication

JSON for baseline storage

Argparse for the command-line interface

Unittest for automated…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.