CVE-2016-10031

high
Published 2016-12-27 ยท Modified 2026-05-06
CVSS v3
7.5
CVSS:3.0/AV:L/AC:H/PR:L/UI:R/S:C/C:H/I:H/A:H
CVSS v4 NEW
โ€”
not yet in upstream
VIR risk
8.5

Description

WampServer 3.0.6 installs two services called 'wampapache' and 'wampmysqld' with weak file permissions, running with SYSTEM privileges. This could potentially allow an authorized but non-privileged local user to execute arbitrary code with elevated privileges on the system. To properly exploit this vulnerability, the local attacker must insert an executable file called mysqld.exe or httpd.exe and replace the original files. The next time the service starts, the malicious file will get executed as SYSTEM. NOTE: the vendor disputes the relevance of this report, taking the position that a configuration in which "'someone' (an attacker) is able to replace files on a PC" is not "the fault of WampServer.

Predictions

Exploit likelihood
73%
Patch ETA
โ€”

Heuristic predictions, AS-IS, for prioritization only.

Mitigations

No mitigations published for this CVE yet.

The vendor-content worker queues fetches as references arrive (check back in a few minutes). Or โ€” if you've already worked around this in production โ€” publish your fix to the community-verified tier.

โœš Propose a mitigation on Community โ†’ Mitigations published via the community go through AI scoring + 2 human reviewers + 7-day silent objection window before landing here with source_tier=community-verified.

Exploits

Public proof-of-concept code below. AS-IS, for defenders and authorised testing only.

Exploit-DB

EDB-40967 local windows verified text ยท 3 KB
Heliand Dema ยท 2016-12-26

Wampserver 3.0.6 - Insecure File Permissions Privilege Escalation

text exploit Source: Exploit-DB
=====================================================
# Vendor Homepage: http://www.wampserver.com/
# Date: 10 Dec 2016
# Version : Wampserver 3.0.6 32 bit x86
# Tested on: Windows 7 Ultimate SP1 (EN)
# Author: Heliand Dema
# Contact: heliand@cyber.al
=====================================================
 
Wampserver installs two services called 'wampapache' and 'wampmysqld'
with weak file permission running with SYSTEM privileges.
This could potentially allow an authorized but non-privileged local user
to execute arbitrary code with elevated privileges on the system.

C:\>sc qc wampapache
[SC] QueryServiceConfig SUCCESS

SERVICE_NAME: wampapache
        TYPE               : 10  WIN32_OWN_PROCESS
        START_TYPE         : 3   DEMAND_START
        ERROR_CONTROL      : 1   NORMAL
        BINARY_PATH_NAME   :
"c:\wamp\bin\apache\apache2.4.23\bin\httpd.exe" -k runservice
        LOAD_ORDER_GROUP   :
        TAG                : 0
        DISPLAY_NAME       : wampapache
        DEPENDENCIES       : Tcpip
                           : Afd
        SERVICE_START_NAME : LocalSystem



PS C:\> icacls c:\wamp\bin\apache\apache2.4.23\bin\httpd.exe
c:\wamp\bin\apache\apache2.4.23\bin\httpd.exe
BUILTIN\Administrators:(I)(F)                    <--- Full Acces
                                              NT AUTHORITY\SYSTEM:(I)(F)
                                              BUILTIN\Users:(I)(RX)
                                              NT AUTHORITY\Authenticated
Users:(I)(M)           <--- Modify


C:\Windows\system32>sc qc wampmysqld
[SC] QueryServiceConfig SUCCESS

SERVICE_NAME: wampmysqld
        TYPE               : 10  WIN32_OWN_PROCESS
        START_TYPE         : 3   DEMAND_START
        ERROR_CONTROL      : 1   NORMAL
        BINARY_PATH_NAME   :
c:\wamp\bin\mysql\mysql5.7.14\bin\mysqld.exe wampmysqld
        LOAD_ORDER_GROUP   :
        TAG                : 0
        DISPLAY_NAME       : wampmysqld
        DEPENDENCIES       :
        SERVICE_START_NAME : LocalSystem


PS C:\> icacls  c:\wamp\bin\mysql\mysql5.7.14\bin\mysqld.exe
c:\wamp\bin\mysql\mysql5.7.14\bin\mysqld.exe
BUILTIN\Administrators:(I)(F)                <--- Full Acces
                                             NT AUTHORITY\SYSTEM:(I)(F)
                                             BUILTIN\Users:(I)(RX)
                                             NT AUTHORITY\Authenticated
Users:(I)(M)       <--- Modify


Notice the line: NT AUTHORITY\Authenticated Users:(I)(M) which lists the
permissions for authenticated however unprivileged users. The (M) stands
for Modify, which grants us, as an unprivileged user, the ability to
read, write and delete files and subfolders within this folder.


====Proof-of-Concept====

To properly exploit this vulnerability, the local attacker must insert
an executable file called mysqld.exe or httpd.exe and replace the
original files. Next time service starts the malicious file will get
executed as SYSTEM.

Application impact

VendorProductVersionsFixed
wampserverwampserver3.0.6

References

CWEs

CWE-264

Community-verified mitigations for this CVE will appear above when contributors publish them.

Verify integrity in audit chain (admin only). AS-IS.