Messages in this thread | | | From | "Andrew G. Morgan" <> | Subject | signing a filesystem | Date | Fri, 27 Dec 1996 16:23:24 -0800 (PST) |
| |
Hi,
I've been wondering about the following scheme for making a filesystem tamper-resistant. Would it be possible to digitally sign each inode?
My thoughts on this are currently at an early stage, but here they are for your comments:
Files on a filesystem contain some integer number of blocks. I can, for example, compute the md5 checksum of each block. For all the blocks in a file (as referenced by its inode), I can compute the individual md5 checksums and then combine the result with XOR to obtain a unique footprint for the file.
Such a footprint would be stored in the file's inode. Any change to the file without ammending the recorded footprint could be verified by some filesystem admin-tool. [This could be done at boot time on extra sensitive filesystems, or periodically when the system is off-line if this is not practical.]
Because the recorded footprint is the result of XORing the individual block checksums that combine to make the whole file, it is relatively simple to update the footprint when a single block is modified.
new-footprint = old-footprint ^ md5(old-block) ^ md5(new-block)
At this point, it is simple to "forge" a modified footprint since md5 is a publically available algorithm, so the above scheme would be good only against accidental filesystem corruption.
To guard against a vandal booting from a rogue-kernel, and modifying a filesystem before rebooting linux again, an extra element of security would be to compute the md5 checksum of each block appended with some "secret" key given to the kernel at boot time:
lilo: linux fs-key=BigSecret
Is this something that could be added to ext2 without too much hassle? Perhaps someone has already thought about this? I'd be interested to hear any comments..
Best wishes
Andrew -- Linux-PAM: http://parc.power.net/morgan/Linux-PAM/index.html libpwdb: http://parc.power.net/morgan/libpwdb/index.html [ For those that prefer FTP --- ftp://ftp.lalug.org/morgan ]
| |