Acer Quick Access - DLL Search-Order Hijacking and Potential Abuses (CVE-2019-18670)
SafeBreach Labs discovered a new vulnerability in Acer Quick Access software.
In this post, we will demonstrate how this vulnerability can be used in order to achieve persistence, defense evasion and in some cases privilege escalation by loading an arbitrary unsigned DLL into a service that runs as SYSTEM.
Acer Quick Access is a software which is preinstalled on most Acer PCs.
The software allows the user to toggle individual wireless devices on or off, change power-off USB charge settings, modify network sharing options, and much more.
Part of the software is running as a service which is executed as “NT AUTHORITY\SYSTEM,” which provides it with very powerful permissions.
In our initial exploration, we targeted the Acer Quick Access service based on the assumption that such a critical service would have high-permission-level access to the PC hardware as well as the capability to induce privilege escalation.
After the Acer Quick Access service started, it executed QAAdminAgent.exe as NT AUTHORITY\SYSTEM.
Once the library was loaded, we noticed the service tried to look for 3 missing DLL files in order to load it:
Note: We filtered the irrelevant events from the above screenshot.
As you can see, the service was trying to load three missing DLL files, which eventually were loaded from the c:\python27 directory - our PATH environment variable:
On our VM, the c:\python27 has an ACL which allows any authenticated user to write files onto the ACL. This makes the privilege escalation simple and allows a regular user to write the missing DLL file and achieve code execution as NT AUTHORITY\SYSTEM.
It is important to note that an administrative user or process must (1) set the directory ACLs to allow access to non-admin user accounts, and (2) modify the system’s PATH variable to include that directory.
In order to test this privilege escalation vulnerability, we compiled a DLL (unsigned) which writes the following to the filename of a txt file:
We were able to load three arbitrary DLLs and execute our code as NT AUTHORITY\SYSTEM.
Note: If the “atiadlxx.dll” file already exists, it won’t load the “atiadlxy.dll” file.
Once the Acer Quick Access service is started (QAAdminAgent.exe), it tries to load 3 DLL files by calling the LoadLibraryW WinAPI function:
As we can see in the screenshots, there are two root causes for the vulnerability:
Acer Quick Access is preinstalled on most Acer devices running Windows.
Below we show three possible ways that an attacker can leverage the vulnerability we discovered and documented above.
The vulnerability gives attackers the ability to load and execute malicious payloads using a signed service. This ability might be abused by an attacker, for example to achieve Application Whitelisting Bypass for purposes such as execution and evasion.
The vulnerability gives attackers the ability to load and execute malicious payloads in a persistent way, each time the service is loaded. That means that once the attacker drops a malicious DLL in a vulnerable path, the service will load the malicious code each time it is restarted.
The service provides the attacker with the ability to operate as NT AUTHORITY\SYSTEM, which is the most powerful user in Windows.
Patched versions: v2.01.3028 and v3.00.3009
Sep 24th, 2019 - Vulnerability reported to Acer
ep 24th, 2019 - Initial response from Acer
Sep 26th, 2019 - Status update from Acer
Oct 1st, 2019 - Acer confirmed the vulnerability
Oct 16th, 2019 - Status update from Acer
Oct 17th, 2019 - Status update from Acer
Oct 28th, 2019 - Acer provided affected products and versions, and said that they are going to issue a CVE.
Dec 3rd, 2019 - Acer issued CVE-2019-18670, updated us that they deployed a fix on October 7th and said that they will publish an advisory on December 17th.
Dec 17th, 2019 - Acer published a security advisory.