File Integrity Check Script (size+mtime)

I recently showed an example of a file integrity check script that calculates SHA-256 hashes. However, if the files are large and 100 gigabytes or more, this will naturally put a significant load on the disk system. Therefore, if this is critical and slows down other processes, I will give an example of a simple script that works much faster. It simply checks the file size and mtime (modification time). However, it is worth considering that, unlike the SHA-256 hash, an attacker can specify the mtime of a new, substituted, infected file similar to the old one.

Continue reading “File Integrity Check Script (size+mtime)”