executable installers [財 created with InstallShield (see
<http://www.flexerasoftware.
alias <http://installshield.com/>) are vulnerable:
1. Their wrappers/self-extractors load and execute a rogue/bogus/
malicious RichEd32.dll ['] (and other DLLs too, dependent on
the version of Windows) 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
<https://insights.sei.cmu.edu/
<http://blog.acrossecurity.
and <http://seclists.org/
If RichEd32.dll et. al. get(s) 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
<https://technet.microsoft.
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
RichEd32.dll et. al. then results in an escalation of privilege!
2. They extract their payload to an unsafe temporary (sub)directory
"%TEMP%\pft<4_hex_digits>~tmp\
from there [淫.
These files can be overwritten or compromised by an unprivileged
user after extraction and before they are used.
If such an executable installer is distributed per software
deployment system (for example WSUS) it is run under "LocalSystem"
account.
Processes running under "LocalSystem" account use the global
%TEMP% directory %SystemRoot%\Temp where EVERY (unprivileged)
user can create (or overwrite) files and conduct an attack on
any file created there.
For a recent example of such a vulnerability see
<https://code.google.com/p/
3. Their payload (the "real" installer) resp. its Setup.exe loads and
executes the rogue/bogus/malicious UXTheme.dll, ProfAPI.dll, SxS.dll,
MSI.dll, LZ32.dll, Version.dll ['] (and other DLLs too, dependent
on the version of Windows) eventually found in the directory they
are started from (the "application directory", which is typically
an unsafe temporary (sub)directory "%TEMP%\pft<4_hex_digits>~tmp\
Proof of concept/demonstration:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1. visit <http://home.arcor.de/
<http://home.arcor.de/
it as RichEd32.dll in your "Downloads" directory;
2. download Realtek's High Definition Audio Codecs
<http://12244.wpc.azureedge.
(via <http://www.realtek.com/
"Downloads" directory;
3. execute 0006-32bit_Win7_Win8_Win81_
"Downloads" directory;
4. notice the message box displayed from RichEd32.dll placed in
step 1.
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\
"ConsentPromptBehaviorUser"=
"EnableInstallerDetection"=
See <https://technet.microsoft.
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:<SDDL> 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 <http://home.arcor.de/
<http://mechbgon.com/srp/> plus
<http://csrc.nist.gov/itsec/
<https://www.nsa.gov/ia/_
or <https://books.google.de/
<http://www.asd.gov.au/
stay tuned
Stefan Kanthak
PS: see <http://seclists.org/
not yet finished <http://home.arcor.de/
for more details!
PPS: the case numbers are not in chronological order.
[財 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.
['] A well-known (trivial, easy to exploit and easy to avoid)徨nd
well-documented vulnerability: see
<https://capec.mitre.org/data/
<https://technet.microsoft.
<https://msdn.microsoft.com/
<https://msdn.microsoft.com/
[淫 Another well-known (trivial, easy to exploit and easy to avoid)
and well-documented vulnerability: see
<https://cwe.mitre.org/data/
<https://cwe.mitre.org/data/
<https://capec.mitre.org/data/
<https://capec.mitre.org/data/
Komentarų nėra:
Rašyti komentarą