Hi @ll, IExpress () creates executable installers [°] or self-extracting archives for Windows by embedding a .CAB archive and some strings as resources into a copy of the program %SystemRoot%\System32\WExtract.exe. These self-extracting archives/executable installers, especially those made by Microsoft ['] (available in the Microsoft download center or distributed per Windows Update), are vulnerable: 1. If built with WExtract.exe of a system supporting the NTFS "encrypting file system", i.e. Windows NT5.x, Windows NT6.x or Windows 10, and run under these versions of Windows, they load and execute a rogue/bogus/malicious FEClient.dll [²] eventually found in the directory they are started from (the "application directory"). For software downloaded with a web browser this is typically the "Downloads" directory: see , and If FEClient.dll gets planted in the "Downloads" directory per "drive-by download" this vulnerability becomes a remote code execution. Due to an application manifest embedded in the executable which specifies "requireAdministrator" or the "installer detection" (see ) of Windows' "user account control" executable installers are typically started with administrative privileges ("protected" administrators are prompted for consent, unprivileged standard users are prompted for an administrator password); execution of FEClient.dll then results in an escalation of privilege! 2. They call CreateProcess() with command line(s) set during package creation. These command lines have to be specified with unqualified (simple) filenames since the absolute pathnames on the target system are unknown. Due to CreateProcess() process search order they will run rogue executables with the specified simple filename(s) eventually found in the directory they are started from. See . DON'T USE (especially step 8. which uses simple filenames in the command line)! DON'T USE (especially step 3.h. which uses simple filenames in the command line)! 3. They extract their payload to an unsafe temporary (sub)directory "%TEMP%\IXP<3_digits>.TMP\" and process or execute it from there [³]. The files comprising the payload can be overwritten or compromised by an unprivileged user after extraction and before their later use. 4. Executable (un)installers distributed per software deployment system (for example WSUS) or wrapped into a .MSI for deployment per group policies are (typically) run under "LocalSystem" account. From : | The list of trusted root certificates is available as a self- | extracting IEXPRESS package in the Microsoft Download Center, the | Windows catalog, or by using Windows Server Update Services (WSUS). ... | The list of untrusted certificates comes as a self-extracting | IEXPRESS package in a mandatory security Windows Update. Processes running under "LocalSystem" account use the global %TEMP% directory %SystemRoot%\Temp where (unprivileged) users can create (or overwrite) files and conduct all these attacks. For a recent example of such a vulnerability see Proof of concept/demonstration: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1. visit , download and save it as FEClient.dll in your "Downloads" directory; 2. download the AntiMalware Definition Updater MPAM-D.EXE or MPAM-FE[X64].EXE (see , and ) and save it in your "Downloads" directory; 3. execute MPAM-*.EXE from your "Downloads" directory; 4. notice the message box displayed from FEClient.dll placed in step 1. Instead of MPAM-*.EXE you can use ALMOST ANY other executable installer available from the Microsoft Download Center or via Windows Update! Just to pick (pun intended.-) a few: * Windows-KB890830-v*.exe, the malicious software removal tool, or * ROOTSUPD-KB931125-*.exe, the root certificate updater, see * RVKROOTS.EXE, the root certificate revocation list updater, available from the SECURITY (sic!) advisories or the Microsoft Update Catalog * ALL installers of the .NET Framework: NDP46-KB3045557-x86-x64-AllOS-ENU.exe, NDP46-KB3045557-x86-x64-AllOS-DEU.exe, NDP46-KB3045557-x86-x64-AllOS-*.exe, dotNetFx40_Full_x86_x64.exe, dotNetFx40_Client_x86_x64.exe, NDP40-KB2656405-x86.exe, NDP40-KB2656405-x64.exe, ..., NDP*.exe, DotNETFX.Exe, LangPack.Exe * Windows Defender Offline, see * ALL Visual C++ Runtime 20xy Redistributable Packages * ALL hotfixes and updates for Windows 2000, Windows XP, Windows Embedded POSReady 2009, Windows Server 2003 (Windows*-KB*-*.exe) and THOUSANDS more! Cause: ~~~~~~ About 16 years ago Microsoft introduced the NTFS "encrypting file system". : | When a user modifies EFS options for a file or folder, or when an | application attempts to access an encrypted file on an NTFS volume, | the Win32 application programming interface (API) passes the | resulting EFS-related calls to the Feclient DLL. Feclient then | calls the EFS remote procedure call (RPC) interfaces in the LSA. FEClient.dll is loaded on demand by AdvAPI32.dll (one of the Win32 core components) without its well-known fully qualified pathname, resulting in the vulnerability now fixed with MS16-007 alias KB3121918. Mitigation(s): ~~~~~~~~~~~~~~ 0. DON'T USE EXECUTABLE INSTALLERS [°]! If your favourite applications are not distributed in the native installer package format of the resp. target platform: ask^WURGE their vendors/developers to provide native installation packages. If they don't: dump these applications, stay away from such cruft! 1. Turn off UAC's privilege elevation for standard users and installer detection for all users: [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System] "ConsentPromptBehaviorUser"=dword:00000000 ; Automatically deny elevation requests "EnableInstallerDetection"=dword:00000000 See 2. NEVER execute files in UNSAFE directories (like "Downloads" and and "%TEMP%")! 3. Deny execution (at least) in the "Downloads" directories and all "%TEMP%" directories and their subdirectories: * Add the NTFS ACE "(D;OIIO;WP;;;WD)" meaning "deny execution of files in this directory for everyone, inheritable to all files in all subdirectories" (use CACLS.EXE /S: for example); * Use "software restriction policies" resp. AppLocker. Consider to apply either/both to every "%USERPROFILE%" as well as "%ALLUSERSPROFILE%" alias %ProgramData%" and "%PUBLIC%": Windows doesn't place executables in these directories and beyond. See as well as plus , or and finally ! stay tuned Stefan Kanthak PS: for "case 0" see , for "case 0.5" see ; the case numbers are not in chronological order. PPS: see (resp. the not yet finished ) for more details! [°] Self-extracting archives and executable installers are flawed^W b(rainde)ad in concept and dangerous in practice. DON'T USE SUCH CRUFT! ALWAYS use the resp. target platforms native package and archive format. For Windows these are .INF (plus .CAB) and .MSI (plus .CAB), introduced 20 years ago (with Windows 95 and Windows NT4) resp. 16 years ago (with Office 2000). Both .INF and .MSI are "opened" by programs residing in %SystemRoot%\System32\ which are therefore immune to this kind of "DLL and EXE Search Order Hijacking" attack. Since both .INF and .MSI access the contents of .CAB directly they eliminate the attack vector "unsafe temporary directory" too. ['] Current IExpress installers created by Microsoft have an application manifest that specifies "requireAdministrator". For example: * ROOTSUPD-KB931125-*.exe, the root certificate updater, see * RVKROOTS.EXE, the root certificate revocation list updater, available from the security (SIC!) advisories , , , , , or the Microsoft Update Catalog Older IExpress installers created by Microsoft have NO application manifest and are therefore subject to UAC's installer detection. For example: * CAPICOM-KB931906-v2102.exe, a security (SIC!) update available from or . [²] A well-known (trivial, easy to avoid, easy to detect, easy to exploit and easy to fix) and well-documented vulnerability: see , , , , and [³] Another well-known (trivial, easy to avoid, easy to detect, easy to exploit and easy to fix) and well-documented vulnerability: see , , , ...