Pages

marți, 16 iunie 2026

Tool : a simple PowerShell script for UEFI, VeraCrypt, and more security information.

UEFI Secure Boot keys, used to sign the first stage boot loader, are expiring in June 2026
First, let's see this information that could highlight the intrusion capabilities of a hacking attack on an information system in time and space:
1. Secure Boot, even with old keys – protects BEFORE Windows starts
Secure Boot protects against:
  • bootkits
  • UEFI rootkits
  • bootloader tampering
  • malware that injects itself before Windows loads
It is a hardware + firmware protection, enforced by UEFI.
Even if your keys are old, Secure Boot is still:
  • much safer than having Secure Boot disabled
  • a firmware‑level protection
  • impossible to bypass without physical access + complex attacks
Old keys do not mean “insecure”; it only means Microsoft will replace them in the future.
2. VeraCrypt System Encryption – protects AFTER the bootloader starts
VeraCrypt protects:
  • the data on your disk
  • the confidentiality of your files
  • access to your system if someone steals your laptop
But it does NOT protect against:
  • bootkits
  • UEFI rootkits
  • bootloader tampering
  • firmware‑level attacks
Because VeraCrypt:
  • replaces the Windows bootloader
  • disables Secure Boot
  • is not cryptographically signed for UEFI
  • does not provide protection against pre‑boot attacks
One basic script created by copilot to show some info:
Add-Type -AssemblyName System.Windows.Forms
Add-Type -AssemblyName System.Drawing

$form = New-Object System.Windows.Forms.Form
$form.Text = "UEFI Bootloader Detector"
$form.Size = New-Object System.Drawing.Size(800,600)
$form.StartPosition = "CenterScreen"

$box = New-Object System.Windows.Forms.TextBox
$box.Multiline = $true
$box.ScrollBars = "Vertical"
$box.ReadOnly = $true
$box.Font = New-Object System.Drawing.Font("Consolas",10)
$box.Dock = "Fill"
$form.Controls.Add($box)

function Add-Line($text) {
    $box.AppendText($text + "`r`n")
}

Add-Line "=== UEFI Bootloader Detector ==="
Add-Line ""

# Montăm partiția EFI
mountvol S: /s | Out-Null

Add-Line "EFI Partition Contents:"
$efi = Get-ChildItem S:\EFI -ErrorAction SilentlyContinue
foreach ($item in $efi) {
    Add-Line "  $($item.Name)"
}

Add-Line ""
Add-Line "=== Bootloader Detection ==="

# Windows Boot Manager
Add-Line ""
Add-Line "Windows Boot Manager:"
if (Test-Path "S:\EFI\Microsoft\Boot\bootmgfw.efi") {
    Add-Line "  ✔ Windows bootloader detected"
} else {
    Add-Line "  ✖ Windows bootloader NOT found"
}

# VeraCrypt
Add-Line ""
Add-Line "VeraCrypt:"
if (Test-Path "S:\EFI\VeraCrypt\DcsBoot.efi") {
    Add-Line "  ✔ VeraCrypt bootloader detected"
} else {
    Add-Line "  ✖ VeraCrypt bootloader NOT found"
}

# GRUB
Add-Line ""
Add-Line "GRUB:"
$grubPaths = @(
    "S:\EFI\ubuntu\grubx64.efi",
    "S:\EFI\fedora\grubx64.efi",
    "S:\EFI\debian\grubx64.efi",
    "S:\EFI\opensuse\grubx64.efi",
    "S:\EFI\centos\grubx64.efi"
)

$grubFound = $false
foreach ($path in $grubPaths) {
    if (Test-Path $path) {
        Add-Line "  ✔ GRUB detected at $path"
        $grubFound = $true
    }
}
if (-not $grubFound) {
    Add-Line "  ✖ GRUB not found"
}

# rEFInd
Add-Line ""
Add-Line "rEFInd:"
if (Test-Path "S:\EFI\refind\refind_x64.efi") {
    Add-Line "  ✔ rEFInd detected"
} else {
    Add-Line "  ✖ rEFInd not found"
}

# systemd-boot
Add-Line ""
Add-Line "systemd-boot:"
if (Test-Path "S:\EFI\systemd\systemd-bootx64.efi") {
    Add-Line "  ✔ systemd-boot detected"
} else {
    Add-Line "  ✖ systemd-boot not found"
}

# Fallback EFI
Add-Line ""
Add-Line "Fallback Bootloader:"
if (Test-Path "S:\EFI\Boot\bootx64.efi") {
    Add-Line "  ✔ Fallback bootloader detected (bootx64.efi)"
} else {
    Add-Line "  ✖ Fallback bootloader not found"
}

Add-Line ""
Add-Line "=== Detection Complete ==="

$form.ShowDialog()