Browse Source

Minor fixes

pull/20/head
Valentin Radu 4 years ago
parent
commit
9afbc50cca
  1. 2
      ExplorerPatcher/dllmain.c
  2. 2
      README.md

2
ExplorerPatcher/dllmain.c

@ -1386,7 +1386,7 @@ DWORD OpenStartOnCurentMonitorThread(LPVOID unused) @@ -1386,7 +1386,7 @@ DWORD OpenStartOnCurentMonitorThread(LPVOID unused)
DWORD PlayStartupSound(DWORD x)
{
Sleep(1000);
Sleep(2000);
printf("Started \"Play startup sound\" thread.\n");
HRESULT hr = CoInitialize(NULL);

2
README.md

@ -31,7 +31,7 @@ To uninstall, simply delete `dxgi.dll` from `%windir%`. @@ -31,7 +31,7 @@ To uninstall, simply delete `dxgi.dll` from `%windir%`.
#### How does this work?
The mechanism the application gets loaded is by exploiting the DLL search order in Windows. I take advantage of the fact that Explorer is one of the few system processes located in `%windir%` and not in `%windir%\System32`, so it does not affect most apps. Also, `%windir%` is not in the search path. Read more about this technique [here](https://itm4n.github.io/windows-dll-hijacking-clarified/). The main advantage here is that you do not have to keep an extra process running in the memory; plus, due to the diverse nature of how Explorer is launched, hooking it can be difficult.
The mechanism the application gets loaded is by exploiting the DLL search order in Windows. I take advantage of the fact that Explorer is one of the few system processes located in `%windir%` and not in `%windir%\System32`, so it does not affect most apps. Also, `%windir%` is not first in the search path. Read more about this technique [here](https://itm4n.github.io/windows-dll-hijacking-clarified/). The main advantage here is that you do not have to keep an extra process running in the memory; plus, due to the diverse nature of how Explorer is launched, hooking it can be difficult.
I picked `dxgi.dll` because it is not on the `HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\KnownDLLs` list, because it has few exports and is loaded very early by Explorer, when calling the `DXGIDeclareAdapterRemovalSupport()` function.

Loading…
Cancel
Save