VirtualBox

Changeset 52875 in vbox for trunk/src


Ignore:
Timestamp:
Sep 26, 2014 6:05:23 PM (11 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
96299
Message:

SUP: Log more details on system dlls and hot patching.

Location:
trunk/src/VBox/HostDrivers/Support/win
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostDrivers/Support/win/SUPHardenedVerifyProcess-win.cpp

    r52795 r52875  
    17671767    pEntry->fVerified = false;
    17681768
     1769#ifdef IN_SUP_HARDENED_R3
     1770    /*
     1771     * Log the image timestamp when in the hardened exe.
     1772     */
     1773    uint64_t uTimestamp = 0;
     1774    rc = RTLdrQueryProp(hLdrMod, RTLDRPROP_TIMESTAMP_SECONDS, &uTimestamp, sizeof(uint64_t));
     1775    SUP_DPRINTF(("%s: timestamp %#llx (rc=%Rrc)\n", pszName, uTimestamp, rc));
     1776#endif
     1777
    17691778    return VINF_SUCCESS;
    17701779}
  • trunk/src/VBox/HostDrivers/Support/win/SUPR3HardenedMain-win.cpp

    r52834 r52875  
    44474447                g_fSupAdversaries |= SUPHARDNT_ADVERSARY_UNKNOWN;
    44484448            cMsFudge = 512;
    4449             SUP_DPRINTF(("supR3HardenedWinInit: cFixes=%u g_fSupAdversaries=%#x\n", cFixes, g_fSupAdversaries));
     4449
     4450            /* Log the KiOpPrefetchPatchCount value if available, hoping it might sched some light on spider38's case. */
     4451            ULONG cPatchCount = 0;
     4452            NTSTATUS rcNt = NtQuerySystemInformation(SystemInformation_KiOpPrefetchPatchCount,
     4453                                                     &cPatchCount, sizeof(cPatchCount), NULL);
     4454            if (NT_SUCCESS(rcNt))
     4455                SUP_DPRINTF(("supR3HardenedWinInit: cFixes=%u g_fSupAdversaries=%#x cPatchCount=%#u\n",
     4456                             cFixes, g_fSupAdversaries, cPatchCount));
     4457            else
     4458                SUP_DPRINTF(("supR3HardenedWinInit: cFixes=%u g_fSupAdversaries=%#x\n", cFixes, g_fSupAdversaries));
    44504459        }
    44514460
     
    45604569
    45614570/**
    4562  * Logs information about a file from a protection product.
     4571 * Logs information about a file from a protection product or from Windows.
    45634572 *
    45644573 * The purpose here is to better see which version of the product is installed
     
    45664575 *
    45674576 * @param   pwszFile            The NT path to the file.
    4568  */
    4569 static void supR3HardenedLogAdversarialFile(PCRTUTF16 pwszFile)
     4577 * @param   fAdversarial        Set if from a protection product, false if
     4578 *                              system file.
     4579 */
     4580static void supR3HardenedLogFileInfo(PCRTUTF16 pwszFile, bool fAdversarial)
    45704581{
    45714582    /*
     
    50515062    for (uint32_t i = 0; i < RT_ELEMENTS(s_aFiles); i++)
    50525063        if (fFound & s_aFiles[i].fAdversary)
    5053             supR3HardenedLogAdversarialFile(s_aFiles[i].pwszFile);
     5064            supR3HardenedLogFileInfo(s_aFiles[i].pwszFile, true /* fAdversarial */);
    50545065
    50555066    return fFound;
     
    51025113
    51035114    /*
    5104      * Scan the system for adversaries.
     5115     * Log information about important system files.
     5116     */
     5117    supR3HardenedLogFileInfo(L"\\SystemRoot\\System32\\ntdll.dll", false /* fAdversarial */);
     5118    supR3HardenedLogFileInfo(L"\\SystemRoot\\System32\\kernel32.dll", false /* fAdversarial */);
     5119    supR3HardenedLogFileInfo(L"\\SystemRoot\\System32\\KernelBase.dll", false /* fAdversarial */);
     5120    supR3HardenedLogFileInfo(L"\\SystemRoot\\System32\\apisetschema.dll", false /* fAdversarial */);
     5121
     5122    /*
     5123     * Scan the system for adversaries, logging information about them.
    51055124     */
    51065125    g_fSupAdversaries = supR3HardenedWinFindAdversaries();
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette