This document details all technologies, tools, libraries, and concepts used in the Secure Boot and Kernel Integrity Verification System.
| Language | Purpose | Files |
|---|---|---|
| C | Core implementation (crypto, signing, verification) | src/**/*.c |
| Shell Script (Bash) | Automation, testing, demos | scripts/*.sh, tests/*.sh |
| HTML/CSS | Test report generation | generate_html_report.sh |
| Makefile | Build system | Makefile |
- Version: 1.1.x / 3.x compatible
- Purpose: Cryptographic operations
- Components Used:
libssl- SSL/TLS implementationlibcrypto- Cryptographic primitives
Specific APIs Used:
// Hash functions
#include <openssl/sha.h> // SHA256_Init, SHA256_Update, SHA256_Final
// RSA operations
#include <openssl/rsa.h> // RSA key operations
#include <openssl/pem.h> // PEM file I/O
#include <openssl/evp.h> // High-level crypto interface
#include <openssl/err.h> // Error handlingstdio.h- File I/O operationsstdlib.h- Memory managementstring.h- String manipulationtime.h- Timestampssys/stat.h- File attributes
| Property | Value |
|---|---|
| Output Size | 256 bits (32 bytes) |
| Block Size | 512 bits |
| Security | 128-bit collision resistance |
| Standard | FIPS 180-4 |
Purpose: Create unique fingerprint of kernel binary
| Property | Value |
|---|---|
| Key Size | 2048 bits |
| Security Level | ~112 bits |
| Signature Size | 256 bytes |
| Standard | PKCS#1 v2.1 |
Purpose: Digital signature generation and verification
RSASSA-PKCS1-v1_5 with SHA-256
Signature = RSA_Sign(SHA256(Kernel), PrivateKey)
Sequential verification where each component verifies the next before execution.
Firmware → Bootloader → Kernel → OS
↓ ↓ ↓
Verify Verify Verify
Cryptographic proof of authenticity and integrity using asymmetric key pairs.
Mechanism to invalidate compromised keys by maintaining a blocklist.
Timestamps embedded in signatures to prevent reuse of old valid signatures.
Hash-based verification to detect any modification to protected files.
Separation of concerns across distinct modules:
- Crypto module
- Logger module
- Signer module
- Verifier module
Multiple validation layers:
- File existence check
- File size validation
- Format verification
- Suspicious pattern detection
- Signature verification
System denies boot on any verification failure.
| Tool | Purpose |
|---|---|
| GCC | C compiler |
| Make | Build automation |
| ld | Linker |
| Tool | Purpose |
|---|---|
| Bash | Test automation |
| dd | Binary file creation |
| diff | File comparison |
| stat | File information |
| Tool | Purpose |
|---|---|
| chkrootkit | Rootkit detection |
| rkhunter | Rootkit hunter |
| openssl | Key/signature operations |
Base64 encoded format for cryptographic keys.
-----BEGIN RSA PRIVATE KEY-----
MIIEowIBAAKCAQEA...
-----END RSA PRIVATE KEY-----
Raw binary RSA signature (256 bytes for RSA-2048).
[TIMESTAMP] [LEVEL] MESSAGE
[2024-12-09 15:30:45] [SUCCESS] Kernel verified
- BIOS/UEFI firmware initialization
- Bootloader execution (GRUB)
- Kernel loading and execution
- User-space initialization
- Ring 0 privilege level
- Kernel integrity importance
- Rootkit/bootkit threats
- File permissions (chmod)
- User/group ownership
- Principle of least privilege
| Standard | Description |
|---|---|
| UEFI Secure Boot | Industry secure boot specification |
| FIPS 180-4 | SHA-2 hash standard |
| PKCS#1 | RSA cryptography standard |
| X.509 | Public key certificate format |
| TPM 2.0 | Hardware security module spec |
- OS: Kali Linux (in VirtualBox)
- IDE: VS Code, Vim, or any C editor
- Debugger: GDB
- Version Control: Git
- RAM: 4GB minimum
- CPU: 2 cores
- Storage: 40GB
- Network: NAT
| Operation | Complexity | Time (typical) |
|---|---|---|
| SHA-256 Hash | O(n) | ~5ms per 512KB |
| RSA Sign | O(1) | ~15ms |
| RSA Verify | O(1) | ~2ms |
- OpenSSL Documentation - https://www.openssl.org/docs/
- UEFI Specification - https://uefi.org/specifications
- Linux Kernel Documentation - https://www.kernel.org/doc/
- NIST Cryptographic Standards - https://csrc.nist.gov/
- Modern Operating Systems by Andrew S. Tanenbaum