MSS: (SafeDllSearchMode) Enable Safe DLL search mode (recommended)
|ID: oval:gov.nist.usgcb.windowsseven:def:135||Date: (C)2012-04-13 (M)2017-10-21|
|Class: COMPLIANCE||Family: windows|
Most programs on the Windows platform make use of various Dynamic Link Libraries (DLL) to avoid having to reimplement functionality. The operating system actually loads several DLLs for each program, depending on what type of program it is. When the program does not specify an absolute location for a DLL, the default search order is used to locate it.
By default, the search order used by the operating system is as follows:
3. Manifests and .local
4. Application directory
5. Current working directory
6. System directories (%systemroot%, %systemroot%\system, and %systemroot%\system32)
7. The path variable
The fact that the current working directory is searched before the system directories can be used by someone with access to the file system to cause a program launched by a user to load a spoofed DLL.
If a user launches a program by double-clicking a document, the current working directory is actually the location of the document. If a DLL in that directory has the same name as a system DLL in that location will then be loaded instead of the system DLL. This attack vector was actually used by the Nimda virus. To combat this, a new setting was created in Service Pack 3, which moves the current working directory to after the system directories in the search order. To avoid application compatibility issues, however, this switch was not turned on by default. To turn it on, set the following registry valueMACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\SafeDllSearchMode
(1) GPO: Computer Configuration\Windows Settings\Security Settings\Local Policies\Security Options\MSS: (SafeDllSearchMode) Enable Safe DLL search mode (recommended)
(2) REG: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager!SafeDllSearchMode
|Microsoft Windows 7|