Hacker News new | ask | show | jobs
by ptx 28 days ago
But they do load from the working directory by default [0] and until XP SP2 they put it before system32 in the search order [1] by default.

[0] https://learn.microsoft.com/en-us/windows/win32/dlls/dynamic...

[1] https://learn.microsoft.com/en-us/windows/win32/dlls/dynamic...

1 comments

The first link shows it loads from the folder of the application before the working directory even when the safe default is disabled.
Yes, the link shows that the application loads DLLs from many places, one of which is the working directory, which is placed earlier in the search order when safe DLL search mode is disabled, which is less safe than the safe mode.

As the second link says, the safe DLL search mode is "increasing the chances that Windows will find a legitimate copy of the DLL before a malicious copy", implying that the less safe mode, which was the default in earlier versions of Windows, as I said, decreases the chances of finding the legitimate DLL first, i.e. it increases the risk of loading a malicious DLL from the working directory.