File Integrity Checker

Verify the integrity of application log files to detect tampering.

Start building, submit solution and get feedback from the community.
2Submit Solutionยท
5 upvotes10 upvotes

You are required to develop a tool that verifies the integrity of log files to detect tampering. This tool can be used to enhance security measures by using techniques such as file integrity monitoring and hashing to ensure that no unauthorized changes have been made to the log files.

Requirements

The tool should be capable of the following:

  • Accept a directory or a single log file as input.
  • Utilize a cryptographic hashing algorithm, such as SHA-256, to compute hashes for each log file provided.
  • On first use, store the computed hashes in a secure location.
  • For subsequent uses, compare the newly computed hashes against the previously stored ones.
  • Clearly report any discrepancies found as a result of the hash comparison, indicating possible file tampering.
  • Allow for manual re-initialization of log file integrity.

Here is the example of how it might look like

> ./integrity-check init /var/log  # Initializes and stores hashes of all log files in the directory
> Hashes stored successfully.

> ./integrity-check check /var/log/syslog
> Status: Modified (Hash mismatch)
# Optionally report the files where hashes mismatched

> ./integrity-check -check /var/log/auth.log
> Status: Unmodified

> ./integrity-check update /var/log/syslog
> Hash updated successfully.

After completing this project you will get the idea of hashing algorithms, security and writing scripts.

Found a mistake? Help us improve.

Actively Maintained

We are always improving our content, adding new resources and adding features to enhance your learning experience.

Join the Community

roadmap.sh is the 7th most starred project on GitHub and is visited by hundreds of thousands of developers every month.

Rank 7th  out of 28M!

301K

GitHub Stars

Star us on GitHub
Help us reach #1

+90k every month

+1.5M

Registered Users

Register yourself
Commit to your growth

+2k every month

30K

Discord Members

Join on Discord
Join the community

Roadmaps Best Practices Guides Videos FAQs YouTube

roadmap.sh by @kamrify

Community created roadmaps, best practices, projects, articles, resources and journeys to help you choose your path and grow in your career.

© roadmap.sh · Terms · Privacy · Advertise ·

ThewNewStack

The top DevOps resource for Kubernetes, cloud-native computing, and large-scale development and deployment.