More Upatre privilege escalation

By | February 26, 2015

It looks like the Upatre downloader malware has added a new tool that takes advantage of PCs that are missing Windows Update patches from last fall (well, last Northern Hemisphere fall).  In the past few weeks, newer versions of the Upatre malware can silently elevate their payload (the closely-coupled Dyre/Dyreza banking malware) to run as full admin.  These newer versions are using a vulnerability that Microsoft patched in October; however if a PC is not patched, even non-admin users tricked into running Upatre can have the malware elevated to SYSTEM.

Upatre continues to incorporate the AppCompat UAC bypass technique when it is run from an admin account with a split token, but the addition of this exploit when running as a non-admin account gives the malware a better chance to gain full admin rights and privileges in either case.

The non-admin infection looks a little different on a 64-bit system versus a 32-bit system.  On the latter, the Upatre binary incorporates the exploit directly in its own, 32-bit image and runs it directly.  On the former, the Upatre binary drops a 64-bit helper program in the local, “working” directory; in the samples I looked at the dropped file was named winlogon.exe.  Upatre then launches the 64-bit program with itself as the command-line parameter.  The helper program then exploits the vulnerability on 64-bit systems to escalate the main Upatre binary to run as SYSTEM. (As before, these screenshots are from SysInternals’ Process Monitor.)

Upatre.PrivEsc.Win7-i386

Privilege escalation on 32-bit Windows 7

Upatre.PrivEsc.Win7-x64

Privilege escalation on 64-bit Windows 7

 

One important note is that this new privilege escalation exploit for non-admin infections is not being attempted on the 64-bit version of Windows 8.1 (the more popular install), only on Windows 7.  (Vista usage being what it is and XP being out of support.)

Upatre.Win8.1-x64

64-bit Windows 8.1

 

I did not see the exploit succeed in a quick test on the public Windows 10 Technical Preview (Build 9926), which is not definitive but makes some sense given it was released after the October patch.  As a fallback, Upatre will “install” Dyreza in the non-admin account if the privilege escalation attempts don’t work; however, this is more susceptible antivirus programs when the signatures finally catch up.

Looking at the winlogon.exe file (MD5 hash of EAE4B4B4A97E00D3FFDF0291F6CD637A), it was first submitted to VirusTotal very late on February 5th (Universal Time), which may give a ballpark estimate of how long this feature has been running “in the wild.”  As of the last submission to VirusTotal on February 24th, only 9/57 scanning engines are specifically flagging it as bad:
https://www.virustotal.com/en/file/4cd9a43b5c24eec9121e00c0680416a84f47fc256a9f3f04e0afb753c6ed4786/analysis/

The patch that Microsoft released in October was associated with security bulletin MS14-058.  The bulletin includes links to manually download the patch based on the different versions of Windows:
https://technet.microsoft.com/en-us/library/security/ms14-058.aspx

That patch was then superseded by the patch associated with security bulletin MS14-079 released the next month in November:
https://technet.microsoft.com/en-us/library/security/ms14-079.aspx

For reference, here are links to the two Upatre samples on VirusTotal:
https://www.virustotal.com/en/file/c4556b57ff046c56cf8a53f55bd825570882444b284589547f688b98bf1adbc9/analysis/
https://www.virustotal.com/en/file/29a6cca9ecf3007adfcc6a8e18d846630afd0b7a6636660bd26800f0a499ee3e/analysis/