Changeset 52973 in vbox
- Timestamp:
- Oct 7, 2014 12:15:09 PM (10 years ago)
- Location:
- trunk/src/VBox/HostDrivers/Support/win
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostDrivers/Support/win/SUPHardenedVerifyProcess-win.cpp
r52967 r52973 853 853 } 854 854 855 if ( pThis->enmKind == SUPHARDNTVPKIND_SELF_PURIFICATION 856 || pThis->enmKind == SUPHARDNTVPKIND_VERIFY_ONLY) 857 { 858 /* Ignore our patched LdrInitializeThunk hack. */ 859 rc = RTLdrGetSymbolEx(pImage->pCacheEntry->hLdrMod, pbBits, 0, UINT32_MAX, "LdrInitializeThunk", &uValue); 860 if (RT_FAILURE(rc)) 861 return supHardNtVpSetInfo2(pThis, rc, "%s: Failed to find 'LdrInitializeThunk': %Rrc", pImage->pszName, rc); 862 aSkipAreas[cSkipAreas].uRva = (uint32_t)uValue; 863 aSkipAreas[cSkipAreas++].cb = 14; 864 } 855 /* Ignore our patched LdrInitializeThunk hack. */ 856 rc = RTLdrGetSymbolEx(pImage->pCacheEntry->hLdrMod, pbBits, 0, UINT32_MAX, "LdrInitializeThunk", &uValue); 857 if (RT_FAILURE(rc)) 858 return supHardNtVpSetInfo2(pThis, rc, "%s: Failed to find 'LdrInitializeThunk': %Rrc", pImage->pszName, rc); 859 aSkipAreas[cSkipAreas].uRva = (uint32_t)uValue; 860 aSkipAreas[cSkipAreas++].cb = 14; 865 861 866 862 /* LdrSystemDllInitBlock is filled in by the kernel. It mainly contains addresses of 32-bit ntdll method for wow64. */ -
trunk/src/VBox/HostDrivers/Support/win/SUPR3HardenedMain-win.cpp
r52972 r52973 5489 5489 /* 5490 5490 * Convert the arguments to UTF-8 so we can open the log file if specified. 5491 * We may have to normalize the pointer on older windows version (not w7/64 +). 5491 5492 * Note! This leaks memory at present. 5492 5493 */ 5493 PUNICODE_STRING pCmdLineStr = &NtCurrentPeb()->ProcessParameters->CommandLine; 5494 PRTL_USER_PROCESS_PARAMETERS pUserProcParams = NtCurrentPeb()->ProcessParameters; 5495 UNICODE_STRING CmdLineStr = pUserProcParams->CommandLine; 5496 if ( CmdLineStr.Buffer != NULL 5497 && !(pUserProcParams->Flags & RTL_USER_PROCESS_PARAMS_FLAG_NORMALIZED) ) 5498 CmdLineStr.Buffer = (WCHAR *)((uintptr_t)CmdLineStr.Buffer + (uintptr_t)pUserProcParams); 5494 5499 int cArgs; 5495 char **papszArgs = suplibCommandLineToArgvWStub( pCmdLineStr->Buffer, pCmdLineStr->Length / sizeof(WCHAR), &cArgs);5500 char **papszArgs = suplibCommandLineToArgvWStub(CmdLineStr.Buffer, CmdLineStr.Length / sizeof(WCHAR), &cArgs); 5496 5501 supR3HardenedOpenLog(&cArgs, papszArgs); 5497 5502 SUP_DPRINTF(("supR3HardenedVmProcessInit: uNtDllAddr=%p\n", uNtDllAddr));
Note:
See TracChangeset
for help on using the changeset viewer.