/BootSector-Protect

A program written in C that protects the boot sector of a disk from being executed or modified.

Primary LanguageCMIT LicenseMIT

Boot Sector Protector

A program written in C that protects the boot sector of a disk from being executed or modified.

Features

  • Prevents the boot sector from being executed by setting the first byte to 0x00.
  • Encrypts the boot sector using AES-256 in GCM mode with a randomly generated key and IV.
  • Generates the key and IV using a secure random number generator.
  • Written in portable C and uses the OpenSSL library for encryption.

Usage

To use this program, compile it with the -lcrypto flag to link against the OpenSSL library. Then, run it with the path to the boot sector file as the only command line argument. For example:

$ gcc -o protect -lcrypto protect.c
$ ./protect /path/to/boot/sector/file

When booting the system, you will need to have the key and IV in order to decrypt the boot sector and access the rest of the operating system. These values are not stored in a predictable location and must be generated using the same random number generator as the one used by this program.

License

This project is licensed under the MIT License - see the LICENSE file for details.