Reply to thread

Forgive my naive post in this thread. I thought that enabling safe search mode would stop DLL hijacking?

[SPOILER="Registry key"]

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager]

"SafeDllSearchMode"=dword:00000001

[/SPOILER]

___________________

EDIT 1

According to Microsoft it is enabled by default now

[SPOILER="SafeSearchDLL order"]

Safe DLL search mode is enabled by default.


If SafeDllSearchMode is enabled, the search order is as follows:

  1. The directory from which the application loaded.
  2. The system directory. Use the GetSystemDirectory function to get the path of this directory.
  3. The 16-bit system directory. There is no function that obtains the path of this directory, but it is searched.
  4. The Windows directory. Use the GetWindowsDirectory function to get the path of this directory.
  5. The current directory.
  6. The directories that are listed in the PATH environment variable. Note that this does not include the per-application path specified by the App Paths registry key. The App Paths key is not used when computing the DLL search path.

[/SPOILER]

--------------------------

EDIT 2


I am understanding it now, by starting an application in a User folder, the replacement DLL hijacks the DLL loading because it is in the "The directory from which the application loaded." :eek:


;) Luckily my WDAC policy only allows Microsoft signed (and Syncback) DLL's to execute in user space. :cool:


About us

  • MalwareTips is a community-driven platform providing the latest information and resources on malware and cyber threats. Our team of experienced professionals and passionate volunteers work to keep the internet safe and secure. We provide accurate, up-to-date information and strive to build a strong and supportive community dedicated to cybersecurity.

User Menu

Follow us

Follow us on Facebook or Twitter to know first about the latest cybersecurity incidents and malware threats.

Top