Detection of an unauthorized modification to storage and restoration of the storage
An aspect includes monitoring storage of a computer system. Upon detecting an unauthorized modification to an original storage component in response to the monitoring, an aspect includes retrieving a backup component corresponding to the original storage component and repairing the original storage component using the backup component. In embodiments, the repair occurs in real-time without interruption to computer operation.
1. A method comprising:
monitoring a memory unit of a computer system, the monitoring includes monitoring a thread corresponding to the memory unit;
recalculating hash values for memory pages of the memory unit and validating the hash values; and
upon detecting a modification to a hash value for the memory unit:
retrieving a secure backup copy corresponding to the memory unit;
issuing a lock on the memory unit;
restoring the memory unit using the secure backup copy; and
removing the lock on the memory unit.
2. The method of claim 1 , wherein the repairing the memory unit further comprises:
disabling a kernel preemption and processor interrupts;
modifying a read only register to disable write protection; and
in response to completion of the repairing, modify the read only register to re-enable the memory write protection, re-enable the processor interrupts, and re-enable the kernel preemption.
3. A system comprising:
a memory comprising computer-executable instructions; and
a processor executing the computer-executable instructions, the computer-executable instructions when executed by the processor cause the processor to perform operations comprising:
intercepting, by a kernel driver of a system, a request for an original file of the system;
retrieving the original file and issuing a lock on the original file;
performing authentication on the original file;
upon detecting an unauthorized modification to the original file in response to the authentication:
retrieving a secure backup copy corresponding to the original file, the secure backup copy being an encrypted backup copy of the original file;
repairing the original file using the secure backup copy; and
returning the repaired original file to a requester of the original file; and
removing the lock on the original file.
4. The system of claim 3 , wherein the operations further comprise provisioning a database files stored in the system, the database of files including the original file, the provisioning comprising:
marking selected ones of the files with an identifier;
encrypting the selected ones of the files marked with the identifier via a hashing technique; and
storing the encrypted files in another database.
5. The system of claim 4 , wherein the operations further comprise:
obfuscating identifiers of each of the encrypted files.
6. The system of claim 4 , wherein the detecting the unauthorized modification to the original file includes verifying a hash value of the original file against a database of hash values corresponding to the encrypted backup copies of the files; and
wherein when the hash value of the original file does not match any of the hash values of the encrypted backup copies, the original file is determined to be modified.
7. The system of claim 6 , wherein the authentication is performed using keyed-hash message authentication code (HMAC); and
wherein the method further comprises verifying integrity of the encrypted backup copy of the original file prior to repairing the original file using the encrypted backup copy of the original file.
8. A method comprising:
intercepting, by a kernel driver of a computer system, a request for an original file of the computer system;
retrieving the original file and issuing a lock on the original file;
performing authentication on the original file;
upon detecting an unauthorized modification to the original file in response to the authentication:
retrieving a secure backup copy corresponding to the original file, the secure backup copy being an encrypted backup copy of the original file;
repairing the original file using the secure backup copy; and
returning the repaired original file to a requester of the original file; and
removing the lock on the original file.
9. The method of claim 8 , further comprising provisioning a database files stored in the computer system, the database of files including the original file, the provisioning comprising:
marking selected ones of the files with an identifier;
encrypting the selected ones of the files marked with the identifier via a hashing technique; and
storing the encrypted files in another database.
10. The method of claim 9 , further comprising:
obfuscating identifiers of each of the encrypted files.
11. The method of claim 9 , wherein the detecting the unauthorized modification to the original file includes verifying a hash value of the file against a database of hash values corresponding to the encrypted backup copies of the files; and
wherein when the hash value of the original file does not match any of the hash values of the encrypted backup copies, the original file is determined to be modified.
12. The method of claim 11 , wherein the authentication is performed using keyed-hash message authentication code (HMAC); and
wherein the method further comprises verifying integrity of the encrypted backup copy of the original file prior to repairing the original file using the encrypted backup copy of the original file.